From 957aa75d05c00731d7112bed7b68ce4568667d0c Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Thu, 13 Dec 2018 15:11:52 -1000 Subject: Update vim --- data/vim/_metadata/version | 2 +- data/vim/make.sh | 8 +- data/vim/patches/.listing | 583 ++++ data/vim/patches/8.1.0214 | 66 + data/vim/patches/8.1.0215 | 86 + data/vim/patches/8.1.0216 | 76 + data/vim/patches/8.1.0217 | 85 + data/vim/patches/8.1.0218 | 253 ++ data/vim/patches/8.1.0219 | 70 + data/vim/patches/8.1.0220 | 77 + data/vim/patches/8.1.0221 | 463 +++ data/vim/patches/8.1.0222 | 145 + data/vim/patches/8.1.0223 | 142 + data/vim/patches/8.1.0224 | 110 + data/vim/patches/8.1.0225 | 176 ++ data/vim/patches/8.1.0226 | 1135 ++++++++ data/vim/patches/8.1.0227 | 75 + data/vim/patches/8.1.0228 | 569 ++++ data/vim/patches/8.1.0229 | 124 + data/vim/patches/8.1.0230 | 156 + data/vim/patches/8.1.0231 | 89 + data/vim/patches/8.1.0232 | 188 ++ data/vim/patches/8.1.0233 | 317 ++ data/vim/patches/8.1.0234 | 160 + data/vim/patches/8.1.0235 | 171 ++ data/vim/patches/8.1.0236 | 108 + data/vim/patches/8.1.0237 | 61 + data/vim/patches/8.1.0238 | 72 + data/vim/patches/8.1.0239 | 88 + data/vim/patches/8.1.0240 | 55 + data/vim/patches/8.1.0241 | 58 + data/vim/patches/8.1.0242 | 63 + data/vim/patches/8.1.0243 | 89 + data/vim/patches/8.1.0244 | 245 ++ data/vim/patches/8.1.0245 | 114 + data/vim/patches/8.1.0246 | 63 + data/vim/patches/8.1.0247 | 318 ++ data/vim/patches/8.1.0248 | 147 + data/vim/patches/8.1.0249 | 88 + data/vim/patches/8.1.0250 | 142 + data/vim/patches/8.1.0251 | 365 +++ data/vim/patches/8.1.0252 | 1540 ++++++++++ data/vim/patches/8.1.0253 | 475 +++ data/vim/patches/8.1.0254 | 73 + data/vim/patches/8.1.0255 | 73 + data/vim/patches/8.1.0256 | 286 ++ data/vim/patches/8.1.0257 | 58 + data/vim/patches/8.1.0258 | 57 + data/vim/patches/8.1.0259 | 161 + data/vim/patches/8.1.0260 | 44 + data/vim/patches/8.1.0261 | 177 ++ data/vim/patches/8.1.0262 | 100 + data/vim/patches/8.1.0263 | 142 + data/vim/patches/8.1.0264 | 121 + data/vim/patches/8.1.0265 | 875 ++++++ data/vim/patches/8.1.0266 | 436 +++ data/vim/patches/8.1.0267 | 140 + data/vim/patches/8.1.0268 | 380 +++ data/vim/patches/8.1.0269 | 127 + data/vim/patches/8.1.0270 | 55 + data/vim/patches/8.1.0271 | 489 ++++ data/vim/patches/8.1.0272 | 52 + data/vim/patches/8.1.0273 | 50 + data/vim/patches/8.1.0274 | 166 ++ data/vim/patches/8.1.0275 | 185 ++ data/vim/patches/8.1.0276 | 95 + data/vim/patches/8.1.0277 | 316 ++ data/vim/patches/8.1.0278 | 95 + data/vim/patches/8.1.0279 | 96 + data/vim/patches/8.1.0280 | 71 + data/vim/patches/8.1.0281 | 738 +++++ data/vim/patches/8.1.0282 | 507 ++++ data/vim/patches/8.1.0283 | 48 + data/vim/patches/8.1.0284 | 115 + data/vim/patches/8.1.0285 | 51 + data/vim/patches/8.1.0286 | 104 + data/vim/patches/8.1.0287 | 54 + data/vim/patches/8.1.0288 | 498 ++++ data/vim/patches/8.1.0289 | 64 + data/vim/patches/8.1.0290 | 87 + data/vim/patches/8.1.0291 | 137 + data/vim/patches/8.1.0292 | 69 + data/vim/patches/8.1.0293 | 186 ++ data/vim/patches/8.1.0294 | 93 + data/vim/patches/8.1.0295 | 294 ++ data/vim/patches/8.1.0296 | 306 ++ data/vim/patches/8.1.0297 | 104 + data/vim/patches/8.1.0298 | 44 + data/vim/patches/8.1.0299 | 51 + data/vim/patches/8.1.0300 | 80 + data/vim/patches/8.1.0301 | 261 ++ data/vim/patches/8.1.0302 | 247 ++ data/vim/patches/8.1.0303 | 92 + data/vim/patches/8.1.0304 | 315 ++ data/vim/patches/8.1.0305 | 85 + data/vim/patches/8.1.0306 | 498 ++++ data/vim/patches/8.1.0307 | 233 ++ data/vim/patches/8.1.0308 | 62 + data/vim/patches/8.1.0309 | 395 +++ data/vim/patches/8.1.0310 | 110 + data/vim/patches/8.1.0311 | 112 + data/vim/patches/8.1.0312 | 226 ++ data/vim/patches/8.1.0313 | 232 ++ data/vim/patches/8.1.0314 | 158 + data/vim/patches/8.1.0315 | 223 ++ data/vim/patches/8.1.0316 | 61 + data/vim/patches/8.1.0317 | 59 + data/vim/patches/8.1.0318 | 87 + data/vim/patches/8.1.0319 | 57 + data/vim/patches/8.1.0320 | 141 + data/vim/patches/8.1.0321 | 147 + data/vim/patches/8.1.0322 | 153 + data/vim/patches/8.1.0323 | 76 + data/vim/patches/8.1.0324 | 52 + data/vim/patches/8.1.0325 | 62 + data/vim/patches/8.1.0326 | 101 + data/vim/patches/8.1.0327 | 136 + data/vim/patches/8.1.0328 | 167 ++ data/vim/patches/8.1.0329 | 56 + data/vim/patches/8.1.0330 | 219 ++ data/vim/patches/8.1.0331 | 126 + data/vim/patches/8.1.0332 | 54 + data/vim/patches/8.1.0333 | 133 + data/vim/patches/8.1.0334 | 118 + data/vim/patches/8.1.0335 | 55 + data/vim/patches/8.1.0336 | 104 + data/vim/patches/8.1.0337 | 121 + data/vim/patches/8.1.0338 | 177 ++ data/vim/patches/8.1.0339 | 102 + data/vim/patches/8.1.0340 | 72 + data/vim/patches/8.1.0341 | 312 ++ data/vim/patches/8.1.0342 | 239 ++ data/vim/patches/8.1.0343 | 62 + data/vim/patches/8.1.0344 | 85 + data/vim/patches/8.1.0345 | 286 ++ data/vim/patches/8.1.0346 | 1530 ++++++++++ data/vim/patches/8.1.0347 | 174 ++ data/vim/patches/8.1.0348 | 77 + data/vim/patches/8.1.0349 | 187 ++ data/vim/patches/8.1.0350 | 219 ++ data/vim/patches/8.1.0351 | 194 ++ data/vim/patches/8.1.0352 | 179 ++ data/vim/patches/8.1.0353 | 283 ++ data/vim/patches/8.1.0354 | 57 + data/vim/patches/8.1.0355 | 96 + data/vim/patches/8.1.0356 | 224 ++ data/vim/patches/8.1.0357 | 102 + data/vim/patches/8.1.0358 | 51 + data/vim/patches/8.1.0359 | 87 + data/vim/patches/8.1.0360 | 6803 +++++++++++++++++++++++++++++++++++++++++++ data/vim/patches/8.1.0361 | 172 ++ data/vim/patches/8.1.0362 | 6943 ++++++++++++++++++++++++++++++++++++++++++++ data/vim/patches/8.1.0363 | 87 + data/vim/patches/8.1.0364 | 66 + data/vim/patches/8.1.0365 | 465 +++ data/vim/patches/8.1.0366 | 164 ++ data/vim/patches/8.1.0367 | 53 + data/vim/patches/8.1.0368 | 695 +++++ data/vim/patches/8.1.0369 | 297 ++ data/vim/patches/8.1.0370 | 51 + data/vim/patches/8.1.0371 | 224 ++ data/vim/patches/8.1.0372 | 204 ++ data/vim/patches/8.1.0373 | 63 + data/vim/patches/8.1.0374 | 711 +++++ data/vim/patches/8.1.0375 | 68 + data/vim/patches/8.1.0376 | 63 + data/vim/patches/8.1.0377 | 771 +++++ data/vim/patches/8.1.0378 | 70 + data/vim/patches/8.1.0379 | 3132 ++++++++++++++++++++ data/vim/patches/8.1.0380 | 214 ++ data/vim/patches/8.1.0381 | 62 + data/vim/patches/8.1.0382 | 186 ++ data/vim/patches/8.1.0383 | 53 + data/vim/patches/8.1.0384 | 189 ++ data/vim/patches/8.1.0385 | 52 + data/vim/patches/8.1.0386 | 181 ++ data/vim/patches/8.1.0387 | 72 + data/vim/patches/8.1.0388 | 52 + data/vim/patches/8.1.0389 | 91 + data/vim/patches/8.1.0390 | 189 ++ data/vim/patches/8.1.0391 | 64 + data/vim/patches/8.1.0392 | 282 ++ data/vim/patches/8.1.0393 | 567 ++++ data/vim/patches/8.1.0394 | 196 ++ data/vim/patches/8.1.0395 | 52 + data/vim/patches/8.1.0396 | 54 + data/vim/patches/8.1.0397 | 335 +++ data/vim/patches/8.1.0398 | 121 + data/vim/patches/8.1.0399 | 270 ++ data/vim/patches/8.1.0400 | 101 + data/vim/patches/8.1.0401 | 259 ++ data/vim/patches/8.1.0402 | 171 ++ data/vim/patches/8.1.0403 | 45 + data/vim/patches/8.1.0404 | 69 + data/vim/patches/8.1.0405 | 2286 +++++++++++++++ data/vim/patches/8.1.0406 | 125 + data/vim/patches/8.1.0407 | 1253 ++++++++ data/vim/patches/8.1.0408 | 219 ++ data/vim/patches/8.1.0409 | 93 + data/vim/patches/8.1.0410 | 307 ++ data/vim/patches/8.1.0411 | 51 + data/vim/patches/8.1.0412 | 104 + data/vim/patches/8.1.0413 | 75 + data/vim/patches/8.1.0414 | 96 + data/vim/patches/8.1.0415 | 122 + data/vim/patches/8.1.0416 | 86 + data/vim/patches/8.1.0417 | 140 + data/vim/patches/8.1.0418 | 82 + data/vim/patches/8.1.0419 | 55 + data/vim/patches/8.1.0420 | 73 + data/vim/patches/8.1.0421 | 76 + data/vim/patches/8.1.0422 | 60 + data/vim/patches/8.1.0423 | 96 + data/vim/patches/8.1.0424 | 115 + data/vim/patches/8.1.0425 | 99 + data/vim/patches/8.1.0426 | 72 + data/vim/patches/8.1.0427 | 86 + data/vim/patches/8.1.0428 | 114 + data/vim/patches/8.1.0429 | 54 + data/vim/patches/8.1.0430 | 44 + data/vim/patches/8.1.0431 | 562 ++++ data/vim/patches/8.1.0432 | 53 + data/vim/patches/8.1.0433 | 74 + data/vim/patches/8.1.0434 | 335 +++ data/vim/patches/8.1.0435 | 78 + data/vim/patches/8.1.0436 | 92 + data/vim/patches/8.1.0437 | 74 + data/vim/patches/8.1.0438 | 344 +++ data/vim/patches/8.1.0439 | 600 ++++ data/vim/patches/8.1.0440 | 100 + data/vim/patches/8.1.0441 | 66 + data/vim/patches/8.1.0442 | 54 + data/vim/patches/8.1.0443 | 3395 ++++++++++++++++++++++ data/vim/patches/8.1.0444 | 52 + data/vim/patches/8.1.0445 | 317 ++ data/vim/patches/8.1.0446 | 46 + data/vim/patches/8.1.0447 | 133 + data/vim/patches/8.1.0448 | 233 ++ data/vim/patches/8.1.0449 | 188 ++ data/vim/patches/8.1.0450 | 67 + data/vim/patches/8.1.0451 | 148 + data/vim/patches/8.1.0452 | 123 + data/vim/patches/8.1.0453 | 126 + data/vim/patches/8.1.0454 | 90 + data/vim/patches/8.1.0455 | 238 ++ data/vim/patches/8.1.0456 | 91 + data/vim/patches/8.1.0457 | 193 ++ data/vim/patches/8.1.0458 | 109 + data/vim/patches/8.1.0459 | 51 + data/vim/patches/8.1.0460 | 124 + data/vim/patches/8.1.0461 | 4568 +++++++++++++++++++++++++++++ data/vim/patches/8.1.0462 | 115 + data/vim/patches/8.1.0463 | 80 + data/vim/patches/8.1.0464 | 94 + data/vim/patches/8.1.0465 | 55 + data/vim/patches/8.1.0466 | 264 ++ data/vim/patches/8.1.0467 | 104 + data/vim/patches/8.1.0468 | 121 + data/vim/patches/8.1.0469 | 712 +++++ data/vim/patches/8.1.0470 | 384 +++ data/vim/patches/8.1.0471 | 105 + data/vim/patches/8.1.0472 | 298 ++ data/vim/patches/8.1.0473 | 79 + data/vim/patches/8.1.0474 | 151 + data/vim/patches/8.1.0475 | 544 ++++ data/vim/patches/8.1.0476 | 90 + data/vim/patches/8.1.0477 | 47 + data/vim/patches/8.1.0478 | 53 + data/vim/patches/8.1.0479 | 188 ++ data/vim/patches/8.1.0480 | 70 + data/vim/patches/8.1.0481 | 81 + data/vim/patches/8.1.0482 | 74 + data/vim/patches/8.1.0483 | 87 + data/vim/patches/8.1.0484 | 213 ++ data/vim/patches/8.1.0485 | 86 + data/vim/patches/8.1.0486 | 56 + data/vim/patches/8.1.0487 | 1207 ++++++++ data/vim/patches/8.1.0488 | 662 +++++ data/vim/patches/8.1.0489 | 198 ++ data/vim/patches/8.1.0490 | 117 + data/vim/patches/8.1.0491 | 57 + data/vim/patches/8.1.0492 | 113 + data/vim/patches/8.1.0493 | 497 ++++ data/vim/patches/8.1.0494 | 154 + data/vim/patches/8.1.0495 | 230 ++ data/vim/patches/8.1.0496 | 413 +++ data/vim/patches/8.1.0497 | 104 + data/vim/patches/8.1.0498 | 81 + data/vim/patches/8.1.0499 | 149 + data/vim/patches/8.1.0500 | 64 + data/vim/patches/8.1.0501 | 54 + data/vim/patches/8.1.0502 | 111 + data/vim/patches/8.1.0503 | 61 + data/vim/patches/8.1.0504 | 112 + data/vim/patches/8.1.0505 | 51 + data/vim/patches/8.1.0506 | 58 + data/vim/patches/8.1.0507 | 102 + data/vim/patches/8.1.0508 | 85 + data/vim/patches/8.1.0509 | 68 + data/vim/patches/8.1.0510 | 71 + data/vim/patches/8.1.0511 | 77 + data/vim/patches/8.1.0512 | 90 + data/vim/patches/8.1.0513 | 67 + data/vim/patches/8.1.0514 | 1123 +++++++ data/vim/patches/8.1.0515 | 265 ++ data/vim/patches/8.1.0516 | 165 ++ data/vim/patches/8.1.0517 | 64 + data/vim/patches/8.1.0518 | 83 + data/vim/patches/8.1.0519 | 768 +++++ data/vim/patches/8.1.0520 | 50 + data/vim/patches/8.1.0521 | 51 + data/vim/patches/8.1.0522 | 82 + data/vim/patches/8.1.0523 | 403 +++ data/vim/patches/8.1.0524 | 63 + data/vim/patches/8.1.0525 | 122 + data/vim/patches/8.1.0526 | 57 + data/vim/patches/8.1.0527 | 62 + data/vim/patches/8.1.0528 | 797 +++++ data/vim/patches/8.1.0529 | 113 + data/vim/patches/8.1.0530 | 104 + data/vim/patches/8.1.0531 | 83 + data/vim/patches/8.1.0532 | 381 +++ data/vim/patches/8.1.0533 | 52 + data/vim/patches/8.1.0534 | 379 +++ data/vim/patches/8.1.0535 | 97 + data/vim/patches/8.1.0536 | 103 + data/vim/patches/8.1.0537 | 74 + data/vim/patches/8.1.0538 | 52 + data/vim/patches/8.1.0539 | 114 + data/vim/patches/8.1.0540 | 134 + data/vim/patches/8.1.0541 | 66 + data/vim/patches/8.1.0542 | 423 +++ data/vim/patches/8.1.0543 | 68 + data/vim/patches/8.1.0544 | 432 +++ data/vim/patches/8.1.0545 | 71 + data/vim/patches/8.1.0546 | 46 + data/vim/patches/8.1.0547 | 46 + data/vim/patches/8.1.0548 | 53 + data/vim/patches/8.1.0549 | 111 + data/vim/patches/8.1.0550 | 123 + data/vim/patches/8.1.0551 | 72 + data/vim/patches/8.1.0552 | 120 + data/vim/patches/8.1.0553 | 197 ++ data/vim/patches/8.1.0554 | 127 + data/vim/patches/8.1.0555 | 74 + data/vim/patches/8.1.0556 | 130 + data/vim/patches/8.1.0557 | 528 ++++ data/vim/patches/8.1.0558 | 161 + data/vim/patches/8.1.0559 | 115 + data/vim/patches/8.1.0560 | 142 + data/vim/patches/8.1.0561 | 52 + data/vim/patches/8.1.0562 | 172 ++ data/vim/patches/8.1.0563 | 56 + data/vim/patches/8.1.0564 | 67 + data/vim/patches/8.1.0565 | 55 + data/vim/patches/8.1.0566 | 70 + data/vim/patches/8.1.0567 | 65 + data/vim/patches/8.1.0568 | 65 + data/vim/patches/8.1.0569 | 98 + data/vim/patches/8.1.0570 | 126 + data/vim/patches/8.1.0571 | 125 + data/vim/patches/8.1.0572 | 79 + data/vim/patches/8.1.0573 | 254 ++ data/vim/patches/8.1.0574 | 129 + data/vim/patches/8.1.0575 | 346 +++ data/vim/patches/8.1.0576 | 67 + data/vim/patches/8.1.0577 | 153 + data/vim/patches/8.1.0578 | 266 ++ data/vim/patches/8.1.0579 | 2526 ++++++++++++++++ 369 files changed, 94949 insertions(+), 4 deletions(-) create mode 100644 data/vim/patches/.listing create mode 100644 data/vim/patches/8.1.0214 create mode 100644 data/vim/patches/8.1.0215 create mode 100644 data/vim/patches/8.1.0216 create mode 100644 data/vim/patches/8.1.0217 create mode 100644 data/vim/patches/8.1.0218 create mode 100644 data/vim/patches/8.1.0219 create mode 100644 data/vim/patches/8.1.0220 create mode 100644 data/vim/patches/8.1.0221 create mode 100644 data/vim/patches/8.1.0222 create mode 100644 data/vim/patches/8.1.0223 create mode 100644 data/vim/patches/8.1.0224 create mode 100644 data/vim/patches/8.1.0225 create mode 100644 data/vim/patches/8.1.0226 create mode 100644 data/vim/patches/8.1.0227 create mode 100644 data/vim/patches/8.1.0228 create mode 100644 data/vim/patches/8.1.0229 create mode 100644 data/vim/patches/8.1.0230 create mode 100644 data/vim/patches/8.1.0231 create mode 100644 data/vim/patches/8.1.0232 create mode 100644 data/vim/patches/8.1.0233 create mode 100644 data/vim/patches/8.1.0234 create mode 100644 data/vim/patches/8.1.0235 create mode 100644 data/vim/patches/8.1.0236 create mode 100644 data/vim/patches/8.1.0237 create mode 100644 data/vim/patches/8.1.0238 create mode 100644 data/vim/patches/8.1.0239 create mode 100644 data/vim/patches/8.1.0240 create mode 100644 data/vim/patches/8.1.0241 create mode 100644 data/vim/patches/8.1.0242 create mode 100644 data/vim/patches/8.1.0243 create mode 100644 data/vim/patches/8.1.0244 create mode 100644 data/vim/patches/8.1.0245 create mode 100644 data/vim/patches/8.1.0246 create mode 100644 data/vim/patches/8.1.0247 create mode 100644 data/vim/patches/8.1.0248 create mode 100644 data/vim/patches/8.1.0249 create mode 100644 data/vim/patches/8.1.0250 create mode 100644 data/vim/patches/8.1.0251 create mode 100644 data/vim/patches/8.1.0252 create mode 100644 data/vim/patches/8.1.0253 create mode 100644 data/vim/patches/8.1.0254 create mode 100644 data/vim/patches/8.1.0255 create mode 100644 data/vim/patches/8.1.0256 create mode 100644 data/vim/patches/8.1.0257 create mode 100644 data/vim/patches/8.1.0258 create mode 100644 data/vim/patches/8.1.0259 create mode 100644 data/vim/patches/8.1.0260 create mode 100644 data/vim/patches/8.1.0261 create mode 100644 data/vim/patches/8.1.0262 create mode 100644 data/vim/patches/8.1.0263 create mode 100644 data/vim/patches/8.1.0264 create mode 100644 data/vim/patches/8.1.0265 create mode 100644 data/vim/patches/8.1.0266 create mode 100644 data/vim/patches/8.1.0267 create mode 100644 data/vim/patches/8.1.0268 create mode 100644 data/vim/patches/8.1.0269 create mode 100644 data/vim/patches/8.1.0270 create mode 100644 data/vim/patches/8.1.0271 create mode 100644 data/vim/patches/8.1.0272 create mode 100644 data/vim/patches/8.1.0273 create mode 100644 data/vim/patches/8.1.0274 create mode 100644 data/vim/patches/8.1.0275 create mode 100644 data/vim/patches/8.1.0276 create mode 100644 data/vim/patches/8.1.0277 create mode 100644 data/vim/patches/8.1.0278 create mode 100644 data/vim/patches/8.1.0279 create mode 100644 data/vim/patches/8.1.0280 create mode 100644 data/vim/patches/8.1.0281 create mode 100644 data/vim/patches/8.1.0282 create mode 100644 data/vim/patches/8.1.0283 create mode 100644 data/vim/patches/8.1.0284 create mode 100644 data/vim/patches/8.1.0285 create mode 100644 data/vim/patches/8.1.0286 create mode 100644 data/vim/patches/8.1.0287 create mode 100644 data/vim/patches/8.1.0288 create mode 100644 data/vim/patches/8.1.0289 create mode 100644 data/vim/patches/8.1.0290 create mode 100644 data/vim/patches/8.1.0291 create mode 100644 data/vim/patches/8.1.0292 create mode 100644 data/vim/patches/8.1.0293 create mode 100644 data/vim/patches/8.1.0294 create mode 100644 data/vim/patches/8.1.0295 create mode 100644 data/vim/patches/8.1.0296 create mode 100644 data/vim/patches/8.1.0297 create mode 100644 data/vim/patches/8.1.0298 create mode 100644 data/vim/patches/8.1.0299 create mode 100644 data/vim/patches/8.1.0300 create mode 100644 data/vim/patches/8.1.0301 create mode 100644 data/vim/patches/8.1.0302 create mode 100644 data/vim/patches/8.1.0303 create mode 100644 data/vim/patches/8.1.0304 create mode 100644 data/vim/patches/8.1.0305 create mode 100644 data/vim/patches/8.1.0306 create mode 100644 data/vim/patches/8.1.0307 create mode 100644 data/vim/patches/8.1.0308 create mode 100644 data/vim/patches/8.1.0309 create mode 100644 data/vim/patches/8.1.0310 create mode 100644 data/vim/patches/8.1.0311 create mode 100644 data/vim/patches/8.1.0312 create mode 100644 data/vim/patches/8.1.0313 create mode 100644 data/vim/patches/8.1.0314 create mode 100644 data/vim/patches/8.1.0315 create mode 100644 data/vim/patches/8.1.0316 create mode 100644 data/vim/patches/8.1.0317 create mode 100644 data/vim/patches/8.1.0318 create mode 100644 data/vim/patches/8.1.0319 create mode 100644 data/vim/patches/8.1.0320 create mode 100644 data/vim/patches/8.1.0321 create mode 100644 data/vim/patches/8.1.0322 create mode 100644 data/vim/patches/8.1.0323 create mode 100644 data/vim/patches/8.1.0324 create mode 100644 data/vim/patches/8.1.0325 create mode 100644 data/vim/patches/8.1.0326 create mode 100644 data/vim/patches/8.1.0327 create mode 100644 data/vim/patches/8.1.0328 create mode 100644 data/vim/patches/8.1.0329 create mode 100644 data/vim/patches/8.1.0330 create mode 100644 data/vim/patches/8.1.0331 create mode 100644 data/vim/patches/8.1.0332 create mode 100644 data/vim/patches/8.1.0333 create mode 100644 data/vim/patches/8.1.0334 create mode 100644 data/vim/patches/8.1.0335 create mode 100644 data/vim/patches/8.1.0336 create mode 100644 data/vim/patches/8.1.0337 create mode 100644 data/vim/patches/8.1.0338 create mode 100644 data/vim/patches/8.1.0339 create mode 100644 data/vim/patches/8.1.0340 create mode 100644 data/vim/patches/8.1.0341 create mode 100644 data/vim/patches/8.1.0342 create mode 100644 data/vim/patches/8.1.0343 create mode 100644 data/vim/patches/8.1.0344 create mode 100644 data/vim/patches/8.1.0345 create mode 100644 data/vim/patches/8.1.0346 create mode 100644 data/vim/patches/8.1.0347 create mode 100644 data/vim/patches/8.1.0348 create mode 100644 data/vim/patches/8.1.0349 create mode 100644 data/vim/patches/8.1.0350 create mode 100644 data/vim/patches/8.1.0351 create mode 100644 data/vim/patches/8.1.0352 create mode 100644 data/vim/patches/8.1.0353 create mode 100644 data/vim/patches/8.1.0354 create mode 100644 data/vim/patches/8.1.0355 create mode 100644 data/vim/patches/8.1.0356 create mode 100644 data/vim/patches/8.1.0357 create mode 100644 data/vim/patches/8.1.0358 create mode 100644 data/vim/patches/8.1.0359 create mode 100644 data/vim/patches/8.1.0360 create mode 100644 data/vim/patches/8.1.0361 create mode 100644 data/vim/patches/8.1.0362 create mode 100644 data/vim/patches/8.1.0363 create mode 100644 data/vim/patches/8.1.0364 create mode 100644 data/vim/patches/8.1.0365 create mode 100644 data/vim/patches/8.1.0366 create mode 100644 data/vim/patches/8.1.0367 create mode 100644 data/vim/patches/8.1.0368 create mode 100644 data/vim/patches/8.1.0369 create mode 100644 data/vim/patches/8.1.0370 create mode 100644 data/vim/patches/8.1.0371 create mode 100644 data/vim/patches/8.1.0372 create mode 100644 data/vim/patches/8.1.0373 create mode 100644 data/vim/patches/8.1.0374 create mode 100644 data/vim/patches/8.1.0375 create mode 100644 data/vim/patches/8.1.0376 create mode 100644 data/vim/patches/8.1.0377 create mode 100644 data/vim/patches/8.1.0378 create mode 100644 data/vim/patches/8.1.0379 create mode 100644 data/vim/patches/8.1.0380 create mode 100644 data/vim/patches/8.1.0381 create mode 100644 data/vim/patches/8.1.0382 create mode 100644 data/vim/patches/8.1.0383 create mode 100644 data/vim/patches/8.1.0384 create mode 100644 data/vim/patches/8.1.0385 create mode 100644 data/vim/patches/8.1.0386 create mode 100644 data/vim/patches/8.1.0387 create mode 100644 data/vim/patches/8.1.0388 create mode 100644 data/vim/patches/8.1.0389 create mode 100644 data/vim/patches/8.1.0390 create mode 100644 data/vim/patches/8.1.0391 create mode 100644 data/vim/patches/8.1.0392 create mode 100644 data/vim/patches/8.1.0393 create mode 100644 data/vim/patches/8.1.0394 create mode 100644 data/vim/patches/8.1.0395 create mode 100644 data/vim/patches/8.1.0396 create mode 100644 data/vim/patches/8.1.0397 create mode 100644 data/vim/patches/8.1.0398 create mode 100644 data/vim/patches/8.1.0399 create mode 100644 data/vim/patches/8.1.0400 create mode 100644 data/vim/patches/8.1.0401 create mode 100644 data/vim/patches/8.1.0402 create mode 100644 data/vim/patches/8.1.0403 create mode 100644 data/vim/patches/8.1.0404 create mode 100644 data/vim/patches/8.1.0405 create mode 100644 data/vim/patches/8.1.0406 create mode 100644 data/vim/patches/8.1.0407 create mode 100644 data/vim/patches/8.1.0408 create mode 100644 data/vim/patches/8.1.0409 create mode 100644 data/vim/patches/8.1.0410 create mode 100644 data/vim/patches/8.1.0411 create mode 100644 data/vim/patches/8.1.0412 create mode 100644 data/vim/patches/8.1.0413 create mode 100644 data/vim/patches/8.1.0414 create mode 100644 data/vim/patches/8.1.0415 create mode 100644 data/vim/patches/8.1.0416 create mode 100644 data/vim/patches/8.1.0417 create mode 100644 data/vim/patches/8.1.0418 create mode 100644 data/vim/patches/8.1.0419 create mode 100644 data/vim/patches/8.1.0420 create mode 100644 data/vim/patches/8.1.0421 create mode 100644 data/vim/patches/8.1.0422 create mode 100644 data/vim/patches/8.1.0423 create mode 100644 data/vim/patches/8.1.0424 create mode 100644 data/vim/patches/8.1.0425 create mode 100644 data/vim/patches/8.1.0426 create mode 100644 data/vim/patches/8.1.0427 create mode 100644 data/vim/patches/8.1.0428 create mode 100644 data/vim/patches/8.1.0429 create mode 100644 data/vim/patches/8.1.0430 create mode 100644 data/vim/patches/8.1.0431 create mode 100644 data/vim/patches/8.1.0432 create mode 100644 data/vim/patches/8.1.0433 create mode 100644 data/vim/patches/8.1.0434 create mode 100644 data/vim/patches/8.1.0435 create mode 100644 data/vim/patches/8.1.0436 create mode 100644 data/vim/patches/8.1.0437 create mode 100644 data/vim/patches/8.1.0438 create mode 100644 data/vim/patches/8.1.0439 create mode 100644 data/vim/patches/8.1.0440 create mode 100644 data/vim/patches/8.1.0441 create mode 100644 data/vim/patches/8.1.0442 create mode 100644 data/vim/patches/8.1.0443 create mode 100644 data/vim/patches/8.1.0444 create mode 100644 data/vim/patches/8.1.0445 create mode 100644 data/vim/patches/8.1.0446 create mode 100644 data/vim/patches/8.1.0447 create mode 100644 data/vim/patches/8.1.0448 create mode 100644 data/vim/patches/8.1.0449 create mode 100644 data/vim/patches/8.1.0450 create mode 100644 data/vim/patches/8.1.0451 create mode 100644 data/vim/patches/8.1.0452 create mode 100644 data/vim/patches/8.1.0453 create mode 100644 data/vim/patches/8.1.0454 create mode 100644 data/vim/patches/8.1.0455 create mode 100644 data/vim/patches/8.1.0456 create mode 100644 data/vim/patches/8.1.0457 create mode 100644 data/vim/patches/8.1.0458 create mode 100644 data/vim/patches/8.1.0459 create mode 100644 data/vim/patches/8.1.0460 create mode 100644 data/vim/patches/8.1.0461 create mode 100644 data/vim/patches/8.1.0462 create mode 100644 data/vim/patches/8.1.0463 create mode 100644 data/vim/patches/8.1.0464 create mode 100644 data/vim/patches/8.1.0465 create mode 100644 data/vim/patches/8.1.0466 create mode 100644 data/vim/patches/8.1.0467 create mode 100644 data/vim/patches/8.1.0468 create mode 100644 data/vim/patches/8.1.0469 create mode 100644 data/vim/patches/8.1.0470 create mode 100644 data/vim/patches/8.1.0471 create mode 100644 data/vim/patches/8.1.0472 create mode 100644 data/vim/patches/8.1.0473 create mode 100644 data/vim/patches/8.1.0474 create mode 100644 data/vim/patches/8.1.0475 create mode 100644 data/vim/patches/8.1.0476 create mode 100644 data/vim/patches/8.1.0477 create mode 100644 data/vim/patches/8.1.0478 create mode 100644 data/vim/patches/8.1.0479 create mode 100644 data/vim/patches/8.1.0480 create mode 100644 data/vim/patches/8.1.0481 create mode 100644 data/vim/patches/8.1.0482 create mode 100644 data/vim/patches/8.1.0483 create mode 100644 data/vim/patches/8.1.0484 create mode 100644 data/vim/patches/8.1.0485 create mode 100644 data/vim/patches/8.1.0486 create mode 100644 data/vim/patches/8.1.0487 create mode 100644 data/vim/patches/8.1.0488 create mode 100644 data/vim/patches/8.1.0489 create mode 100644 data/vim/patches/8.1.0490 create mode 100644 data/vim/patches/8.1.0491 create mode 100644 data/vim/patches/8.1.0492 create mode 100644 data/vim/patches/8.1.0493 create mode 100644 data/vim/patches/8.1.0494 create mode 100644 data/vim/patches/8.1.0495 create mode 100644 data/vim/patches/8.1.0496 create mode 100644 data/vim/patches/8.1.0497 create mode 100644 data/vim/patches/8.1.0498 create mode 100644 data/vim/patches/8.1.0499 create mode 100644 data/vim/patches/8.1.0500 create mode 100644 data/vim/patches/8.1.0501 create mode 100644 data/vim/patches/8.1.0502 create mode 100644 data/vim/patches/8.1.0503 create mode 100644 data/vim/patches/8.1.0504 create mode 100644 data/vim/patches/8.1.0505 create mode 100644 data/vim/patches/8.1.0506 create mode 100644 data/vim/patches/8.1.0507 create mode 100644 data/vim/patches/8.1.0508 create mode 100644 data/vim/patches/8.1.0509 create mode 100644 data/vim/patches/8.1.0510 create mode 100644 data/vim/patches/8.1.0511 create mode 100644 data/vim/patches/8.1.0512 create mode 100644 data/vim/patches/8.1.0513 create mode 100644 data/vim/patches/8.1.0514 create mode 100644 data/vim/patches/8.1.0515 create mode 100644 data/vim/patches/8.1.0516 create mode 100644 data/vim/patches/8.1.0517 create mode 100644 data/vim/patches/8.1.0518 create mode 100644 data/vim/patches/8.1.0519 create mode 100644 data/vim/patches/8.1.0520 create mode 100644 data/vim/patches/8.1.0521 create mode 100644 data/vim/patches/8.1.0522 create mode 100644 data/vim/patches/8.1.0523 create mode 100644 data/vim/patches/8.1.0524 create mode 100644 data/vim/patches/8.1.0525 create mode 100644 data/vim/patches/8.1.0526 create mode 100644 data/vim/patches/8.1.0527 create mode 100644 data/vim/patches/8.1.0528 create mode 100644 data/vim/patches/8.1.0529 create mode 100644 data/vim/patches/8.1.0530 create mode 100644 data/vim/patches/8.1.0531 create mode 100644 data/vim/patches/8.1.0532 create mode 100644 data/vim/patches/8.1.0533 create mode 100644 data/vim/patches/8.1.0534 create mode 100644 data/vim/patches/8.1.0535 create mode 100644 data/vim/patches/8.1.0536 create mode 100644 data/vim/patches/8.1.0537 create mode 100644 data/vim/patches/8.1.0538 create mode 100644 data/vim/patches/8.1.0539 create mode 100644 data/vim/patches/8.1.0540 create mode 100644 data/vim/patches/8.1.0541 create mode 100644 data/vim/patches/8.1.0542 create mode 100644 data/vim/patches/8.1.0543 create mode 100644 data/vim/patches/8.1.0544 create mode 100644 data/vim/patches/8.1.0545 create mode 100644 data/vim/patches/8.1.0546 create mode 100644 data/vim/patches/8.1.0547 create mode 100644 data/vim/patches/8.1.0548 create mode 100644 data/vim/patches/8.1.0549 create mode 100644 data/vim/patches/8.1.0550 create mode 100644 data/vim/patches/8.1.0551 create mode 100644 data/vim/patches/8.1.0552 create mode 100644 data/vim/patches/8.1.0553 create mode 100644 data/vim/patches/8.1.0554 create mode 100644 data/vim/patches/8.1.0555 create mode 100644 data/vim/patches/8.1.0556 create mode 100644 data/vim/patches/8.1.0557 create mode 100644 data/vim/patches/8.1.0558 create mode 100644 data/vim/patches/8.1.0559 create mode 100644 data/vim/patches/8.1.0560 create mode 100644 data/vim/patches/8.1.0561 create mode 100644 data/vim/patches/8.1.0562 create mode 100644 data/vim/patches/8.1.0563 create mode 100644 data/vim/patches/8.1.0564 create mode 100644 data/vim/patches/8.1.0565 create mode 100644 data/vim/patches/8.1.0566 create mode 100644 data/vim/patches/8.1.0567 create mode 100644 data/vim/patches/8.1.0568 create mode 100644 data/vim/patches/8.1.0569 create mode 100644 data/vim/patches/8.1.0570 create mode 100644 data/vim/patches/8.1.0571 create mode 100644 data/vim/patches/8.1.0572 create mode 100644 data/vim/patches/8.1.0573 create mode 100644 data/vim/patches/8.1.0574 create mode 100644 data/vim/patches/8.1.0575 create mode 100644 data/vim/patches/8.1.0576 create mode 100644 data/vim/patches/8.1.0577 create mode 100644 data/vim/patches/8.1.0578 create mode 100644 data/vim/patches/8.1.0579 diff --git a/data/vim/_metadata/version b/data/vim/_metadata/version index 8a549c0d4..f068dd2ac 100644 --- a/data/vim/_metadata/version +++ b/data/vim/_metadata/version @@ -1 +1 @@ -8.1.213 +8.1.579 diff --git a/data/vim/make.sh b/data/vim/make.sh index 790e0d155..5a68d377e 100644 --- a/data/vim/make.sh +++ b/data/vim/make.sh @@ -1,10 +1,11 @@ pkg:extract cd * -for ((x = 2; x != 214; ++x)); do - echo Applying patch $x - patch -p0 <"${PKG_DATA}/patches/8.1.$(printf '%.4u\n' "$x")" +for patch in "${PKG_DATA}/patches/8.1."*; do + echo Applying patch $(basename "${patch}") + patch -p0 <"${patch}" done + pkg:patch cd src autoconf @@ -14,3 +15,4 @@ make pkg:install pkg: mkdir -p /etc/profile.d pkg: cp -a %/vim.sh /etc/profile.d +pkg: ln -s vim /usr/bin/vi diff --git a/data/vim/patches/.listing b/data/vim/patches/.listing new file mode 100644 index 000000000..bd5ad134d --- /dev/null +++ b/data/vim/patches/.listing @@ -0,0 +1,583 @@ +drwxrwsr-x 2 506 450 16384 Dec 13 22:21 . +drwxrwsr-x 12 506 450 40960 May 17 2018 .. +-rw-r--r-- 1 506 450 2006 May 17 2018 8.1.0001 +-rw-r--r-- 1 506 450 2572 May 19 2018 8.1.0002 +-rw-r--r-- 1 506 450 3792 May 19 2018 8.1.0003 +-rw-r--r-- 1 506 450 1751 May 19 2018 8.1.0004 +-rw-r--r-- 1 506 450 1807 May 19 2018 8.1.0005 +-rw-r--r-- 1 506 450 1693 May 20 2018 8.1.0006 +-rw-r--r-- 1 506 450 1962 May 20 2018 8.1.0007 +-rw-r--r-- 1 506 450 2386 May 20 2018 8.1.0008 +-rw-r--r-- 1 506 450 2778 May 20 2018 8.1.0009 +-rw-r--r-- 1 506 450 9415 May 20 2018 8.1.0010 +-rw-r--r-- 1 506 450 2536 May 21 2018 8.1.0011 +-rw-r--r-- 1 506 450 1610 May 21 2018 8.1.0012 +-rw-r--r-- 1 506 450 6717 May 21 2018 8.1.0013 +-rw-r--r-- 1 506 450 13559 May 21 2018 8.1.0014 +-rw-r--r-- 1 506 450 4186 May 21 2018 8.1.0015 +-rw-r--r-- 1 506 450 1890 May 21 2018 8.1.0016 +-rw-r--r-- 1 506 450 5801 May 22 2018 8.1.0017 +-rw-r--r-- 1 506 450 9499 May 22 2018 8.1.0018 +-rw-r--r-- 1 506 450 2326 May 22 2018 8.1.0019 +-rw-r--r-- 1 506 450 15279 May 22 2018 8.1.0020 +-rw-r--r-- 1 506 450 2235 May 23 2018 8.1.0021 +-rw-r--r-- 1 506 450 2396 May 23 2018 8.1.0022 +-rw-r--r-- 1 506 450 2004 May 26 2018 8.1.0023 +-rw-r--r-- 1 506 450 2617 May 26 2018 8.1.0024 +-rw-r--r-- 1 506 450 4779 May 26 2018 8.1.0025 +-rw-r--r-- 1 506 450 1809 May 26 2018 8.1.0026 +-rw-r--r-- 1 506 450 50988 Jun 03 2018 8.1.0027 +-rw-r--r-- 1 506 450 1760 Jun 03 2018 8.1.0028 +-rw-r--r-- 1 506 450 1495 Jun 03 2018 8.1.0029 +-rw-r--r-- 1 506 450 3105 Jun 03 2018 8.1.0030 +-rw-r--r-- 1 506 450 1611 Jun 03 2018 8.1.0031 +-rw-r--r-- 1 506 450 5262 Jun 04 2018 8.1.0032 +-rw-r--r-- 1 506 450 1848 Jun 04 2018 8.1.0033 +-rw-r--r-- 1 506 450 2716 Jun 04 2018 8.1.0034 +-rw-r--r-- 1 506 450 6569 Jun 06 2018 8.1.0035 +-rw-r--r-- 1 506 450 4578 Jun 06 2018 8.1.0036 +-rw-r--r-- 1 506 450 15307 Jun 06 2018 8.1.0037 +-rw-r--r-- 1 506 450 1978 Jun 07 2018 8.1.0038 +-rw-r--r-- 1 506 450 8953 Jun 07 2018 8.1.0039 +-rw-r--r-- 1 506 450 2531 Jun 10 2018 8.1.0040 +-rw-r--r-- 1 506 450 4059 Jun 10 2018 8.1.0041 +-rw-r--r-- 1 506 450 3565 Jun 10 2018 8.1.0042 +-rw-r--r-- 1 506 450 3435 Jun 12 2018 8.1.0043 +-rw-r--r-- 1 506 450 2509 Jun 12 2018 8.1.0044 +-rw-r--r-- 1 506 450 8195 Jun 12 2018 8.1.0045 +-rw-r--r-- 1 506 450 5925 Jun 12 2018 8.1.0046 +-rw-r--r-- 1 506 450 2905 Jun 12 2018 8.1.0047 +-rw-r--r-- 1 506 450 3129 Jun 12 2018 8.1.0048 +-rw-r--r-- 1 506 450 7856 Jun 12 2018 8.1.0049 +-rw-r--r-- 1 506 450 12084 Jun 12 2018 8.1.0050 +-rw-r--r-- 1 506 450 1187 Jun 12 2018 8.1.0051 +-rw-r--r-- 1 506 450 1660 Jun 12 2018 8.1.0052 +-rw-r--r-- 1 506 450 17493 Jun 12 2018 8.1.0053 +-rw-r--r-- 1 506 450 1978 Jun 13 2018 8.1.0054 +-rw-r--r-- 1 506 450 2674 Jun 13 2018 8.1.0055 +-rw-r--r-- 1 506 450 2996 Jun 16 14:44 8.1.0056 +-rw-r--r-- 1 506 450 5625 Jun 16 15:33 8.1.0057 +-rw-r--r-- 1 506 450 5833 Jun 16 16:21 8.1.0058 +-rw-r--r-- 1 506 450 3006 Jun 16 17:26 8.1.0059 +-rw-r--r-- 1 506 450 2199 Jun 16 22:17 8.1.0060 +-rw-r--r-- 1 506 450 9361 Jun 16 22:58 8.1.0061 +-rw-r--r-- 1 506 450 10083 Jun 17 14:48 8.1.0062 +-rw-r--r-- 1 506 450 4134 Jun 17 15:01 8.1.0063 +-rw-r--r-- 1 506 450 3198 Jun 17 16:24 8.1.0064 +-rw-r--r-- 1 506 450 2714 Jun 17 17:11 8.1.0065 +-rw-r--r-- 1 506 450 4125 Jun 17 17:33 8.1.0066 +-rw-r--r-- 1 506 450 3453 Jun 17 19:08 8.1.0067 +-rw-r--r-- 1 506 450 2218 Jun 17 19:23 8.1.0068 +-rw-r--r-- 1 506 450 10539 Jun 17 19:37 8.1.0069 +-rw-r--r-- 1 506 450 1772 Jun 17 20:11 8.1.0070 +-rw-r--r-- 1 506 450 24885 Jun 17 21:34 8.1.0071 +-rw-r--r-- 1 506 450 3489 Jun 17 22:19 8.1.0072 +-rw-r--r-- 1 506 450 2490 Jun 18 21:17 8.1.0073 +-rw-r--r-- 1 506 450 1917 Jun 18 21:53 8.1.0074 +-rw-r--r-- 1 506 450 1690 Jun 18 22:01 8.1.0075 +-rw-r--r-- 1 506 450 2192 Jun 18 22:16 8.1.0076 +-rw-r--r-- 1 506 450 1575 Jun 18 22:31 8.1.0077 +-rw-r--r-- 1 506 450 3972 Jun 19 14:24 8.1.0078 +-rw-r--r-- 1 506 450 1941 Jun 19 14:46 8.1.0079 +-rw-r--r-- 1 506 450 9680 Jun 19 17:28 8.1.0080 +-rw-r--r-- 1 506 450 2721 Jun 19 17:28 8.1.0081 +-rw-r--r-- 1 506 450 3834 Jun 19 17:49 8.1.0082 +-rw-r--r-- 1 506 450 5227 Jun 19 18:28 8.1.0083 +-rw-r--r-- 1 506 450 5639 Jun 19 18:58 8.1.0084 +-rw-r--r-- 1 506 450 3269 Jun 19 19:09 8.1.0085 +-rw-r--r-- 1 506 450 2588 Jun 19 19:46 8.1.0086 +-rw-r--r-- 1 506 450 6792 Jun 19 19:59 8.1.0087 +-rw-r--r-- 1 506 450 2126 Jun 19 20:08 8.1.0088 +-rw-r--r-- 1 506 450 5766 Jun 19 22:35 8.1.0089 +-rw-r--r-- 1 506 450 4270 Jun 20 20:38 8.1.0090 +-rw-r--r-- 1 506 450 10822 Jun 20 22:38 8.1.0091 +-rw-r--r-- 1 506 450 1512 Jun 21 12:08 8.1.0092 +-rw-r--r-- 1 506 450 2187 Jun 21 20:31 8.1.0093 +-rw-r--r-- 1 506 450 1399 Jun 21 21:39 8.1.0094 +-rw-r--r-- 1 506 450 2373 Jun 21 22:10 8.1.0095 +-rw-r--r-- 1 506 450 4382 Jun 22 21:31 8.1.0096 +-rw-r--r-- 1 506 450 1805 Jun 22 21:43 8.1.0097 +-rw-r--r-- 1 506 450 9705 Jun 23 14:22 8.1.0098 +-rw-r--r-- 1 506 450 1924 Jun 23 14:35 8.1.0099 +-rw-r--r-- 1 506 450 1595 Jun 23 14:36 8.1.0100 +-rw-r--r-- 1 506 450 1769 Jun 23 14:55 8.1.0101 +-rw-r--r-- 1 506 450 1557 Jun 23 15:09 8.1.0102 +-rw-r--r-- 1 506 450 5682 Jun 23 16:12 8.1.0103 +-rw-r--r-- 1 506 450 1709 Jun 23 17:15 8.1.0104 +-rw-r--r-- 1 506 450 91953 Jun 23 19:23 8.1.0105 +-rw-r--r-- 1 506 450 1471 Jun 24 14:45 8.1.0106 +-rw-r--r-- 1 506 450 2523 Jun 24 15:14 8.1.0107 +-rw-r--r-- 1 506 450 206793 Jun 24 15:54 8.1.0108 +-rw-r--r-- 1 506 450 1365 Jun 24 15:56 8.1.0109 +-rw-r--r-- 1 506 450 2466 Jun 24 16:54 8.1.0110 +-rw-r--r-- 1 506 450 4914 Jun 24 18:05 8.1.0111 +-rw-r--r-- 1 506 450 4681 Jun 24 19:02 8.1.0112 +-rw-r--r-- 1 506 450 1508 Jun 24 19:24 8.1.0113 +-rw-r--r-- 1 506 450 6304 Jun 24 23:53 8.1.0114 +-rw-r--r-- 1 506 450 1961 Jun 25 00:06 8.1.0115 +-rw-r--r-- 1 506 450 2800 Jun 25 21:25 8.1.0116 +-rw-r--r-- 1 506 450 1760 Jun 26 23:19 8.1.0117 +-rw-r--r-- 1 506 450 4245 Jun 27 21:22 8.1.0118 +-rw-r--r-- 1 506 450 1948 Jun 27 23:13 8.1.0119 +-rw-r--r-- 1 506 450 5855 Jun 28 11:28 8.1.0120 +-rw-r--r-- 1 506 450 4713 Jun 28 12:05 8.1.0121 +-rw-r--r-- 1 506 450 1658 Jun 28 14:55 8.1.0122 +-rw-r--r-- 1 506 450 1718 Jun 28 15:30 8.1.0123 +-rw-r--r-- 1 506 450 1597 Jun 28 15:50 8.1.0124 +-rw-r--r-- 1 506 450 4884 Jun 28 19:26 8.1.0125 +-rw-r--r-- 1 506 450 6119 Jun 28 22:23 8.1.0126 +-rw-r--r-- 1 506 450 1817 Jun 29 20:29 8.1.0127 +-rw-r--r-- 1 506 450 13345 Jun 30 18:25 8.1.0128 +-rw-r--r-- 1 506 450 1716 Jun 30 18:25 8.1.0129 +-rw-r--r-- 1 506 450 5062 Jun 30 18:28 8.1.0130 +-rw-r--r-- 1 506 450 7164 Jun 30 21:18 8.1.0131 +-rw-r--r-- 1 506 450 21355 Jun 30 21:50 8.1.0132 +-rw-r--r-- 1 506 450 3994 Jun 30 22:41 8.1.0133 +-rw-r--r-- 1 506 450 18460 Jul 01 15:12 8.1.0134 +-rw-r--r-- 1 506 450 2589 Jul 01 16:44 8.1.0135 +-rw-r--r-- 1 506 450 9996 Jul 01 19:49 8.1.0136 +-rw-r--r-- 1 506 450 8177 Jul 01 21:13 8.1.0137 +-rw-r--r-- 1 506 450 4761 Jul 02 20:51 8.1.0138 +-rw-r--r-- 1 506 450 3091 Jul 02 22:55 8.1.0139 +-rw-r--r-- 1 506 450 2895 Jul 03 14:48 8.1.0140 +-rw-r--r-- 1 506 450 15890 Jul 03 16:54 8.1.0141 +-rw-r--r-- 1 506 450 4578 Jul 03 17:17 8.1.0142 +-rw-r--r-- 1 506 450 6351 Jul 03 18:18 8.1.0143 +-rw-r--r-- 1 506 450 2728 Jul 03 18:37 8.1.0144 +-rw-r--r-- 1 506 450 2327 Jul 03 19:17 8.1.0145 +-rw-r--r-- 1 506 450 1367 Jul 03 21:27 8.1.0146 +-rw-r--r-- 1 506 450 3044 Jul 04 22:04 8.1.0147 +-rw-r--r-- 1 506 450 1512 Jul 04 22:13 8.1.0148 +-rw-r--r-- 1 506 450 6889 Jul 04 22:27 8.1.0149 +-rw-r--r-- 1 506 450 22149 Jul 04 22:37 8.1.0150 +-rw-r--r-- 1 506 450 1593 Jul 04 22:44 8.1.0151 +-rw-r--r-- 1 506 450 11431 Jul 04 23:06 8.1.0152 +-rw-r--r-- 1 506 450 1970 Jul 05 22:28 8.1.0153 +-rw-r--r-- 1 506 450 3833 Jul 05 22:28 8.1.0154 +-rw-r--r-- 1 506 450 1273 Jul 05 22:59 8.1.0155 +-rw-r--r-- 1 506 450 1574 Jul 06 23:12 8.1.0156 +-rw-r--r-- 1 506 450 2144 Jul 06 23:12 8.1.0157 +-rw-r--r-- 1 506 450 1647 Jul 07 16:19 8.1.0158 +-rw-r--r-- 1 506 450 2569 Jul 07 16:41 8.1.0159 +-rw-r--r-- 1 506 450 1361 Jul 07 17:22 8.1.0160 +-rw-r--r-- 1 506 450 3923 Jul 07 18:34 8.1.0161 +-rw-r--r-- 1 506 450 6881 Jul 07 22:42 8.1.0162 +-rw-r--r-- 1 506 450 6408 Jul 07 22:42 8.1.0163 +-rw-r--r-- 1 506 450 2724 Jul 07 23:08 8.1.0164 +-rw-r--r-- 1 506 450 3898 Jul 08 16:01 8.1.0165 +-rw-r--r-- 1 506 450 38155 Jul 08 16:51 8.1.0166 +-rw-r--r-- 1 506 450 5740 Jul 08 17:19 8.1.0167 +-rw-r--r-- 1 506 450 4177 Jul 08 17:58 8.1.0168 +-rw-r--r-- 1 506 450 4184 Jul 08 18:20 8.1.0169 +-rw-r--r-- 1 506 450 9933 Jul 08 19:07 8.1.0170 +-rw-r--r-- 1 506 450 3250 Jul 08 20:49 8.1.0171 +-rw-r--r-- 1 506 450 1771 Jul 08 21:47 8.1.0172 +-rw-r--r-- 1 506 450 1429 Jul 09 20:40 8.1.0173 +-rw-r--r-- 1 506 450 3944 Jul 10 15:07 8.1.0174 +-rw-r--r-- 1 506 450 1934 Jul 10 15:23 8.1.0175 +-rw-r--r-- 1 506 450 1599 Jul 10 17:35 8.1.0176 +-rw-r--r-- 1 506 450 4584 Jul 10 19:39 8.1.0177 +-rw-r--r-- 1 506 450 1431 Jul 24 04:15 8.1.0178 +-rw-r--r-- 1 506 450 1857 Jul 13 18:14 8.1.0179 +-rw-r--r-- 1 506 450 4435 Jul 13 22:11 8.1.0180 +-rw-r--r-- 1 506 450 1921 Jul 14 17:25 8.1.0181 +-rw-r--r-- 1 506 450 9703 Jul 14 19:31 8.1.0182 +-rw-r--r-- 1 506 450 3966 Jul 14 21:42 8.1.0183 +-rw-r--r-- 1 506 450 4488 Jul 14 21:42 8.1.0184 +-rw-r--r-- 1 506 450 4643 Jul 14 21:49 8.1.0185 +-rw-r--r-- 1 506 450 2592 Jul 14 22:24 8.1.0186 +-rw-r--r-- 1 506 450 9073 Jul 15 17:01 8.1.0187 +-rw-r--r-- 1 506 450 1963 Jul 15 17:36 8.1.0188 +-rw-r--r-- 1 506 450 1688 Jul 15 20:26 8.1.0189 +-rw-r--r-- 1 506 450 6411 Jul 16 17:48 8.1.0190 +-rw-r--r-- 1 506 450 1565 Jul 16 18:11 8.1.0191 +-rw-r--r-- 1 506 450 112175 Jul 17 05:45 8.1.0192 +-rw-r--r-- 1 506 450 1805 Jul 17 05:56 8.1.0193 +-rw-r--r-- 1 506 450 2862 Jul 18 06:04 8.1.0194 +-rw-r--r-- 1 506 450 1809 Jul 19 03:08 8.1.0195 +-rw-r--r-- 1 506 450 2085 Jul 19 04:14 8.1.0196 +-rw-r--r-- 1 506 450 2341 Jul 20 05:08 8.1.0197 +-rw-r--r-- 1 506 450 2382 Jul 20 20:26 8.1.0198 +-rw-r--r-- 1 506 450 1487 Jul 20 20:29 8.1.0199 +-rw-r--r-- 1 506 450 3017 Jul 20 23:38 8.1.0200 +-rw-r--r-- 1 506 450 11749 Jul 22 04:31 8.1.0201 +-rw-r--r-- 1 506 450 2036 Jul 22 05:10 8.1.0202 +-rw-r--r-- 1 506 450 3913 Jul 22 07:33 8.1.0203 +-rw-r--r-- 1 506 450 2093 Jul 22 19:39 8.1.0204 +-rw-r--r-- 1 506 450 6691 Jul 23 04:12 8.1.0205 +-rw-r--r-- 1 506 450 2828 Jul 23 04:50 8.1.0206 +-rw-r--r-- 1 506 450 2260 Jul 23 05:10 8.1.0207 +-rw-r--r-- 1 506 450 1379 Jul 24 04:55 8.1.0208 +-rw-r--r-- 1 506 450 3024 Jul 24 05:43 8.1.0209 +-rw-r--r-- 1 506 450 2831 Jul 25 19:50 8.1.0210 +-rw-r--r-- 1 506 450 7061 Jul 25 21:19 8.1.0211 +-rw-r--r-- 1 506 450 7545 Jul 25 22:03 8.1.0212 +-rw-r--r-- 1 506 450 5556 Jul 25 22:37 8.1.0213 +-rw-r--r-- 1 506 450 1925 Jul 27 22:09 8.1.0214 +-rw-r--r-- 1 506 450 2582 Jul 27 22:35 8.1.0215 +-rw-r--r-- 1 506 450 2392 Jul 27 23:18 8.1.0216 +-rw-r--r-- 1 506 450 2403 Jul 28 16:14 8.1.0217 +-rw-r--r-- 1 506 450 6928 Jul 28 16:56 8.1.0218 +-rw-r--r-- 1 506 450 1963 Jul 28 17:08 8.1.0219 +-rw-r--r-- 1 506 450 2311 Jul 28 17:18 8.1.0220 +-rw-r--r-- 1 506 450 14127 Jul 28 17:29 8.1.0221 +-rw-r--r-- 1 506 450 5102 Jul 28 18:17 8.1.0222 +-rw-r--r-- 1 506 450 4387 Jul 28 19:20 8.1.0223 +-rw-r--r-- 1 506 450 3118 Jul 28 23:12 8.1.0224 +-rw-r--r-- 1 506 450 5657 Jul 29 15:35 8.1.0225 +-rw-r--r-- 1 506 450 28724 Jul 29 16:09 8.1.0226 +-rw-r--r-- 1 506 450 1700 Jul 29 16:13 8.1.0227 +-rw-r--r-- 1 506 450 15828 Jul 29 17:36 8.1.0228 +-rw-r--r-- 1 506 450 3254 Jul 29 17:41 8.1.0229 +-rw-r--r-- 1 506 450 4212 Aug 01 17:56 8.1.0230 +-rw-r--r-- 1 506 450 3398 Aug 01 18:03 8.1.0231 +-rw-r--r-- 1 506 450 6091 Aug 01 18:42 8.1.0232 +-rw-r--r-- 1 506 450 9163 Aug 01 19:06 8.1.0233 +-rw-r--r-- 1 506 450 4813 Aug 02 21:47 8.1.0234 +-rw-r--r-- 1 506 450 6005 Aug 02 22:24 8.1.0235 +-rw-r--r-- 1 506 450 3812 Aug 03 22:03 8.1.0236 +-rw-r--r-- 1 506 450 2407 Aug 04 15:14 8.1.0237 +-rw-r--r-- 1 506 450 2455 Aug 04 16:54 8.1.0238 +-rw-r--r-- 1 506 450 3139 Aug 04 17:25 8.1.0239 +-rw-r--r-- 1 506 450 1835 Aug 05 13:22 8.1.0240 +-rw-r--r-- 1 506 450 1779 Aug 07 13:15 8.1.0241 +-rw-r--r-- 1 506 450 2127 Aug 07 14:55 8.1.0242 +-rw-r--r-- 1 506 450 3046 Aug 07 16:33 8.1.0243 +-rw-r--r-- 1 506 450 6049 Aug 07 17:39 8.1.0244 +-rw-r--r-- 1 506 450 3316 Aug 07 19:05 8.1.0245 +-rw-r--r-- 1 506 450 1756 Aug 07 19:33 8.1.0246 +-rw-r--r-- 1 506 450 8011 Aug 07 19:45 8.1.0247 +-rw-r--r-- 1 506 450 4314 Aug 07 19:48 8.1.0248 +-rw-r--r-- 1 506 450 2789 Aug 07 20:02 8.1.0249 +-rw-r--r-- 1 506 450 3230 Aug 07 20:48 8.1.0250 +-rw-r--r-- 1 506 450 12239 Aug 07 21:40 8.1.0251 +-rw-r--r-- 1 506 450 41015 Aug 07 21:55 8.1.0252 +-rw-r--r-- 1 506 450 14504 Aug 07 22:32 8.1.0253 +-rw-r--r-- 1 506 450 2428 Aug 07 22:43 8.1.0254 +-rw-r--r-- 1 506 450 2310 Aug 08 22:09 8.1.0255 +-rw-r--r-- 1 506 450 8885 Aug 08 22:09 8.1.0256 +-rw-r--r-- 1 506 450 2084 Aug 08 22:28 8.1.0257 +-rw-r--r-- 1 506 450 1854 Aug 08 22:56 8.1.0258 +-rw-r--r-- 1 506 450 4897 Aug 09 21:19 8.1.0259 +-rw-r--r-- 1 506 450 1783 Aug 09 21:34 8.1.0260 +-rw-r--r-- 1 506 450 4958 Aug 09 21:52 8.1.0261 +-rw-r--r-- 1 506 450 3052 Aug 09 22:09 8.1.0262 +-rw-r--r-- 1 506 450 3417 Aug 09 22:16 8.1.0263 +-rw-r--r-- 1 506 450 3278 Aug 09 22:27 8.1.0264 +-rw-r--r-- 1 506 450 23576 Aug 10 22:08 8.1.0265 +-rw-r--r-- 1 506 450 10962 Aug 10 23:14 8.1.0266 +-rw-r--r-- 1 506 450 3831 Aug 11 13:37 8.1.0267 +-rw-r--r-- 1 506 450 10135 Aug 11 13:57 8.1.0268 +-rw-r--r-- 1 506 450 3772 Aug 11 14:24 8.1.0269 +-rw-r--r-- 1 506 450 1866 Aug 11 14:42 8.1.0270 +-rw-r--r-- 1 506 450 13097 Aug 11 16:41 8.1.0271 +-rw-r--r-- 1 506 450 1723 Aug 11 17:53 8.1.0272 +-rw-r--r-- 1 506 450 1470 Aug 11 19:03 8.1.0273 +-rw-r--r-- 1 506 450 4628 Aug 12 15:50 8.1.0274 +-rw-r--r-- 1 506 450 4964 Aug 12 15:50 8.1.0275 +-rw-r--r-- 1 506 450 2991 Aug 12 16:27 8.1.0276 +-rw-r--r-- 1 506 450 9021 Aug 12 17:39 8.1.0277 +-rw-r--r-- 1 506 450 2988 Aug 12 21:54 8.1.0278 +-rw-r--r-- 1 506 450 3306 Aug 12 22:03 8.1.0279 +-rw-r--r-- 1 506 450 2293 Aug 13 22:55 8.1.0280 +-rw-r--r-- 1 506 450 19659 Aug 14 13:38 8.1.0281 +-rw-r--r-- 1 506 450 14174 Aug 14 16:06 8.1.0282 +-rw-r--r-- 1 506 450 1846 Aug 14 17:29 8.1.0283 +-rw-r--r-- 1 506 450 3774 Aug 14 18:17 8.1.0284 +-rw-r--r-- 1 506 450 1416 Aug 14 20:18 8.1.0285 +-rw-r--r-- 1 506 450 3285 Aug 14 21:32 8.1.0286 +-rw-r--r-- 1 506 450 1772 Aug 14 22:08 8.1.0287 +-rw-r--r-- 1 506 450 12170 Aug 15 22:24 8.1.0288 +-rw-r--r-- 1 506 450 2018 Aug 16 22:29 8.1.0289 +-rw-r--r-- 1 506 450 2722 Aug 16 22:29 8.1.0290 +-rw-r--r-- 1 506 450 4355 Aug 18 16:20 8.1.0291 +-rw-r--r-- 1 506 450 2120 Aug 18 19:13 8.1.0292 +-rw-r--r-- 1 506 450 5483 Aug 18 20:00 8.1.0293 +-rw-r--r-- 1 506 450 2332 Aug 18 20:20 8.1.0294 +-rw-r--r-- 1 506 450 9332 Aug 18 21:14 8.1.0295 +-rw-r--r-- 1 506 450 8125 Aug 18 21:23 8.1.0296 +-rw-r--r-- 1 506 450 2733 Aug 19 14:40 8.1.0297 +-rw-r--r-- 1 506 450 1475 Aug 19 16:10 8.1.0298 +-rw-r--r-- 1 506 450 1657 Aug 19 17:04 8.1.0299 +-rw-r--r-- 1 506 450 2295 Aug 19 22:21 8.1.0300 +-rw-r--r-- 1 506 450 8790 Aug 19 22:59 8.1.0301 +-rw-r--r-- 1 506 450 6061 Aug 20 21:59 8.1.0302 +-rw-r--r-- 1 506 450 2912 Aug 20 22:53 8.1.0303 +-rw-r--r-- 1 506 450 9124 Aug 21 13:09 8.1.0304 +-rw-r--r-- 1 506 450 3073 Aug 21 14:24 8.1.0305 +-rw-r--r-- 1 506 450 14029 Aug 21 15:12 8.1.0306 +-rw-r--r-- 1 506 450 6949 Aug 21 16:57 8.1.0307 +-rw-r--r-- 1 506 450 1720 Aug 21 17:08 8.1.0308 +-rw-r--r-- 1 506 450 18244 Aug 21 17:50 8.1.0309 +-rw-r--r-- 1 506 450 3277 Aug 21 18:50 8.1.0310 +-rw-r--r-- 1 506 450 4009 Aug 21 19:22 8.1.0311 +-rw-r--r-- 1 506 450 7961 Aug 21 19:48 8.1.0312 +-rw-r--r-- 1 506 450 7881 Aug 21 20:29 8.1.0313 +-rw-r--r-- 1 506 450 5176 Aug 21 21:20 8.1.0314 +-rw-r--r-- 1 506 450 6290 Aug 21 21:58 8.1.0315 +-rw-r--r-- 1 506 450 2195 Aug 22 11:28 8.1.0316 +-rw-r--r-- 1 506 450 2110 Aug 22 20:06 8.1.0317 +-rw-r--r-- 1 506 450 3126 Aug 22 20:16 8.1.0318 +-rw-r--r-- 1 506 450 1642 Aug 22 21:57 8.1.0319 +-rw-r--r-- 1 506 450 4447 Aug 22 23:04 8.1.0320 +-rw-r--r-- 1 506 450 4558 Aug 23 20:56 8.1.0321 +-rw-r--r-- 1 506 450 3868 Aug 23 22:21 8.1.0322 +-rw-r--r-- 1 506 450 2305 Aug 23 22:39 8.1.0323 +-rw-r--r-- 1 506 450 1492 Aug 23 22:52 8.1.0324 +-rw-r--r-- 1 506 450 2183 Aug 23 23:01 8.1.0325 +-rw-r--r-- 1 506 450 4926 Aug 24 21:31 8.1.0326 +-rw-r--r-- 1 506 450 4900 Aug 24 22:08 8.1.0327 +-rw-r--r-- 1 506 450 4775 Aug 26 21:23 8.1.0328 +-rw-r--r-- 1 506 450 1872 Aug 27 23:24 8.1.0329 +-rw-r--r-- 1 506 450 6219 Aug 28 22:08 8.1.0330 +-rw-r--r-- 1 506 450 3811 Aug 28 22:20 8.1.0331 +-rw-r--r-- 1 506 450 1940 Aug 29 21:43 8.1.0332 +-rw-r--r-- 1 506 450 5951 Aug 29 21:43 8.1.0333 +-rw-r--r-- 1 506 450 3122 Aug 30 13:07 8.1.0334 +-rw-r--r-- 1 506 450 1780 Aug 30 14:05 8.1.0335 +-rw-r--r-- 1 506 450 3139 Aug 30 14:16 8.1.0336 +-rw-r--r-- 1 506 450 3531 Aug 30 15:59 8.1.0337 +-rw-r--r-- 1 506 450 5890 Aug 30 17:47 8.1.0338 +-rw-r--r-- 1 506 450 3237 Aug 31 22:10 8.1.0339 +-rw-r--r-- 1 506 450 2219 Aug 31 22:27 8.1.0340 +-rw-r--r-- 1 506 450 8417 Aug 31 23:07 8.1.0341 +-rw-r--r-- 1 506 450 6555 Sep 01 15:30 8.1.0342 +-rw-r--r-- 1 506 450 1636 Sep 02 14:25 8.1.0343 +-rw-r--r-- 1 506 450 2422 Sep 02 15:07 8.1.0344 +-rw-r--r-- 1 506 450 10052 Sep 02 15:19 8.1.0345 +-rw-r--r-- 1 506 450 57731 Sep 02 15:27 8.1.0346 +-rw-r--r-- 1 506 450 5485 Sep 05 22:26 8.1.0347 +-rw-r--r-- 1 506 450 4181 Sep 05 22:26 8.1.0348 +-rw-r--r-- 1 506 450 5581 Sep 06 13:16 8.1.0349 +-rw-r--r-- 1 506 450 6919 Sep 06 16:27 8.1.0350 +-rw-r--r-- 1 506 450 5206 Sep 06 21:44 8.1.0351 +-rw-r--r-- 1 506 450 8073 Sep 08 15:11 8.1.0352 +-rw-r--r-- 1 506 450 8839 Sep 08 18:21 8.1.0353 +-rw-r--r-- 1 506 450 2279 Sep 08 19:13 8.1.0354 +-rw-r--r-- 1 506 450 3168 Sep 09 15:29 8.1.0355 +-rw-r--r-- 1 506 450 6409 Sep 09 15:55 8.1.0356 +-rw-r--r-- 1 506 450 4016 Sep 09 15:56 8.1.0357 +-rw-r--r-- 1 506 450 1607 Sep 09 19:56 8.1.0358 +-rw-r--r-- 1 506 450 3072 Sep 09 22:03 8.1.0359 +-rw-r--r-- 1 506 450 237081 Sep 10 19:04 8.1.0360 +-rw-r--r-- 1 506 450 4571 Sep 10 19:04 8.1.0361 +-rw-r--r-- 1 506 450 227344 Sep 10 21:16 8.1.0362 +-rw-r--r-- 1 506 450 2800 Sep 10 21:16 8.1.0363 +-rw-r--r-- 1 506 450 2130 Sep 10 21:22 8.1.0364 +-rw-r--r-- 1 506 450 28602 Sep 10 22:04 8.1.0365 +-rw-r--r-- 1 506 450 3826 Sep 10 22:19 8.1.0366 +-rw-r--r-- 1 506 450 1749 Sep 11 20:11 8.1.0367 +-rw-r--r-- 1 506 450 20303 Sep 11 21:30 8.1.0368 +-rw-r--r-- 1 506 450 9213 Sep 11 22:46 8.1.0369 +-rw-r--r-- 1 506 450 1651 Sep 12 18:34 8.1.0370 +-rw-r--r-- 1 506 450 6298 Sep 12 20:29 8.1.0371 +-rw-r--r-- 1 506 450 5591 Sep 12 21:52 8.1.0372 +-rw-r--r-- 1 506 450 1768 Sep 12 22:27 8.1.0373 +-rw-r--r-- 1 506 450 19602 Sep 12 23:16 8.1.0374 +-rw-r--r-- 1 506 450 2197 Sep 13 13:03 8.1.0375 +-rw-r--r-- 1 506 450 2133 Sep 13 14:58 8.1.0376 +-rw-r--r-- 1 506 450 21413 Sep 13 15:34 8.1.0377 +-rw-r--r-- 1 506 450 2048 Sep 13 15:59 8.1.0378 +-rw-r--r-- 1 506 450 125615 Sep 13 17:33 8.1.0379 +-rw-r--r-- 1 506 450 6840 Sep 13 17:33 8.1.0380 +-rw-r--r-- 1 506 450 1858 Sep 13 17:33 8.1.0381 +-rw-r--r-- 1 506 450 9705 Sep 13 18:02 8.1.0382 +-rw-r--r-- 1 506 450 1782 Sep 13 18:06 8.1.0383 +-rw-r--r-- 1 506 450 5127 Sep 13 18:33 8.1.0384 +-rw-r--r-- 1 506 450 2742 Sep 13 19:05 8.1.0385 +-rw-r--r-- 1 506 450 5812 Sep 13 20:32 8.1.0386 +-rw-r--r-- 1 506 450 2071 Sep 13 20:47 8.1.0387 +-rw-r--r-- 1 506 450 1579 Sep 13 21:30 8.1.0388 +-rw-r--r-- 1 506 450 2651 Sep 14 20:11 8.1.0389 +-rw-r--r-- 1 506 450 6076 Sep 14 21:27 8.1.0390 +-rw-r--r-- 1 506 450 2344 Sep 15 15:09 8.1.0391 +-rw-r--r-- 1 506 450 9049 Sep 15 15:43 8.1.0392 +-rw-r--r-- 1 506 450 27803 Sep 15 19:18 8.1.0393 +-rw-r--r-- 1 506 450 6228 Sep 16 14:11 8.1.0394 +-rw-r--r-- 1 506 450 1672 Sep 16 14:52 8.1.0395 +-rw-r--r-- 1 506 450 1768 Sep 16 15:15 8.1.0396 +-rw-r--r-- 1 506 450 15721 Sep 16 15:48 8.1.0397 +-rw-r--r-- 1 506 450 4360 Sep 16 16:28 8.1.0398 +-rw-r--r-- 1 506 450 8813 Sep 16 17:08 8.1.0399 +-rw-r--r-- 1 506 450 2686 Sep 16 18:11 8.1.0400 +-rw-r--r-- 1 506 450 8652 Sep 16 18:47 8.1.0401 +-rw-r--r-- 1 506 450 5092 Sep 18 21:21 8.1.0402 +-rw-r--r-- 1 506 450 1357 Sep 18 21:42 8.1.0403 +-rw-r--r-- 1 506 450 2233 Sep 18 21:54 8.1.0404 +-rw-r--r-- 1 506 450 68527 Sep 18 22:30 8.1.0405 +-rw-r--r-- 1 506 450 4335 Sep 18 22:38 8.1.0406 +-rw-r--r-- 1 506 450 33033 Sep 18 22:51 8.1.0407 +-rw-r--r-- 1 506 450 7190 Sep 18 22:59 8.1.0408 +-rw-r--r-- 1 506 450 3554 Sep 19 21:07 8.1.0409 +-rw-r--r-- 1 506 450 8456 Sep 19 21:56 8.1.0410 +-rw-r--r-- 1 506 450 1570 Sep 19 22:01 8.1.0411 +-rw-r--r-- 1 506 450 2839 Sep 19 22:40 8.1.0412 +-rw-r--r-- 1 506 450 2486 Sep 20 21:40 8.1.0413 +-rw-r--r-- 1 506 450 3066 Sep 21 12:00 8.1.0414 +-rw-r--r-- 1 506 450 4556 Sep 21 12:24 8.1.0415 +-rw-r--r-- 1 506 450 2741 Sep 21 12:47 8.1.0416 +-rw-r--r-- 1 506 450 4674 Sep 21 12:54 8.1.0417 +-rw-r--r-- 1 506 450 2249 Sep 21 13:44 8.1.0418 +-rw-r--r-- 1 506 450 1921 Sep 21 13:57 8.1.0419 +-rw-r--r-- 1 506 450 2056 Sep 21 14:02 8.1.0420 +-rw-r--r-- 1 506 450 2776 Sep 21 14:32 8.1.0421 +-rw-r--r-- 1 506 450 1647 Sep 21 14:43 8.1.0422 +-rw-r--r-- 1 506 450 2704 Sep 21 14:49 8.1.0423 +-rw-r--r-- 1 506 450 3886 Sep 21 16:39 8.1.0424 +-rw-r--r-- 1 506 450 2891 Sep 21 17:01 8.1.0425 +-rw-r--r-- 1 506 450 2598 Sep 22 14:41 8.1.0426 +-rw-r--r-- 1 506 450 2361 Sep 22 14:41 8.1.0427 +-rw-r--r-- 1 506 450 3757 Sep 22 21:39 8.1.0428 +-rw-r--r-- 1 506 450 1649 Sep 23 19:37 8.1.0429 +-rw-r--r-- 1 506 450 1332 Sep 24 21:32 8.1.0430 +-rw-r--r-- 1 506 450 15030 Sep 24 21:51 8.1.0431 +-rw-r--r-- 1 506 450 1645 Sep 25 19:00 8.1.0432 +-rw-r--r-- 1 506 450 2241 Sep 25 20:49 8.1.0433 +-rw-r--r-- 1 506 450 9471 Sep 25 22:08 8.1.0434 +-rw-r--r-- 1 506 450 2271 Sep 25 22:18 8.1.0435 +-rw-r--r-- 1 506 450 2471 Sep 25 22:28 8.1.0436 +-rw-r--r-- 1 506 450 2119 Sep 28 22:31 8.1.0437 +-rw-r--r-- 1 506 450 9235 Sep 28 23:11 8.1.0438 +-rw-r--r-- 1 506 450 16394 Sep 30 17:14 8.1.0439 +-rw-r--r-- 1 506 450 2960 Sep 30 17:16 8.1.0440 +-rw-r--r-- 1 506 450 1734 Sep 30 17:45 8.1.0441 +-rw-r--r-- 1 506 450 1685 Sep 30 18:22 8.1.0442 +-rw-r--r-- 1 506 450 108558 Sep 30 21:43 8.1.0443 +-rw-r--r-- 1 506 450 1546 Oct 02 14:15 8.1.0444 +-rw-r--r-- 1 506 450 9270 Oct 02 14:45 8.1.0445 +-rw-r--r-- 1 506 450 1447 Oct 02 15:07 8.1.0446 +-rw-r--r-- 1 506 450 4197 Oct 02 16:24 8.1.0447 +-rw-r--r-- 1 506 450 12315 Oct 02 18:26 8.1.0448 +-rw-r--r-- 1 506 450 6929 Oct 02 21:21 8.1.0449 +-rw-r--r-- 1 506 450 2060 Oct 02 21:49 8.1.0450 +-rw-r--r-- 1 506 450 6235 Oct 03 22:23 8.1.0451 +-rw-r--r-- 1 506 450 3847 Oct 06 15:03 8.1.0452 +-rw-r--r-- 1 506 450 3698 Oct 06 15:19 8.1.0453 +-rw-r--r-- 1 506 450 3104 Oct 06 15:43 8.1.0454 +-rw-r--r-- 1 506 450 6496 Oct 07 14:39 8.1.0455 +-rw-r--r-- 1 506 450 3080 Oct 07 15:42 8.1.0456 +-rw-r--r-- 1 506 450 7330 Oct 07 15:50 8.1.0457 +-rw-r--r-- 1 506 450 2997 Oct 07 17:47 8.1.0458 +-rw-r--r-- 1 506 450 1582 Oct 07 18:43 8.1.0459 +-rw-r--r-- 1 506 450 3900 Oct 07 20:26 8.1.0460 +-rw-r--r-- 1 506 450 130449 Oct 07 20:26 8.1.0461 +-rw-r--r-- 1 506 450 2953 Oct 07 20:35 8.1.0462 +-rw-r--r-- 1 506 450 2527 Oct 07 20:49 8.1.0463 +-rw-r--r-- 1 506 450 2848 Oct 07 21:37 8.1.0464 +-rw-r--r-- 1 506 450 1671 Oct 07 22:47 8.1.0465 +-rw-r--r-- 1 506 450 7829 Oct 07 23:17 8.1.0466 +-rw-r--r-- 1 506 450 3658 Oct 08 20:08 8.1.0467 +-rw-r--r-- 1 506 450 3212 Oct 09 21:50 8.1.0468 +-rw-r--r-- 1 506 450 19665 Oct 11 17:39 8.1.0469 +-rw-r--r-- 1 506 450 10852 Oct 11 19:28 8.1.0470 +-rw-r--r-- 1 506 450 3488 Oct 12 22:15 8.1.0471 +-rw-r--r-- 1 506 450 9221 Oct 13 17:26 8.1.0472 +-rw-r--r-- 1 506 450 2574 Oct 13 19:07 8.1.0473 +-rw-r--r-- 1 506 450 5110 Oct 14 16:25 8.1.0474 +-rw-r--r-- 1 506 450 15480 Oct 14 21:41 8.1.0475 +-rw-r--r-- 1 506 450 3035 Oct 14 22:04 8.1.0476 +-rw-r--r-- 1 506 450 1255 Oct 14 22:38 8.1.0477 +-rw-r--r-- 1 506 450 1704 Oct 19 16:54 8.1.0478 +-rw-r--r-- 1 506 450 4319 Oct 15 22:52 8.1.0479 +-rw-r--r-- 1 506 450 2299 Oct 19 16:54 8.1.0480 +-rw-r--r-- 1 506 450 2186 Oct 16 22:14 8.1.0481 +-rw-r--r-- 1 506 450 2192 Oct 19 16:54 8.1.0482 +-rw-r--r-- 1 506 450 2806 Oct 17 22:46 8.1.0483 +-rw-r--r-- 1 506 450 8349 Oct 19 16:54 8.1.0484 +-rw-r--r-- 1 506 450 2921 Oct 19 16:54 8.1.0485 +-rw-r--r-- 1 506 450 1842 Oct 19 17:37 8.1.0486 +-rw-r--r-- 1 506 450 39192 Oct 19 22:37 8.1.0487 +-rw-r--r-- 1 506 450 15995 Oct 20 20:54 8.1.0488 +-rw-r--r-- 1 506 450 5140 Oct 21 18:48 8.1.0489 +-rw-r--r-- 1 506 450 4061 Oct 21 22:46 8.1.0490 +-rw-r--r-- 1 506 450 1640 Oct 23 21:43 8.1.0491 +-rw-r--r-- 1 506 450 3142 Oct 25 11:26 8.1.0492 +-rw-r--r-- 1 506 450 13964 Oct 25 13:32 8.1.0493 +-rw-r--r-- 1 506 450 3977 Oct 25 13:32 8.1.0494 +-rw-r--r-- 1 506 450 7883 Oct 25 13:32 8.1.0495 +-rw-r--r-- 1 506 450 11218 Oct 25 16:54 8.1.0496 +-rw-r--r-- 1 506 450 3122 Oct 25 17:52 8.1.0497 +-rw-r--r-- 1 506 450 3486 Oct 27 14:27 8.1.0498 +-rw-r--r-- 1 506 450 4415 Oct 28 14:36 8.1.0499 +-rw-r--r-- 1 506 450 1549 Oct 28 15:44 8.1.0500 +-rw-r--r-- 1 506 450 1823 Oct 30 22:17 8.1.0501 +-rw-r--r-- 1 506 450 5075 Oct 31 23:10 8.1.0502 +-rw-r--r-- 1 506 450 1854 Nov 01 21:15 8.1.0503 +-rw-r--r-- 1 506 450 3277 Nov 02 11:59 8.1.0504 +-rw-r--r-- 1 506 450 1858 Nov 03 19:00 8.1.0505 +-rw-r--r-- 1 506 450 1836 Nov 03 19:07 8.1.0506 +-rw-r--r-- 1 506 450 3054 Nov 03 19:52 8.1.0507 +-rw-r--r-- 1 506 450 3099 Nov 03 21:10 8.1.0508 +-rw-r--r-- 1 506 450 2311 Nov 03 21:47 8.1.0509 +-rw-r--r-- 1 506 450 2146 Nov 04 14:41 8.1.0510 +-rw-r--r-- 1 506 450 2370 Nov 04 23:40 8.1.0511 +-rw-r--r-- 1 506 450 2387 Nov 05 20:26 8.1.0512 +-rw-r--r-- 1 506 450 2564 Nov 05 21:22 8.1.0513 +-rw-r--r-- 1 506 450 26020 Nov 10 16:16 8.1.0514 +-rw-r--r-- 1 506 450 8965 Nov 10 17:33 8.1.0515 +-rw-r--r-- 1 506 450 4755 Nov 10 18:55 8.1.0516 +-rw-r--r-- 1 506 450 1951 Nov 10 20:29 8.1.0517 +-rw-r--r-- 1 506 450 2801 Nov 10 20:48 8.1.0518 +-rw-r--r-- 1 506 450 23694 Nov 11 15:21 8.1.0519 +-rw-r--r-- 1 506 450 1717 Nov 11 18:52 8.1.0520 +-rw-r--r-- 1 506 450 1657 Nov 11 21:23 8.1.0521 +-rw-r--r-- 1 506 450 2564 Nov 11 22:19 8.1.0522 +-rw-r--r-- 1 506 450 12244 Nov 11 22:51 8.1.0523 +-rw-r--r-- 1 506 450 2080 Nov 11 23:15 8.1.0524 +-rw-r--r-- 1 506 450 3553 Nov 12 21:43 8.1.0525 +-rw-r--r-- 1 506 450 1694 Nov 12 21:45 8.1.0526 +-rw-r--r-- 1 506 450 1727 Nov 14 21:46 8.1.0527 +-rw-r--r-- 1 506 450 27062 Nov 16 16:22 8.1.0528 +-rw-r--r-- 1 506 450 3431 Nov 16 16:52 8.1.0529 +-rw-r--r-- 1 506 450 3468 Nov 16 17:46 8.1.0530 +-rw-r--r-- 1 506 450 2564 Nov 16 18:23 8.1.0531 +-rw-r--r-- 1 506 450 10477 Nov 16 18:46 8.1.0532 +-rw-r--r-- 1 506 450 1607 Nov 16 18:50 8.1.0533 +-rw-r--r-- 1 506 450 10454 Nov 16 19:40 8.1.0534 +-rw-r--r-- 1 506 450 2589 Nov 16 20:55 8.1.0535 +-rw-r--r-- 1 506 450 2944 Nov 18 12:26 8.1.0536 +-rw-r--r-- 1 506 450 2151 Nov 20 02:54 8.1.0537 +-rw-r--r-- 1 506 450 1629 Nov 20 04:26 8.1.0538 +-rw-r--r-- 1 506 450 3595 Nov 20 13:34 8.1.0539 +-rw-r--r-- 1 506 450 3752 Nov 21 14:03 8.1.0540 +-rw-r--r-- 1 506 450 2844 Nov 21 14:03 8.1.0541 +-rw-r--r-- 1 506 450 13399 Nov 22 12:28 8.1.0542 +-rw-r--r-- 1 506 450 2020 Nov 24 14:29 8.1.0543 +-rw-r--r-- 1 506 450 13034 Nov 25 02:19 8.1.0544 +-rw-r--r-- 1 506 450 2290 Nov 25 04:09 8.1.0545 +-rw-r--r-- 1 506 450 1370 Nov 25 04:31 8.1.0546 +-rw-r--r-- 1 506 450 1459 Nov 25 05:12 8.1.0547 +-rw-r--r-- 1 506 450 1682 Nov 26 21:19 8.1.0548 +-rw-r--r-- 1 506 450 3892 Nov 26 21:22 8.1.0549 +-rw-r--r-- 1 506 450 3590 Nov 28 20:39 8.1.0550 +-rw-r--r-- 1 506 450 2045 Nov 28 21:21 8.1.0551 +-rw-r--r-- 1 506 450 3711 Nov 30 21:58 8.1.0552 +-rw-r--r-- 1 506 450 6225 Nov 30 22:40 8.1.0553 +-rw-r--r-- 1 506 450 4062 Dec 01 12:03 8.1.0554 +-rw-r--r-- 1 506 450 2343 Dec 01 13:15 8.1.0555 +-rw-r--r-- 1 506 450 3947 Dec 01 21:08 8.1.0556 +-rw-r--r-- 1 506 450 16010 Dec 02 14:04 8.1.0557 +-rw-r--r-- 1 506 450 7059 Dec 02 14:04 8.1.0558 +-rw-r--r-- 1 506 450 3535 Dec 02 14:55 8.1.0559 +-rw-r--r-- 1 506 450 4527 Dec 02 18:22 8.1.0560 +-rw-r--r-- 1 506 450 1987 Dec 03 21:38 8.1.0561 +-rw-r--r-- 1 506 450 7029 Dec 04 22:25 8.1.0562 +-rw-r--r-- 1 506 450 1734 Dec 04 22:38 8.1.0563 +-rw-r--r-- 1 506 450 2097 Dec 05 18:44 8.1.0564 +-rw-r--r-- 1 506 450 1779 Dec 05 19:46 8.1.0565 +-rw-r--r-- 1 506 450 2201 Dec 07 14:19 8.1.0566 +-rw-r--r-- 1 506 450 1986 Dec 07 14:41 8.1.0567 +-rw-r--r-- 1 506 450 2214 Dec 07 14:42 8.1.0568 +-rw-r--r-- 1 506 450 3027 Dec 07 16:38 8.1.0569 +-rw-r--r-- 1 506 450 4021 Dec 07 21:09 8.1.0570 +-rw-r--r-- 1 506 450 3527 Dec 08 14:46 8.1.0571 +-rw-r--r-- 1 506 450 2180 Dec 08 14:53 8.1.0572 +-rw-r--r-- 1 506 450 9154 Dec 08 16:05 8.1.0573 +-rw-r--r-- 1 506 450 3955 Dec 09 15:01 8.1.0574 +-rw-r--r-- 1 506 450 10330 Dec 09 15:53 8.1.0575 +-rw-r--r-- 1 506 450 2167 Dec 10 21:37 8.1.0576 +-rw-r--r-- 1 506 450 5482 Dec 11 20:40 8.1.0577 +-rw-r--r-- 1 506 450 8465 Dec 12 20:35 8.1.0578 +-rw-r--r-- 1 506 450 74440 Dec 13 22:21 8.1.0579 +-rw-r--r-- 1 506 450 24897 Dec 13 22:21 MD5SUMS +-rw-r--r-- 1 506 450 36772 Dec 13 22:21 README diff --git a/data/vim/patches/8.1.0214 b/data/vim/patches/8.1.0214 new file mode 100644 index 000000000..6b67d1454 --- /dev/null +++ b/data/vim/patches/8.1.0214 @@ -0,0 +1,66 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0214 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0214 +Problem: +autochdir feature not reported by has() or :version. +Solution: Add the feature in the list. +Files: src/evalfunc.c, src/version.c + + +*** ../vim-8.1.0213/src/evalfunc.c 2018-07-25 21:19:09.363656976 +0200 +--- src/evalfunc.c 2018-07-27 22:01:31.050713281 +0200 +*************** +*** 6045,6050 **** +--- 6045,6053 ---- + "arabic", + #endif + "autocmd", ++ #ifdef FEAT_AUTOCHDIR ++ "autochdir", ++ #endif + #ifdef FEAT_AUTOSERVERNAME + "autoservername", + #endif +*** ../vim-8.1.0213/src/version.c 2018-07-25 22:36:48.991518559 +0200 +--- src/version.c 2018-07-27 22:04:16.085747831 +0200 +*************** +*** 101,106 **** +--- 101,111 ---- + "-arabic", + #endif + "+autocmd", ++ #ifdef FEAT_AUTOCHDIR ++ "+autochdir", ++ #else ++ "-autochdir", ++ #endif + #ifdef FEAT_AUTOSERVERNAME + "+autoservername", + #else +*** ../vim-8.1.0213/src/version.c 2018-07-25 22:36:48.991518559 +0200 +--- src/version.c 2018-07-27 22:04:16.085747831 +0200 +*************** +*** 795,796 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 214, + /**/ + +-- +LAUNCELOT: At last! A call! A cry of distress ... + (he draws his sword, and turns to CONCORDE) + Concorde! Brave, Concorde ... you shall not have died in vain! +CONCORDE: I'm not quite dead, sir ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0215 b/data/vim/patches/8.1.0215 new file mode 100644 index 000000000..c77c7106d --- /dev/null +++ b/data/vim/patches/8.1.0215 @@ -0,0 +1,86 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0215 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0215 +Problem: No error if configure --with-x cannot configure X. +Solution: Check that when --with-x is used X can be configured. +Files: src/configure.ac, src/auto/configure + + +*** ../vim-8.1.0214/src/configure.ac 2018-05-13 15:37:01.000000000 +0200 +--- src/configure.ac 2018-07-27 22:31:12.914547455 +0200 +*************** +*** 72,77 **** +--- 72,80 ---- + [fail_if_missing="no"]) + AC_MSG_RESULT($fail_if_missing) + ++ dnl Keep original value to check later. ++ with_x_arg="$with_x" ++ + dnl Set default value for CFLAGS if none is defined or it's empty + if test -z "$CFLAGS"; then + CFLAGS="-O" +*************** +*** 2283,2288 **** +--- 2286,2296 ---- + fi + fi + ++ dnl Check if --with-x was given but it doesn't work. ++ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then ++ AC_MSG_ERROR([could not configure X]) ++ fi ++ + test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no + + AC_MSG_CHECKING(--enable-gui argument) +*** ../vim-8.1.0214/src/auto/configure 2018-05-13 15:38:02.000000000 +0200 +--- src/auto/configure 2018-07-27 22:31:16.926521603 +0200 +*************** +*** 4466,4471 **** +--- 4466,4473 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5 + $as_echo "$fail_if_missing" >&6; } + ++ with_x_arg="$with_x" ++ + if test -z "$CFLAGS"; then + CFLAGS="-O" + test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall" +*************** +*** 9003,9008 **** +--- 9005,9014 ---- + fi + fi + ++ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then ++ as_fn_error $? "could not configure X" "$LINENO" 5 ++ fi ++ + test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5 +*** ../vim-8.1.0214/src/version.c 2018-07-27 22:08:54.088115090 +0200 +--- src/version.c 2018-07-27 22:34:24.421319751 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 215, + /**/ + +-- +Why doesn't Tarzan have a beard? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0216 b/data/vim/patches/8.1.0216 new file mode 100644 index 000000000..317e0e8ab --- /dev/null +++ b/data/vim/patches/8.1.0216 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0216 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0216 +Problem: Part of file not indented properly. +Solution: Adjust the indent. (Ken Takata) +Files: src/getchar.c + + +*** ../vim-8.1.0215/src/getchar.c 2018-07-03 14:48:11.877218375 +0200 +--- src/getchar.c 2018-07-27 23:15:01.563375509 +0200 +*************** +*** 1710,1727 **** + * its ASCII equivalent */ + switch (c) + { +! case K_KPLUS: c = '+'; break; +! case K_KMINUS: c = '-'; break; +! case K_KDIVIDE: c = '/'; break; + case K_KMULTIPLY: c = '*'; break; +! case K_KENTER: c = CAR; break; + case K_KPOINT: + #ifdef WIN32 +! /* Can be either '.' or a ',', * +! * depending on the type of keypad. */ +! c = MapVirtualKey(VK_DECIMAL, 2); break; + #else +! c = '.'; break; + #endif + case K_K0: c = '0'; break; + case K_K1: c = '1'; break; +--- 1710,1727 ---- + * its ASCII equivalent */ + switch (c) + { +! case K_KPLUS: c = '+'; break; +! case K_KMINUS: c = '-'; break; +! case K_KDIVIDE: c = '/'; break; + case K_KMULTIPLY: c = '*'; break; +! case K_KENTER: c = CAR; break; + case K_KPOINT: + #ifdef WIN32 +! // Can be either '.' or a ',', +! // depending on the type of keypad. +! c = MapVirtualKey(VK_DECIMAL, 2); break; + #else +! c = '.'; break; + #endif + case K_K0: c = '0'; break; + case K_K1: c = '1'; break; +*** ../vim-8.1.0215/src/version.c 2018-07-27 22:35:12.309014484 +0200 +--- src/version.c 2018-07-27 23:15:46.891104698 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 216, + /**/ + +-- +FIRST GUARD: Ah! Now ... we're not allowed to ... + SIR LAUNCELOT runs him through, grabs his spear and stabs the other + guard who collapses in a heap. Hiccoughs quietly. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0217 b/data/vim/patches/8.1.0217 new file mode 100644 index 000000000..c953b8fa2 --- /dev/null +++ b/data/vim/patches/8.1.0217 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0217 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0217 +Problem: Compiler warning for variable set but not used. +Solution: Move tilde_file inside #ifdef. (Hirohito Higashi, closes #3255) +Files: src/ex_docmd.c + + +*** ../vim-8.1.0216/src/ex_docmd.c 2018-07-25 21:19:09.355657022 +0200 +--- src/ex_docmd.c 2018-07-28 16:10:48.740329275 +0200 +*************** +*** 10654,10662 **** + int resultlen; + buf_T *buf; + int valid = VALID_HEAD + VALID_PATH; /* assume valid result */ +- int tilde_file = FALSE; + int spec_idx; + #ifdef FEAT_MODIFY_FNAME + int skip_mod = FALSE; + #endif + char_u strbuf[30]; +--- 10654,10662 ---- + int resultlen; + buf_T *buf; + int valid = VALID_HEAD + VALID_PATH; /* assume valid result */ + int spec_idx; + #ifdef FEAT_MODIFY_FNAME ++ int tilde_file = FALSE; + int skip_mod = FALSE; + #endif + char_u strbuf[30]; +*************** +*** 10723,10729 **** +--- 10723,10731 ---- + else + { + result = curbuf->b_fname; ++ #ifdef FEAT_MODIFY_FNAME + tilde_file = STRCMP(result, "~") == 0; ++ #endif + } + break; + +*************** +*** 10790,10796 **** +--- 10792,10800 ---- + else + { + result = buf->b_fname; ++ #ifdef FEAT_MODIFY_FNAME + tilde_file = STRCMP(result, "~") == 0; ++ #endif + } + } + break; +*** ../vim-8.1.0216/src/version.c 2018-07-27 23:16:40.922781670 +0200 +--- src/version.c 2018-07-28 16:12:47.415624995 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 217, + /**/ + +-- + [clop clop] +GUARD #1: Halt! Who goes there? +ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of + Camelot. King of the Britons, defeator of the Saxons, sovereign of + all England! +GUARD #1: Pull the other one! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0218 b/data/vim/patches/8.1.0218 new file mode 100644 index 000000000..27d77d5d0 --- /dev/null +++ b/data/vim/patches/8.1.0218 @@ -0,0 +1,253 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0218 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0218 +Problem: Cannot add matches to another window. (Qiming Zhao) +Solution: Add the "window" argument to matchadd() and matchaddpos(). + (closes #3260) +Files: src/evalfunc.c, runtime/doc/eval.txt, src/testdir/test_match.vim + + +*** ../vim-8.1.0217/src/evalfunc.c 2018-07-27 22:08:54.084115114 +0200 +--- src/evalfunc.c 2018-07-28 16:38:54.045497084 +0200 +*************** +*** 7988,7993 **** +--- 7988,8023 ---- + find_some_match(argvars, rettv, MATCH_MATCH); + } + ++ #ifdef FEAT_SEARCH_EXTRA ++ static int ++ matchadd_dict_arg(typval_T *tv, char_u **conceal_char, win_T **win) ++ { ++ dictitem_T *di; ++ ++ if (tv->v_type != VAR_DICT) ++ { ++ EMSG(_(e_dictreq)); ++ return FAIL; ++ } ++ ++ if (dict_find(tv->vval.v_dict, (char_u *)"conceal", -1) != NULL) ++ *conceal_char = get_dict_string(tv->vval.v_dict, ++ (char_u *)"conceal", FALSE); ++ ++ if ((di = dict_find(tv->vval.v_dict, (char_u *)"window", -1)) != NULL) ++ { ++ *win = find_win_by_nr(&di->di_tv, NULL); ++ if (*win == NULL) ++ { ++ EMSG(_("E957: Invalid window number")); ++ return FAIL; ++ } ++ } ++ ++ return OK; ++ } ++ #endif ++ + /* + * "matchadd()" function + */ +*************** +*** 8002,8007 **** +--- 8032,8038 ---- + int id = -1; + int error = FALSE; + char_u *conceal_char = NULL; ++ win_T *win = curwin; + + rettv->vval.v_number = -1; + +*************** +*** 8013,8030 **** + if (argvars[3].v_type != VAR_UNKNOWN) + { + id = (int)get_tv_number_chk(&argvars[3], &error); +! if (argvars[4].v_type != VAR_UNKNOWN) +! { +! if (argvars[4].v_type != VAR_DICT) +! { +! EMSG(_(e_dictreq)); +! return; +! } +! if (dict_find(argvars[4].vval.v_dict, +! (char_u *)"conceal", -1) != NULL) +! conceal_char = get_dict_string(argvars[4].vval.v_dict, +! (char_u *)"conceal", FALSE); +! } + } + } + if (error == TRUE) +--- 8044,8052 ---- + if (argvars[3].v_type != VAR_UNKNOWN) + { + id = (int)get_tv_number_chk(&argvars[3], &error); +! if (argvars[4].v_type != VAR_UNKNOWN +! && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL) +! return; + } + } + if (error == TRUE) +*************** +*** 8035,8041 **** + return; + } + +! rettv->vval.v_number = match_add(curwin, grp, pat, prio, id, NULL, + conceal_char); + #endif + } +--- 8057,8063 ---- + return; + } + +! rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL, + conceal_char); + #endif + } +*************** +*** 8054,8059 **** +--- 8076,8082 ---- + int error = FALSE; + list_T *l; + char_u *conceal_char = NULL; ++ win_T *win = curwin; + + rettv->vval.v_number = -1; + +*************** +*** 8076,8093 **** + if (argvars[3].v_type != VAR_UNKNOWN) + { + id = (int)get_tv_number_chk(&argvars[3], &error); +! if (argvars[4].v_type != VAR_UNKNOWN) +! { +! if (argvars[4].v_type != VAR_DICT) +! { +! EMSG(_(e_dictreq)); +! return; +! } +! if (dict_find(argvars[4].vval.v_dict, +! (char_u *)"conceal", -1) != NULL) +! conceal_char = get_dict_string(argvars[4].vval.v_dict, +! (char_u *)"conceal", FALSE); +! } + } + } + if (error == TRUE) +--- 8099,8108 ---- + if (argvars[3].v_type != VAR_UNKNOWN) + { + id = (int)get_tv_number_chk(&argvars[3], &error); +! +! if (argvars[4].v_type != VAR_UNKNOWN +! && matchadd_dict_arg(&argvars[4], &conceal_char, &win) == FAIL) +! return; + } + } + if (error == TRUE) +*************** +*** 8100,8106 **** + return; + } + +! rettv->vval.v_number = match_add(curwin, group, NULL, prio, id, l, + conceal_char); + #endif + } +--- 8115,8121 ---- + return; + } + +! rettv->vval.v_number = match_add(win, group, NULL, prio, id, l, + conceal_char); + #endif + } +*** ../vim-8.1.0217/runtime/doc/eval.txt 2018-07-15 17:01:06.361425488 +0200 +--- runtime/doc/eval.txt 2018-07-28 16:54:21.839764726 +0200 +*************** +*** 6015,6021 **** + the pattern. 'smartcase' is NOT used. The matching is always + done like 'magic' is set and 'cpoptions' is empty. + +! *matchadd()* *E798* *E799* *E801* + matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) + Defines a pattern to be highlighted in the current window (a + "match"). It will be highlighted with {group}. Returns an +--- 6016,6022 ---- + the pattern. 'smartcase' is NOT used. The matching is always + done like 'magic' is set and 'cpoptions' is empty. + +! *matchadd()* *E798* *E799* *E801* *E957* + matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]]) + Defines a pattern to be highlighted in the current window (a + "match"). It will be highlighted with {group}. Returns an +*************** +*** 6054,6059 **** +--- 6055,6062 ---- + conceal Special character to show instead of the + match (only for |hl-Conceal| highlighted + matches, see |:syn-cchar|) ++ window Instead of the current window use the ++ window with this number or window ID. + + The number of matches is not limited, as it is the case with + the |:match| commands. +*** ../vim-8.1.0217/src/testdir/test_match.vim 2017-09-14 14:16:37.000000000 +0200 +--- src/testdir/test_match.vim 2018-07-28 16:51:59.280637174 +0200 +*************** +*** 192,197 **** +--- 192,219 ---- + set hlsearch& + endfunc + ++ func Test_matchaddpos_otherwin() ++ syntax on ++ new ++ call setline(1, ['12345', 'NP']) ++ let winid = win_getid() ++ ++ wincmd w ++ call matchadd('Search', '4', 10, -1, {'window': winid}) ++ call matchaddpos('Error', [[1,2], [2,2]], 10, -1, {'window': winid}) ++ redraw! ++ call assert_notequal(screenattr(1,2), 0) ++ call assert_notequal(screenattr(1,4), 0) ++ call assert_notequal(screenattr(2,2), 0) ++ call assert_equal(screenattr(1,2), screenattr(2,2)) ++ call assert_notequal(screenattr(1,2), screenattr(1,4)) ++ ++ wincmd w ++ bwipe! ++ call clearmatches() ++ syntax off ++ endfunc ++ + func Test_matchaddpos_using_negative_priority() + set hlsearch + +*** ../vim-8.1.0217/src/version.c 2018-07-28 16:14:26.131040141 +0200 +--- src/version.c 2018-07-28 16:40:26.416917394 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 218, + /**/ + +-- +'I generally avoid temptation unless I can't resist it." + -- Mae West + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0219 b/data/vim/patches/8.1.0219 new file mode 100644 index 000000000..eae18c16a --- /dev/null +++ b/data/vim/patches/8.1.0219 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0219 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0219 +Problem: Expanding ## fails to escape backtick. +Solution: Escape a backtick in a file name. (closes #3257) +Files: src/ex_docmd.c, src/testdir/test_edit.vim + + +*** ../vim-8.1.0218/src/ex_docmd.c 2018-07-28 16:14:26.131040141 +0200 +--- src/ex_docmd.c 2018-07-28 17:02:45.729605564 +0200 +*************** +*** 10954,10960 **** + #ifndef BACKSLASH_IN_FILENAME + || *p == '\\' + #endif +! ) + { + /* insert a backslash */ + if (retval != NULL) +--- 10954,10960 ---- + #ifndef BACKSLASH_IN_FILENAME + || *p == '\\' + #endif +! || *p == '`') + { + /* insert a backslash */ + if (retval != NULL) +*** ../vim-8.1.0218/src/testdir/test_edit.vim 2018-06-06 21:03:57.780523901 +0200 +--- src/testdir/test_edit.vim 2018-07-28 17:05:00.900978753 +0200 +*************** +*** 1375,1380 **** +--- 1375,1388 ---- + set swapfile& + endfunc + ++ func Test_edit_backtick() ++ next a\`b c ++ call assert_equal('a`b', expand('%')) ++ next ++ call assert_equal('c', expand('%')) ++ call assert_equal('a\`b c', expand('##')) ++ endfunc ++ + func Test_edit_quit() + edit foo.txt + split +*** ../vim-8.1.0218/src/version.c 2018-07-28 16:55:51.439217124 +0200 +--- src/version.c 2018-07-28 17:07:37.140211824 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 219, + /**/ + +-- +Veni, Vidi, Video -- I came, I saw, I taped what I saw. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0220 b/data/vim/patches/8.1.0220 new file mode 100644 index 000000000..523cbc277 --- /dev/null +++ b/data/vim/patches/8.1.0220 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0220 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0220 +Problem: Ruby converts v:true and v:false to a number. +Solution: Use Qtrue and Qfalse instead. (Masataka Pocke Kuwabara, + closes #3259) +Files: src/if_ruby.c, src/testdir/test_ruby.vim + + +*** ../vim-8.1.0219/src/if_ruby.c 2018-07-25 22:02:32.231966301 +0200 +--- src/if_ruby.c 2018-07-28 17:12:56.698546960 +0200 +*************** +*** 1085,1092 **** + } + else if (tv->v_type == VAR_SPECIAL) + { +! if (tv->vval.v_number <= VVAL_TRUE) +! result = INT2NUM(tv->vval.v_number); + } /* else return Qnil; */ + + return result; +--- 1085,1094 ---- + } + else if (tv->v_type == VAR_SPECIAL) + { +! if (tv->vval.v_number == VVAL_TRUE) +! result = Qtrue; +! else if (tv->vval.v_number == VVAL_FALSE) +! result = Qfalse; + } /* else return Qnil; */ + + return result; +*** ../vim-8.1.0219/src/testdir/test_ruby.vim 2018-07-25 22:02:32.235966277 +0200 +--- src/testdir/test_ruby.vim 2018-07-28 17:12:56.698546960 +0200 +*************** +*** 33,38 **** +--- 33,46 ---- + call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) + endfunc + ++ func Test_ruby_evaluate_special_var() ++ let l = [v:true, v:false, v:null, v:none] ++ redir => l:out ++ ruby d = Vim.evaluate("l"); print d ++ redir END ++ call assert_equal(['[true, false, nil, nil]'], split(l:out, "\n")) ++ endfunc ++ + func Test_rubydo() + " Check deleting lines does not trigger ml_get error. + new +*** ../vim-8.1.0219/src/version.c 2018-07-28 17:07:48.608154066 +0200 +--- src/version.c 2018-07-28 17:14:20.930093228 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 220, + /**/ + +-- +A real patriot is the fellow who gets a parking ticket and rejoices +that the system works. + + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0221 b/data/vim/patches/8.1.0221 new file mode 100644 index 000000000..cef2ca8ce --- /dev/null +++ b/data/vim/patches/8.1.0221 @@ -0,0 +1,463 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0221 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0221 +Problem: Not enough testing for the Ruby interface. +Solution: Add more tests. (Dominique Pelle, closes #3252) +Files: runtime/doc/if_ruby.txt, src/testdir/test_ruby.vim + + +*** ../vim-8.1.0220/runtime/doc/if_ruby.txt 2018-05-17 13:41:41.000000000 +0200 +--- runtime/doc/if_ruby.txt 2018-07-28 17:20:52.903932857 +0200 +*************** +*** 145,151 **** + + Methods: + +! name Returns the name of the buffer. + number Returns the number of the buffer. + count Returns the number of lines. + length Returns the number of lines. +--- 145,151 ---- + + Methods: + +! name Returns the full name of the buffer. + number Returns the number of the buffer. + count Returns the number of lines. + length Returns the number of lines. +*************** +*** 181,186 **** +--- 181,187 ---- + width Returns the width of the window. + width = {n} Sets the window width to {n}. + cursor Returns a [row, col] array for the cursor position. ++ First line number is 1 and first column number is 0. + cursor = [{row}, {col}] + Sets the cursor position to {row} and {col}. + +*** ../vim-8.1.0220/src/testdir/test_ruby.vim 2018-07-28 17:18:05.164865356 +0200 +--- src/testdir/test_ruby.vim 2018-07-28 17:27:53.037565797 +0200 +*************** +*** 4,9 **** +--- 4,16 ---- + finish + end + ++ " Helper function as there is no builtin rubyeval() function similar ++ " to perleval, luaevel() or pyeval(). ++ func RubyEval(ruby_expr) ++ let s = split(execute('ruby print ' . a:ruby_expr), "\n") ++ return (len(s) == 0) ? '' : s[-1] ++ endfunc ++ + func Test_ruby_change_buffer() + call setline(line('$'), ['1 line 1']) + ruby Vim.command("normal /^1\n") +*************** +*** 11,46 **** + call assert_equal('1 changed line 1', getline('$')) + endfunc + +- func Test_ruby_evaluate_list() +- call setline(line('$'), ['2 line 2']) +- ruby Vim.command("normal /^2\n") +- let l = ["abc", "def"] +- ruby << EOF +- curline = $curbuf.line_number +- l = Vim.evaluate("l"); +- $curbuf.append(curline, l.join("\n")) +- EOF +- normal j +- .rubydo $_ = $_.gsub(/\n/, '/') +- call assert_equal('abc/def', getline('$')) +- endfunc +- +- func Test_ruby_evaluate_dict() +- let d = {'a': 'foo', 'b': 123} +- redir => l:out +- ruby d = Vim.evaluate("d"); print d +- redir END +- call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) +- endfunc +- +- func Test_ruby_evaluate_special_var() +- let l = [v:true, v:false, v:null, v:none] +- redir => l:out +- ruby d = Vim.evaluate("l"); print d +- redir END +- call assert_equal(['[true, false, nil, nil]'], split(l:out, "\n")) +- endfunc +- + func Test_rubydo() + " Check deleting lines does not trigger ml_get error. + new +--- 18,23 ---- +*************** +*** 54,61 **** + call setline(1, ['one', 'two', 'three']) + rubydo Vim.command("new") + call assert_equal(wincount + 1, winnr('$')) +! bwipe! +! bwipe! + endfunc + + func Test_rubyfile() +--- 31,37 ---- + call setline(1, ['one', 'two', 'three']) + rubydo Vim.command("new") + call assert_equal(wincount + 1, winnr('$')) +! %bwipe! + endfunc + + func Test_rubyfile() +*************** +*** 73,80 **** +--- 49,366 ---- + normal gg + rubydo $curwin.cursor = [1, 5] + call assert_equal([1, 6], [line('.'), col('.')]) ++ call assert_equal('[1, 5]', RubyEval('$curwin.cursor')) + + " Check that movement after setting cursor position keeps current column. + normal j + call assert_equal([2, 6], [line('.'), col('.')]) ++ call assert_equal('[2, 5]', RubyEval('$curwin.cursor')) ++ ++ call assert_fails('ruby $curwin.cursor = [1]', ++ \ 'ArgumentError: array length must be 2') ++ bwipe! ++ endfunc ++ ++ " Test buffer.count and buffer.length (number of lines in buffer) ++ func Test_buffer_count() ++ new ++ call setline(1, ['one', 'two', 'three']) ++ call assert_equal('3', RubyEval('$curbuf.count')) ++ call assert_equal('3', RubyEval('$curbuf.length')) ++ bwipe! ++ endfunc ++ ++ " Test buffer.name (buffer name) ++ func Test_buffer_name() ++ new Xfoo ++ call assert_equal(expand('%:p'), RubyEval('$curbuf.name')) ++ bwipe ++ call assert_equal('', RubyEval('$curbuf.name')) ++ endfunc ++ ++ " Test buffer.number (number of the buffer). ++ func Test_buffer_number() ++ new ++ call assert_equal(string(bufnr('%')), RubyEval('$curbuf.number')) ++ new ++ call assert_equal(string(bufnr('%')), RubyEval('$curbuf.number')) ++ ++ %bwipe ++ endfunc ++ ++ " Test buffer.delete({n}) (delete line {n}) ++ func Test_buffer_delete() ++ new ++ call setline(1, ['one', 'two', 'three']) ++ ruby $curbuf.delete(2) ++ call assert_equal(['one', 'three'], getline(1, '$')) ++ ++ call assert_fails('ruby $curbuf.delete(0)', 'IndexError: line number 0 out of range') ++ call assert_fails('ruby $curbuf.delete(3)', 'IndexError: line number 3 out of range') ++ ++ bwipe! ++ endfunc ++ ++ " Test buffer.append({str}, str) (append line {str} after line {n}) ++ func Test_buffer_append() ++ new ++ ruby $curbuf.append(0, 'one') ++ ruby $curbuf.append(1, 'three') ++ ruby $curbuf.append(1, 'two') ++ ruby $curbuf.append(4, 'four') ++ ++ call assert_equal(['one', 'two', 'three', '', 'four'], getline(1, '$')) ++ ++ call assert_fails('ruby $curbuf.append(-1, "x")', ++ \ 'IndexError: line number -1 out of range') ++ call assert_fails('ruby $curbuf.append(6, "x")', ++ \ 'IndexError: line number 6 out of range') ++ ++ bwipe! ++ endfunc ++ ++ " Test buffer.line (get or set the current line) ++ func Test_buffer_line() ++ new ++ call setline(1, ['one', 'two', 'three']) ++ 2 ++ call assert_equal('two', RubyEval('$curbuf.line')) ++ ++ ruby $curbuf.line = 'TWO' ++ call assert_equal(['one', 'TWO', 'three'], getline(1, '$')) ++ ++ bwipe! ++ endfunc ++ ++ " Test buffer.line_number (get current line number) ++ func Test_buffer_line_number() ++ new ++ call setline(1, ['one', 'two', 'three']) ++ 2 ++ call assert_equal('2', RubyEval('$curbuf.line_number')) ++ ++ bwipe! ++ endfunc ++ ++ func Test_buffer_get() ++ new ++ call setline(1, ['one', 'two']) ++ call assert_equal('one', RubyEval('$curbuf[1]')) ++ call assert_equal('two', RubyEval('$curbuf[2]')) ++ ++ call assert_fails('ruby $curbuf[0]', ++ \ 'IndexError: line number 0 out of range') ++ call assert_fails('ruby $curbuf[3]', ++ \ 'IndexError: line number 3 out of range') ++ ++ bwipe! ++ endfunc ++ ++ func Test_buffer_set() ++ new ++ call setline(1, ['one', 'two']) ++ ruby $curbuf[2] = 'TWO' ++ ruby $curbuf[1] = 'ONE' ++ ++ call assert_fails('ruby $curbuf[0] = "ZERO"', ++ \ 'IndexError: line number 0 out of range') ++ call assert_fails('ruby $curbuf[3] = "THREE"', ++ \ 'IndexError: line number 3 out of range') ++ bwipe! ++ endfunc ++ ++ " Test window.width (get or set window height). ++ func Test_window_height() ++ new ++ ++ " Test setting window height ++ ruby $curwin.height = 2 ++ call assert_equal(2, winheight(0)) ++ ++ " Test getting window height ++ call assert_equal('2', RubyEval('$curwin.height')) ++ ++ bwipe ++ endfunc ++ ++ " Test window.width (get or set window width). ++ func Test_window_width() ++ vnew ++ ++ " Test setting window width ++ ruby $curwin.width = 2 ++ call assert_equal(2, winwidth(0)) ++ ++ " Test getting window width ++ call assert_equal('2', RubyEval('$curwin.width')) ++ ++ bwipe ++ endfunc ++ ++ " Test window.buffer (get buffer object of a window object). ++ func Test_window_buffer() ++ new Xfoo1 ++ new Xfoo2 ++ ruby $b2 = $curwin.buffer ++ ruby $w2 = $curwin ++ wincmd j ++ ruby $b1 = $curwin.buffer ++ ruby $w1 = $curwin ++ ++ call assert_equal(RubyEval('$b1'), RubyEval('$w1.buffer')) ++ call assert_equal(RubyEval('$b2'), RubyEval('$w2.buffer')) ++ call assert_equal(string(bufnr('Xfoo1')), RubyEval('$w1.buffer.number')) ++ call assert_equal(string(bufnr('Xfoo2')), RubyEval('$w2.buffer.number')) ++ ++ ruby $b1, $w1, $b2, $w2 = nil ++ %bwipe ++ endfunc ++ ++ " Test Vim::Window.current (get current window object) ++ func Test_Vim_window_current() ++ let cw = RubyEval('$curwin') ++ call assert_equal(cw, RubyEval('Vim::Window.current')) ++ call assert_match('^#$', cw) ++ endfunc ++ ++ " Test Vim::Window.count (number of windows) ++ func Test_Vim_window_count() ++ new Xfoo1 ++ new Xfoo2 ++ split ++ call assert_equal('4', RubyEval('Vim::Window.count')) ++ %bwipe ++ call assert_equal('1', RubyEval('Vim::Window.count')) ++ endfunc ++ ++ " Test Vim::Window[n] (get window object of window n) ++ func Test_Vim_window_get() ++ new Xfoo1 ++ new Xfoo2 ++ call assert_match('Xfoo2$', RubyEval('Vim::Window[0].buffer.name')) ++ wincmd j ++ call assert_match('Xfoo1$', RubyEval('Vim::Window[1].buffer.name')) ++ wincmd j ++ call assert_equal('', RubyEval('Vim::Window[2].buffer.name')) ++ %bwipe ++ endfunc ++ ++ " Test Vim::Buffer.current (return the buffer object of current buffer) ++ func Test_Vim_buffer_current() ++ let cb = RubyEval('$curbuf') ++ call assert_equal(cb, RubyEval('Vim::Buffer.current')) ++ call assert_match('^#$', cb) ++ endfunc ++ ++ " Test Vim::Buffer:.count (return the number of buffers) ++ func Test_Vim_buffer_count() ++ new Xfoo1 ++ new Xfoo2 ++ call assert_equal('3', RubyEval('Vim::Buffer.count')) ++ %bwipe ++ call assert_equal('1', RubyEval('Vim::Buffer.count')) ++ endfunc ++ ++ " Test Vim::buffer[n] (return the buffer object of buffer number n) ++ func Test_Vim_buffer_get() ++ new Xfoo1 ++ new Xfoo2 ++ ++ " Index of Vim::Buffer[n] goes from 0 to the number of buffers. ++ call assert_equal('', RubyEval('Vim::Buffer[0].name')) ++ call assert_match('Xfoo1$', RubyEval('Vim::Buffer[1].name')) ++ call assert_match('Xfoo2$', RubyEval('Vim::Buffer[2].name')) ++ call assert_fails('ruby print Vim::Buffer[3].name', ++ \ "NoMethodError: undefined method `name' for nil:NilClass") ++ %bwipe ++ endfunc ++ ++ " Test Vim::command({cmd}) (execute a Ex command)) ++ " Test Vim::command({cmd}) ++ func Test_Vim_command() ++ new ++ call setline(1, ['one', 'two', 'three', 'four']) ++ ruby Vim::command('2,3d') ++ call assert_equal(['one', 'four'], getline(1, '$')) ++ bwipe! ++ endfunc ++ ++ " Test Vim::set_option (set a vim option) ++ func Test_Vim_set_option() ++ call assert_equal(0, &number) ++ ruby Vim::set_option('number') ++ call assert_equal(1, &number) ++ ruby Vim::set_option('nonumber') ++ call assert_equal(0, &number) ++ endfunc ++ ++ func Test_Vim_evaluate() ++ call assert_equal('123', RubyEval('Vim::evaluate("123")')) ++ " Vim::evaluate("123").class gives Integer or Fixnum depending ++ " on versions of Ruby. ++ call assert_match('^Integer\|Fixnum$', RubyEval('Vim::evaluate("123").class')) ++ ++ call assert_equal('1.23', RubyEval('Vim::evaluate("1.23")')) ++ call assert_equal('Float', RubyEval('Vim::evaluate("1.23").class')) ++ ++ call assert_equal('foo', RubyEval('Vim::evaluate("\"foo\"")')) ++ call assert_equal('String', RubyEval('Vim::evaluate("\"foo\"").class')) ++ ++ call assert_equal('[1, 2]', RubyEval('Vim::evaluate("[1, 2]")')) ++ call assert_equal('Array', RubyEval('Vim::evaluate("[1, 2]").class')) ++ ++ call assert_equal('{"1"=>2}', RubyEval('Vim::evaluate("{1:2}")')) ++ call assert_equal('Hash', RubyEval('Vim::evaluate("{1:2}").class')) ++ ++ call assert_equal('', RubyEval('Vim::evaluate("v:null")')) ++ call assert_equal('NilClass', RubyEval('Vim::evaluate("v:null").class')) ++ ++ call assert_equal('', RubyEval('Vim::evaluate("v:none")')) ++ call assert_equal('NilClass', RubyEval('Vim::evaluate("v:none").class')) ++ ++ call assert_equal('true', RubyEval('Vim::evaluate("v:true")')) ++ call assert_equal('TrueClass', RubyEval('Vim::evaluate("v:true").class')) ++ call assert_equal('false', RubyEval('Vim::evaluate("v:false")')) ++ call assert_equal('FalseClass',RubyEval('Vim::evaluate("v:false").class')) ++ endfunc ++ ++ func Test_Vim_evaluate_list() ++ call setline(line('$'), ['2 line 2']) ++ ruby Vim.command("normal /^2\n") ++ let l = ["abc", "def"] ++ ruby << EOF ++ curline = $curbuf.line_number ++ l = Vim.evaluate("l"); ++ $curbuf.append(curline, l.join("\n")) ++ EOF ++ normal j ++ .rubydo $_ = $_.gsub(/\n/, '/') ++ call assert_equal('abc/def', getline('$')) ++ endfunc ++ ++ func Test_Vim_evaluate_dict() ++ let d = {'a': 'foo', 'b': 123} ++ redir => l:out ++ ruby d = Vim.evaluate("d"); print d ++ redir END ++ call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n")) ++ endfunc ++ ++ " Test Vim::message({msg}) (display message {msg}) ++ func Test_Vim_message() ++ ruby Vim::message('A message') ++ let messages = split(execute('message'), "\n") ++ call assert_equal('A message', messages[-1]) ++ endfunc ++ ++ func Test_print() ++ ruby print "Hello World!" ++ let messages = split(execute('message'), "\n") ++ call assert_equal('Hello World!', messages[-1]) ++ endfunc ++ ++ func Test_p() ++ ruby p 'Just a test' ++ let messages = split(execute('message'), "\n") ++ call assert_equal('"Just a test"', messages[-1]) + endfunc +*** ../vim-8.1.0220/src/version.c 2018-07-28 17:18:05.164865356 +0200 +--- src/version.c 2018-07-28 17:22:07.999512544 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 221, + /**/ + +-- +GUARD #1: What, ridden on a horse? +ARTHUR: Yes! +GUARD #1: You're using coconuts! +ARTHUR: What? +GUARD #1: You've got two empty halves of coconut and you're bangin' 'em + together. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0222 b/data/vim/patches/8.1.0222 new file mode 100644 index 000000000..1ee0bfcd5 --- /dev/null +++ b/data/vim/patches/8.1.0222 @@ -0,0 +1,145 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0222 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0222 +Problem: Errors are reported for "make install". +Solution: Skip missing language files. (Christian Brabandt, closes #3254) +Files: src/installman.sh + + +*** ../vim-8.1.0221/src/installman.sh 2017-04-21 22:52:39.000000000 +0200 +--- src/installman.sh 2018-07-28 18:10:51.863723506 +0200 +*************** +*** 48,88 **** + + if test $what = "install"; then + # vim.1 +! echo installing $destdir/$exename.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ +! -e s+$vimloc/doc+$helpsubloc+ \ +! -e s+$vimloc/print+$printsubloc+ \ +! -e s+$vimloc/syntax+$synsubloc+ \ +! -e s+$vimloc/tutor+$tutorsubloc+ \ +! -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \ +! -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \ +! -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \ +! -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \ +! -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \ +! -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \ +! -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \ +! -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \ +! $helpsource/vim$langadd.1 > $destdir/$exename.1 +! chmod $manmod $destdir/$exename.1 + + # vimtutor.1 +! echo installing $destdir/$exename""tutor.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ +! -e s+$vimloc/tutor+$tutorsubloc+ \ +! $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1 +! chmod $manmod $destdir/$exename""tutor.1 + + # vimdiff.1 +! echo installing $destdir/$vimdiffname.1 +! cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1 +! chmod $manmod $destdir/$vimdiffname.1 + + # evim.1 +! echo installing $destdir/$evimname.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ +! -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \ +! $helpsource/evim$langadd.1 > $destdir/$evimname.1 +! chmod $manmod $destdir/$evimname.1 + fi + + if test $what = "uninstall"; then +--- 48,96 ---- + + if test $what = "install"; then + # vim.1 +! if test -r $helpsource/vim$langadd.1; then +! echo installing $destdir/$exename.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ +! -e s+$vimloc/doc+$helpsubloc+ \ +! -e s+$vimloc/print+$printsubloc+ \ +! -e s+$vimloc/syntax+$synsubloc+ \ +! -e s+$vimloc/tutor+$tutorsubloc+ \ +! -e s+$vimloc/vimrc+$vimrcloc/vimrc+ \ +! -e s+$vimloc/gvimrc+$vimrcloc/gvimrc+ \ +! -e s+$vimloc/menu.vim+$scriptloc/menu.vim+ \ +! -e s+$vimloc/bugreport.vim+$scriptloc/bugreport.vim+ \ +! -e s+$vimloc/filetype.vim+$scriptloc/filetype.vim+ \ +! -e s+$vimloc/scripts.vim+$scriptloc/scripts.vim+ \ +! -e s+$vimloc/optwin.vim+$scriptloc/optwin.vim+ \ +! -e 's+$vimloc/\*.ps+$scriptloc/\*.ps+' \ +! $helpsource/vim$langadd.1 > $destdir/$exename.1 +! chmod $manmod $destdir/$exename.1 +! fi + + # vimtutor.1 +! if test -r $helpsource/vimtutor$langadd.1; then +! echo installing $destdir/$exename""tutor.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ +! -e s+$vimloc/tutor+$tutorsubloc+ \ +! $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1 +! chmod $manmod $destdir/$exename""tutor.1 +! fi + + # vimdiff.1 +! if test -r $helpsource/vimdiff$langadd.1; then +! echo installing $destdir/$vimdiffname.1 +! cp $helpsource/vimdiff$langadd.1 $destdir/$vimdiffname.1 +! chmod $manmod $destdir/$vimdiffname.1 +! fi + + # evim.1 +! if test -r $helpsource/evim$langadd.1; then +! echo installing $destdir/$evimname.1 +! LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ +! -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \ +! $helpsource/evim$langadd.1 > $destdir/$evimname.1 +! chmod $manmod $destdir/$evimname.1 +! fi + fi + + if test $what = "uninstall"; then +*************** +*** 105,111 **** + fi + fi + +! if test $what = "xxd"; then + echo installing $destdir/xxd.1 + cp $helpsource/xxd$langadd.1 $destdir/xxd.1 + chmod $manmod $destdir/xxd.1 +--- 113,119 ---- + fi + fi + +! if test $what = "xxd" -a -r "$helpsource/xxd${langadd}.1"; then + echo installing $destdir/xxd.1 + cp $helpsource/xxd$langadd.1 $destdir/xxd.1 + chmod $manmod $destdir/xxd.1 +*** ../vim-8.1.0221/src/version.c 2018-07-28 17:29:15.757096343 +0200 +--- src/version.c 2018-07-28 18:15:50.441981506 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 222, + /**/ + +-- +"A mouse can be just as dangerous as a bullet or a bomb." + (US Representative Lamar Smith, R-Texas) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0223 b/data/vim/patches/8.1.0223 new file mode 100644 index 000000000..febc4715b --- /dev/null +++ b/data/vim/patches/8.1.0223 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0223 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0223 +Problem: Completing shell command finds sub-directories in $PATH. +Solution: Remove EW_DIR when completing an item in $PATH. (Jason Franklin) +Files: src/ex_getln.c, src/tetdir/test_cmdline.vim + + +*** ../vim-8.1.0222/src/ex_getln.c 2018-06-12 22:05:10.656251565 +0200 +--- src/ex_getln.c 2018-07-28 19:01:02.150240882 +0200 +*************** +*** 5193,5208 **** + hash_init(&found_ht); + for (s = path; ; s = e) + { +- if (*s == NUL) +- { +- if (did_curdir) +- break; +- /* Find directories in the current directory, path is empty. */ +- did_curdir = TRUE; +- } +- else if (*s == '.') +- did_curdir = TRUE; +- + #if defined(MSWIN) + e = vim_strchr(s, ';'); + #else +--- 5193,5198 ---- +*************** +*** 5211,5216 **** +--- 5201,5223 ---- + if (e == NULL) + e = s + STRLEN(s); + ++ if (*s == NUL) ++ { ++ if (did_curdir) ++ break; ++ // Find directories in the current directory, path is empty. ++ did_curdir = TRUE; ++ flags |= EW_DIR; ++ } ++ else if (STRNCMP(s, ".", (int)(e - s)) == 0) ++ { ++ did_curdir = TRUE; ++ flags |= EW_DIR; ++ } ++ else ++ // Do not match directories inside a $PATH item. ++ flags &= ~EW_DIR; ++ + l = e - s; + if (l > MAXPATHL - 5) + break; +*************** +*** 5266,5273 **** + + + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) +- static void * call_user_expand_func(void *(*user_expand_func)(char_u *, int, typval_T *, int), expand_T *xp, int *num_file, char_u ***file); +- + /* + * Call "user_expand_func()" to invoke a user defined Vim script function and + * return the result (either a string or a List). +--- 5273,5278 ---- +*** ../vim-8.1.0222/src/testdir/test_cmdline.vim 2018-06-23 14:55:00.146628803 +0200 +--- src/testdir/test_cmdline.vim 2018-07-28 19:11:04.354676084 +0200 +*************** +*** 231,237 **** + call assert_equal([], l) + + let l = getcompletion('.', 'shellcmd') +! call assert_equal(['./', '../'], l[0:1]) + call assert_equal(-1, match(l[2:], '^\.\.\?/$')) + let root = has('win32') ? 'C:\\' : '/' + let l = getcompletion(root, 'shellcmd') +--- 231,237 ---- + call assert_equal([], l) + + let l = getcompletion('.', 'shellcmd') +! call assert_equal(['./', '../'], filter(l, 'v:val =~ "\\./"')) + call assert_equal(-1, match(l[2:], '^\.\.\?/$')) + let root = has('win32') ? 'C:\\' : '/' + let l = getcompletion(root, 'shellcmd') +*************** +*** 290,295 **** +--- 290,318 ---- + call assert_fails('call getcompletion("", "burp")', 'E475:') + endfunc + ++ func Test_shellcmd_completion() ++ let save_path = $PATH ++ ++ call mkdir('Xpathdir/Xpathsubdir', 'p') ++ call writefile([''], 'Xpathdir/Xfile.exe') ++ call setfperm('Xpathdir/Xfile.exe', 'rwx------') ++ ++ " Set PATH to example directory without trailing slash. ++ let $PATH = getcwd() . '/Xpathdir' ++ ++ " Test for the ":!" case. Previously, this would include subdirs of ++ " dirs in the PATH, even though they won't be executed. We check that only ++ " subdirs of the PWD and executables from the PATH are included in the ++ " suggestions. ++ let actual = getcompletion('X', 'shellcmd') ++ let expected = map(filter(glob('*', 0, 1), 'isdirectory(v:val) && v:val[0] == "X"'), 'v:val . "/"') ++ call insert(expected, 'Xfile.exe') ++ call assert_equal(expected, actual) ++ ++ call delete('Xpathdir', 'rf') ++ let $PATH = save_path ++ endfunc ++ + func Test_expand_star_star() + call mkdir('a/b', 'p') + call writefile(['asdfasdf'], 'a/b/fileXname') +*** ../vim-8.1.0222/src/version.c 2018-07-28 18:16:44.285662961 +0200 +--- src/version.c 2018-07-28 19:09:36.547197615 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 223, + /**/ + +-- +Futility Factor: No experiment is ever a complete failure - it can always +serve as a negative example. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0224 b/data/vim/patches/8.1.0224 new file mode 100644 index 000000000..814fae06b --- /dev/null +++ b/data/vim/patches/8.1.0224 @@ -0,0 +1,110 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0224 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0224 +Problem: Hang in bracketed paste mode when t_PE not encountered. +Solution: Break out of the loop when got_int is set. (suggested by Christian + Brabandt, closes #3146) +Files: src/edit.c + + +*** ../vim-8.1.0223/src/edit.c 2018-07-08 16:50:33.103216858 +0200 +--- src/edit.c 2018-07-28 23:11:32.282300523 +0200 +*************** +*** 9685,9706 **** + int ret_char = -1; + int save_allow_keys = allow_keys; + int save_paste = p_paste; +- int save_ai = curbuf->b_p_ai; + + /* If the end code is too long we can't detect it, read everything. */ + if (STRLEN(end) >= NUMBUFLEN) + end = NULL; + ++no_mapping; + allow_keys = 0; +! p_paste = TRUE; +! curbuf->b_p_ai = FALSE; + + for (;;) + { +! /* When the end is not defined read everything. */ + if (end == NULL && vpeekc() == NUL) + break; +! c = plain_vgetc(); + #ifdef FEAT_MBYTE + if (has_mbyte) + idx += (*mb_char2bytes)(c, buf + idx); +--- 9685,9715 ---- + int ret_char = -1; + int save_allow_keys = allow_keys; + int save_paste = p_paste; + + /* If the end code is too long we can't detect it, read everything. */ + if (STRLEN(end) >= NUMBUFLEN) + end = NULL; + ++no_mapping; + allow_keys = 0; +! if (!p_paste) +! // Also have the side effects of setting 'paste' to make it work much +! // faster. +! set_option_value((char_u *)"paste", TRUE, NULL, 0); + + for (;;) + { +! // When the end is not defined read everything there is. + if (end == NULL && vpeekc() == NUL) + break; +! do +! { +! c = vgetc(); +! } while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR); +! if (c == NUL || got_int) +! // When CTRL-C was encountered the typeahead will be flushed and we +! // won't get the end sequence. +! break; +! + #ifdef FEAT_MBYTE + if (has_mbyte) + idx += (*mb_char2bytes)(c, buf + idx); +*************** +*** 9763,9770 **** + + --no_mapping; + allow_keys = save_allow_keys; +! p_paste = save_paste; +! curbuf->b_p_ai = save_ai; + + return ret_char; + } +--- 9772,9779 ---- + + --no_mapping; + allow_keys = save_allow_keys; +! if (!save_paste) +! set_option_value((char_u *)"paste", FALSE, NULL, 0); + + return ret_char; + } +*** ../vim-8.1.0223/src/version.c 2018-07-28 19:20:09.787586245 +0200 +--- src/version.c 2018-07-28 23:08:55.583319931 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 224, + /**/ + +-- +Computers are not intelligent. They only think they are. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0225 b/data/vim/patches/8.1.0225 new file mode 100644 index 000000000..d52a89249 --- /dev/null +++ b/data/vim/patches/8.1.0225 @@ -0,0 +1,176 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0225 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0225 +Problem: Mode() does not indicate using CTRL-O from Insert mode. +Solution: Add "niI", "niR" and "niV" to mode() result. (closes #3000) +Files: runtime/doc/eval.txt, src/evalfunc.c, + src/testdir/test_functions.vim + + +*** ../vim-8.1.0224/runtime/doc/eval.txt 2018-07-28 16:55:51.435217148 +0200 +--- runtime/doc/eval.txt 2018-07-29 15:22:39.416519885 +0200 +*************** +*** 6223,6254 **** + a non-empty String (|non-zero-arg|), then the full mode is + returned, otherwise only the first letter is returned. + +! n Normal, Terminal-Normal +! no Operator-pending +! v Visual by character +! V Visual by line +! CTRL-V Visual blockwise +! s Select by character +! S Select by line +! CTRL-S Select blockwise +! i Insert +! ic Insert mode completion |compl-generic| +! ix Insert mode |i_CTRL-X| completion +! R Replace |R| +! Rc Replace mode completion |compl-generic| +! Rv Virtual Replace |gR| +! Rx Replace mode |i_CTRL-X| completion +! c Command-line editing +! cv Vim Ex mode |gQ| +! ce Normal Ex mode |Q| +! r Hit-enter prompt +! rm The -- more -- prompt +! r? A |:confirm| query of some sort +! ! Shell or external command is executing +! t Terminal-Job mode: keys go to the job + This is useful in the 'statusline' option or when used + with |remote_expr()| In most other places it always returns + "c" or "n". + Also see |visualmode()|. + + mzeval({expr}) *mzeval()* +--- 6224,6261 ---- + a non-empty String (|non-zero-arg|), then the full mode is + returned, otherwise only the first letter is returned. + +! n Normal, Terminal-Normal +! no Operator-pending +! niI Normal using |i_CTRL-O| in |Insert-mode| +! niR Normal using |i_CTRL-O| in |Replace-mode| +! niV Normal using |i_CTRL-O| in |Virtual-Replace-mode| +! v Visual by character +! V Visual by line +! CTRL-V Visual blockwise +! s Select by character +! S Select by line +! CTRL-S Select blockwise +! i Insert +! ic Insert mode completion |compl-generic| +! ix Insert mode |i_CTRL-X| completion +! R Replace |R| +! Rc Replace mode completion |compl-generic| +! Rv Virtual Replace |gR| +! Rx Replace mode |i_CTRL-X| completion +! c Command-line editing +! cv Vim Ex mode |gQ| +! ce Normal Ex mode |Q| +! r Hit-enter prompt +! rm The -- more -- prompt +! r? A |:confirm| query of some sort +! ! Shell or external command is executing +! t Terminal-Job mode: keys go to the job + This is useful in the 'statusline' option or when used + with |remote_expr()| In most other places it always returns + "c" or "n". ++ Note that in the future more modes and more specific modes may ++ be added. It's better not to compare the whole string but only ++ the leading character(s). + Also see |visualmode()|. + + mzeval({expr}) *mzeval()* +*** ../vim-8.1.0224/src/evalfunc.c 2018-07-28 16:55:51.435217148 +0200 +--- src/evalfunc.c 2018-07-29 15:23:57.768058068 +0200 +*************** +*** 8366,8375 **** + static void + f_mode(typval_T *argvars, typval_T *rettv) + { +! char_u buf[3]; + +! buf[1] = NUL; +! buf[2] = NUL; + + if (time_for_testing == 93784) + { +--- 8366,8374 ---- + static void + f_mode(typval_T *argvars, typval_T *rettv) + { +! char_u buf[4]; + +! vim_memset(buf, 0, sizeof(buf)); + + if (time_for_testing == 93784) + { +*************** +*** 8435,8440 **** +--- 8434,8445 ---- + buf[0] = 'n'; + if (finish_op) + buf[1] = 'o'; ++ else if (restart_edit == 'I' || restart_edit == 'R' ++ || restart_edit == 'V') ++ { ++ buf[1] = 'i'; ++ buf[2] = restart_edit; ++ } + } + + /* Clear out the minor mode when the argument is not a non-zero number or +*** ../vim-8.1.0224/src/testdir/test_functions.vim 2018-07-22 19:36:29.251125855 +0200 +--- src/testdir/test_functions.vim 2018-07-29 15:31:26.897360022 +0200 +*************** +*** 464,469 **** +--- 464,481 ---- + call assert_equal('n', mode(0)) + call assert_equal('n', mode(1)) + ++ " i_CTRL-O ++ exe "normal i\:call Save_mode()\\" ++ call assert_equal("n-niI", g:current_modes) ++ ++ " R_CTRL-O ++ exe "normal R\:call Save_mode()\\" ++ call assert_equal("n-niR", g:current_modes) ++ ++ " gR_CTRL-O ++ exe "normal gR\:call Save_mode()\\" ++ call assert_equal("n-niV", g:current_modes) ++ + " How to test operator-pending mode? + + call feedkeys("v", 'xt') +*** ../vim-8.1.0224/src/version.c 2018-07-28 23:12:01.578163697 +0200 +--- src/version.c 2018-07-29 15:17:05.914434445 +0200 +*************** +*** 800,801 **** +--- 800,803 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 225, + /**/ + +-- +MORTICIAN: What? +CUSTOMER: Nothing -- here's your nine pence. +DEAD PERSON: I'm not dead! +MORTICIAN: Here -- he says he's not dead! +CUSTOMER: Yes, he is. +DEAD PERSON: I'm not! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0226 b/data/vim/patches/8.1.0226 new file mode 100644 index 000000000..126cfac1f --- /dev/null +++ b/data/vim/patches/8.1.0226 @@ -0,0 +1,1135 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0226 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0226 +Problem: Too many #ifdefs. +Solution: Graduate the +vreplace feature, it's not much code and quite a few + #ifdefs. +Files: runtime/doc/change.txt, runtime/doc/various.txt, src/edit.c, + src/evalfunc.c, src/gui.c, src/misc1.c, src/misc2.c, src/normal.c, + src/ops.c, src/screen.c, src/version.c, src/feature.h, + src/globals.h, src/macros.h, src/vim.h + + +*** ../vim-8.1.0225/runtime/doc/change.txt 2018-06-23 19:22:45.594486390 +0200 +--- runtime/doc/change.txt 2018-07-29 15:38:09.666898986 +0200 +*************** +*** 177,184 **** + may replace several characters at once. + Repeat the entered text [count]-1 times. See + |Virtual-Replace-mode| for more details. +- {not available when compiled without the |+vreplace| +- feature} + + *c* + ["x]c{motion} Delete {motion} text [into register x] and start +--- 177,182 ---- +*************** +*** 303,310 **** + space. See |gR| and |Virtual-Replace-mode| for more + details. As with |r| a count may be given. + {char} can be entered like with |r|. +- {not available when compiled without the |+vreplace| +- feature} + + *digraph-arg* + The argument for Normal mode commands like |r| and |t| is a single character. +--- 301,306 ---- +*** ../vim-8.1.0225/runtime/doc/various.txt 2018-06-23 19:22:45.598486362 +0200 +--- runtime/doc/various.txt 2018-07-29 15:38:59.894590610 +0200 +*************** +*** 461,467 **** + N *+virtualedit* |'virtualedit'| + S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. + N *+visualextra* extra Visual mode commands |blockwise-operators| +! N *+vreplace* |gR| and |gr| + *+vtp* on MS-Windows console: support for 'termguicolors' + N *+wildignore* |'wildignore'| + N *+wildmenu* |'wildmenu'| +--- 461,467 ---- + N *+virtualedit* |'virtualedit'| + S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. + N *+visualextra* extra Visual mode commands |blockwise-operators| +! T *+vreplace* |gR| and |gr| + *+vtp* on MS-Windows console: support for 'termguicolors' + N *+wildignore* |'wildignore'| + N *+wildmenu* |'wildmenu'| +*** ../vim-8.1.0225/src/edit.c 2018-07-28 23:12:01.578163697 +0200 +--- src/edit.c 2018-07-29 15:43:22.341227944 +0200 +*************** +*** 463,469 **** + { + ResetRedobuff(); + AppendNumberToRedobuff(count); +- #ifdef FEAT_VREPLACE + if (cmdchar == 'V' || cmdchar == 'v') + { + /* "gR" or "gr" command */ +--- 463,468 ---- +*************** +*** 471,477 **** + AppendCharToRedobuff((cmdchar == 'v') ? 'r' : 'R'); + } + else +- #endif + { + if (cmdchar == K_PS) + AppendCharToRedobuff('a'); +--- 470,475 ---- +*************** +*** 497,503 **** + #endif + State = REPLACE; + } +- #ifdef FEAT_VREPLACE + else if (cmdchar == 'V' || cmdchar == 'v') + { + State = VREPLACE; +--- 495,500 ---- +*************** +*** 505,511 **** + orig_line_count = curbuf->b_ml.ml_line_count; + vr_lines_changed = 1; + } +- #endif + else + State = INSERT; + +--- 502,507 ---- +*************** +*** 2042,2048 **** + int save_p_list; + int start_col; + colnr_T vc; +- #ifdef FEAT_VREPLACE + colnr_T orig_col = 0; /* init for GCC */ + char_u *new_line, *orig_line = NULL; /* init for GCC */ + +--- 2038,2043 ---- +*************** +*** 2052,2058 **** + orig_line = vim_strsave(ml_get_curline()); /* Deal with NULL below */ + orig_col = curwin->w_cursor.col; + } +- #endif + + /* for the following tricks we don't want list mode */ + save_p_list = curwin->w_p_list; +--- 2047,2052 ---- +*************** +*** 2091,2107 **** + (void)set_indent(amount, call_changed_bytes ? SIN_CHANGED : 0); + else + { +- #ifdef FEAT_VREPLACE + int save_State = State; + + /* Avoid being called recursively. */ + if (State & VREPLACE_FLAG) + State = INSERT; +- #endif + shift_line(type == INDENT_DEC, round, 1, call_changed_bytes); +- #ifdef FEAT_VREPLACE + State = save_State; +- #endif + } + insstart_less -= curwin->w_cursor.col; + +--- 2085,2097 ---- +*************** +*** 2233,2239 **** + } + } + +- #ifdef FEAT_VREPLACE + /* + * For VREPLACE mode, we also have to fix the replace stack. In this case + * it is always possible because we backspace over the whole line and then +--- 2223,2228 ---- +*************** +*** 2266,2272 **** + + vim_free(new_line); + } +- #endif + } + + /* +--- 2255,2260 ---- +*************** +*** 2288,2295 **** + line[i + 1] = NUL; + } + +- #if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) \ +- || defined(FEAT_COMMENTS) || defined(PROTO) + /* + * Backspace the cursor until the given column. Handles REPLACE and VREPLACE + * modes correctly. May also be used when not in insert mode at all. +--- 2276,2281 ---- +*************** +*** 2308,2314 **** + break; + } + } +- #endif + + /* + * Like del_char(), but make sure not to go before column "limit_col". +--- 2294,2299 ---- +*************** +*** 6224,6232 **** + && (force_format + || (!VIM_ISWHITE(c) + && !((State & REPLACE_FLAG) +- #ifdef FEAT_VREPLACE + && !(State & VREPLACE_FLAG) +- #endif + && *ml_get_cursor() != NUL) + && (curwin->w_cursor.lnum != Insstart.lnum + || ((!has_format_option(FO_INS_LONG) +--- 6209,6215 ---- +*************** +*** 6471,6481 **** + * When 'ai' is off we don't want a space under the cursor to be + * deleted. Replace it with an 'x' temporarily. + */ +! if (!curbuf->b_p_ai +! #ifdef FEAT_VREPLACE +! && !(State & VREPLACE_FLAG) +! #endif +! ) + { + cc = gchar_cursor(); + if (VIM_ISWHITE(cc)) +--- 6454,6460 ---- + * When 'ai' is off we don't want a space under the cursor to be + * deleted. Replace it with an 'x' temporarily. + */ +! if (!curbuf->b_p_ai && !(State & VREPLACE_FLAG)) + { + cc = gchar_cursor(); + if (VIM_ISWHITE(cc)) +*************** +*** 6496,6505 **** + int end_foundcol = 0; /* column for start of word */ + colnr_T len; + colnr_T virtcol; +- #ifdef FEAT_VREPLACE + int orig_col = 0; + char_u *saved_text = NULL; +- #endif + colnr_T col; + colnr_T end_col; + +--- 6475,6482 ---- +*************** +*** 6669,6679 **** + * stack functions. VREPLACE does not use this, and backspaces + * over the text instead. + */ +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + orig_col = startcol; /* Will start backspacing from here */ + else +- #endif + replace_offset = startcol - end_foundcol; + + /* +--- 6646,6654 ---- +*************** +*** 6688,6694 **** + if (startcol < 0) + startcol = 0; + +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + /* +--- 6663,6668 ---- +*************** +*** 6706,6712 **** + backspace_until_column(foundcol); + } + else +- #endif + { + /* put cursor after pos. to break line */ + if (!fo_white_par) +--- 6680,6685 ---- +*************** +*** 6744,6755 **** + get_number_indent(curwin->w_cursor.lnum - 1); + if (second_indent >= 0) + { +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + change_indent(INDENT_SET, second_indent, + FALSE, NUL, TRUE); + else +- #endif + #ifdef FEAT_COMMENTS + if (leader_len > 0 && second_indent - leader_len > 0) + { +--- 6717,6726 ---- +*************** +*** 6778,6784 **** + first_line = FALSE; + } + +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + /* +--- 6749,6754 ---- +*************** +*** 6789,6795 **** + vim_free(saved_text); + } + else +- #endif + { + /* + * Check if cursor is not past the NUL off the line, cindent +--- 6759,6764 ---- +*************** +*** 7140,7152 **** + } + + ai_col = 0; +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + orig_line_count = curbuf->b_ml.ml_line_count; + vr_lines_changed = 1; + } +- #endif + ResetRedobuff(); + AppendToRedobuff((char_u *)"1i"); /* pretend we start an insertion */ + new_insert_skip = 2; +--- 7109,7119 ---- +*************** +*** 7983,7989 **** + replace_do_bs(int limit_col) + { + int cc; +- #ifdef FEAT_VREPLACE + int orig_len = 0; + int ins_len; + int orig_vcols = 0; +--- 7950,7955 ---- +*************** +*** 7991,8002 **** + char_u *p; + int i; + int vcol; +- #endif + + cc = replace_pop(); + if (cc > 0) + { +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + /* Get the number of screen cells used by the character we are +--- 7957,7966 ---- +*************** +*** 8004,8032 **** + getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL); + orig_vcols = chartabsize(ml_get_cursor(), start_vcol); + } +- #endif + #ifdef FEAT_MBYTE + if (has_mbyte) + { + (void)del_char_after_col(limit_col); +- # ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + orig_len = (int)STRLEN(ml_get_cursor()); +- # endif + replace_push(cc); + } + else + #endif + { + pchar_cursor(cc); +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + orig_len = (int)STRLEN(ml_get_cursor()) - 1; +- #endif + } + replace_pop_ins(); + +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + /* Get the number of screen cells used by the inserted characters */ +--- 7968,7990 ---- +*************** +*** 8052,8058 **** + } + curwin->w_cursor.col -= ins_len; + } +- #endif + + /* mark the buffer as changed and prepare for displaying */ + changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col); +--- 8010,8015 ---- +*************** +*** 8966,8976 **** + + # ifdef FEAT_EVAL + set_vim_var_string(VV_INSERTMODE, +! (char_u *)((State & REPLACE_FLAG) ? "i" : +! # ifdef FEAT_VREPLACE +! replaceState == VREPLACE ? "v" : +! # endif +! "r"), 1); + # endif + apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf); + if (State & REPLACE_FLAG) +--- 8923,8931 ---- + + # ifdef FEAT_EVAL + set_vim_var_string(VV_INSERTMODE, +! (char_u *)((State & REPLACE_FLAG) ? "i" +! : replaceState == VREPLACE ? "v" +! : "r"), 1); + # endif + apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf); + if (State & REPLACE_FLAG) +*************** +*** 8990,9000 **** + static void + ins_ctrl_o(void) + { +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + restart_edit = 'V'; + else +- #endif + if (State & REPLACE_FLAG) + restart_edit = 'R'; + else +--- 8945,8953 ---- +*************** +*** 9067,9080 **** + else + { + curwin->w_cursor.col = temp; +- #ifdef FEAT_VREPLACE + /* Adjust orig_line_count in case more lines have been deleted than + * have been added. That makes sure, that open_line() later + * can access all buffer lines correctly */ + if (State & VREPLACE_FLAG && + orig_line_count > curbuf->b_ml.ml_line_count) + orig_line_count = curbuf->b_ml.ml_line_count; +- #endif + } + } + else if (del_char(FALSE) == FAIL) /* delete char under cursor */ +--- 9020,9031 ---- +*************** +*** 9229,9238 **** + } + else + { +- #ifdef FEAT_VREPLACE + if (!(State & VREPLACE_FLAG) + || curwin->w_cursor.lnum > orig_line_count) +- #endif + { + temp = gchar_cursor(); /* remember current char */ + --curwin->w_cursor.lnum; +--- 9180,9187 ---- +*************** +*** 9256,9265 **** + if (temp == NUL && gchar_cursor() != NUL) + inc_cursor(); + } +- #ifdef FEAT_VREPLACE + else + dec_cursor(); +- #endif + + /* + * In REPLACE mode we have to put back the text that was replaced +--- 9205,9212 ---- +*************** +*** 9386,9396 **** + && curwin->w_cursor.col < Insstart_orig.col) + Insstart_orig.col = curwin->w_cursor.col; + +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + ins_char(' '); + else +- #endif + { + ins_str((char_u *)" "); + if ((State & REPLACE_FLAG)) +--- 9333,9341 ---- +*************** +*** 10231,10241 **** + ins_char(' '); + while (--temp > 0) + { +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + ins_char(' '); + else +- #endif + { + ins_str((char_u *)" "); + if (State & REPLACE_FLAG) /* no char replaced */ +--- 10176,10184 ---- +*************** +*** 10255,10264 **** + #endif + { + char_u *ptr; +- #ifdef FEAT_VREPLACE + char_u *saved_line = NULL; /* init for GCC */ + pos_T pos; +- #endif + pos_T fpos; + pos_T *cursor; + colnr_T want_vcol, vcol; +--- 10198,10205 ---- +*************** +*** 10269,10275 **** + * Get the current line. For VREPLACE mode, don't make real changes + * yet, just work on a copy of the line. + */ +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + pos = curwin->w_cursor; +--- 10210,10215 ---- +*************** +*** 10280,10286 **** + ptr = saved_line + pos.col; + } + else +- #endif + { + ptr = ml_get_cursor(); + cursor = &curwin->w_cursor; +--- 10220,10225 ---- +*************** +*** 10360,10370 **** + { + STRMOVE(ptr, ptr + i); + /* correct replace stack. */ +! if ((State & REPLACE_FLAG) +! #ifdef FEAT_VREPLACE +! && !(State & VREPLACE_FLAG) +! #endif +! ) + for (temp = i; --temp >= 0; ) + replace_join(repl_off); + } +--- 10299,10305 ---- + { + STRMOVE(ptr, ptr + i); + /* correct replace stack. */ +! if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG)) + for (temp = i; --temp >= 0; ) + replace_join(repl_off); + } +*************** +*** 10378,10384 **** + #endif + cursor->col -= i; + +- #ifdef FEAT_VREPLACE + /* + * In VREPLACE mode, we haven't changed anything yet. Do it now by + * backspacing over the changed spacing and then inserting the new +--- 10313,10318 ---- +*************** +*** 10394,10406 **** + ins_bytes_len(saved_line + change_col, + cursor->col - change_col); + } +- #endif + } + +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + vim_free(saved_line); +- #endif + curwin->w_p_list = save_list; + } + +--- 10328,10337 ---- +*************** +*** 10427,10437 **** + * character under the cursor. Only push a NUL on the replace stack, + * nothing to put back when the NL is deleted. + */ +! if ((State & REPLACE_FLAG) +! #ifdef FEAT_VREPLACE +! && !(State & VREPLACE_FLAG) +! #endif +! ) + replace_push(NUL); + + /* +--- 10358,10364 ---- + * character under the cursor. Only push a NUL on the replace stack, + * nothing to put back when the NL is deleted. + */ +! if ((State & REPLACE_FLAG) && !(State & VREPLACE_FLAG)) + replace_push(NUL); + + /* +*************** +*** 10700,10710 **** + curwin->w_cursor = *pos; + i = get_indent(); + curwin->w_cursor = old_pos; +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + change_indent(INDENT_SET, i, FALSE, NUL, TRUE); + else +- #endif + (void)set_indent(i, SIN_CHANGED); + } + else if (curwin->w_cursor.col > 0) +--- 10627,10635 ---- +*** ../vim-8.1.0225/src/evalfunc.c 2018-07-29 15:34:20.868300075 +0200 +--- src/evalfunc.c 2018-07-29 15:43:54.165096144 +0200 +*************** +*** 6450,6458 **** + #ifdef FEAT_VISUALEXTRA + "visualextra", + #endif +- #ifdef FEAT_VREPLACE + "vreplace", +- #endif + #ifdef FEAT_VTP + "vtp", + #endif +--- 6450,6456 ---- +*************** +*** 8400,8413 **** + buf[0] = '!'; + else if (State & INSERT) + { +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + buf[0] = 'R'; + buf[1] = 'v'; + } + else +- #endif + { + if (State & REPLACE_FLAG) + buf[0] = 'R'; +--- 8398,8409 ---- +*** ../vim-8.1.0225/src/gui.c 2018-06-28 12:05:07.089006904 +0200 +--- src/gui.c 2018-07-29 15:44:03.357057435 +0200 +*************** +*** 3181,3190 **** + case SELECTMODE: checkfor = MOUSE_VISUAL; break; + case REPLACE: + case REPLACE+LANGMAP: +- # ifdef FEAT_VREPLACE + case VREPLACE: + case VREPLACE+LANGMAP: +- # endif + case INSERT: + case INSERT+LANGMAP: checkfor = MOUSE_INSERT; break; + case ASKMORE: +--- 3181,3188 ---- +*** ../vim-8.1.0225/src/misc1.c 2018-07-25 21:19:09.363656976 +0200 +--- src/misc1.c 2018-07-29 15:45:58.180552032 +0200 +*************** +*** 784,793 **** + char_u *leader = NULL; /* copy of comment leader */ + #endif + char_u *allocated = NULL; /* allocated memory */ +- #if defined(FEAT_SMARTINDENT) || defined(FEAT_VREPLACE) || defined(FEAT_LISP) \ +- || defined(FEAT_CINDENT) || defined(FEAT_COMMENTS) + char_u *p; +- #endif + int saved_char = NUL; /* init for GCC */ + #if defined(FEAT_SMARTINDENT) || defined(FEAT_COMMENTS) + pos_T *pos; +--- 784,790 ---- +*************** +*** 804,810 **** + int no_si = FALSE; /* reset did_si afterwards */ + int first_char = NUL; /* init for GCC */ + #endif +! #if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT)) + int vreplace_mode; + #endif + int did_append; /* appended a new line */ +--- 801,807 ---- + int no_si = FALSE; /* reset did_si afterwards */ + int first_char = NUL; /* init for GCC */ + #endif +! #if defined(FEAT_LISP) || defined(FEAT_CINDENT) + int vreplace_mode; + #endif + int did_append; /* appended a new line */ +*************** +*** 817,823 **** + if (saved_line == NULL) /* out of memory! */ + return FALSE; + +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + /* +--- 814,819 ---- +*************** +*** 857,869 **** + } + saved_line[curwin->w_cursor.col] = NUL; + } +- #endif + +! if ((State & INSERT) +! #ifdef FEAT_VREPLACE +! && !(State & VREPLACE_FLAG) +! #endif +! ) + { + p_extra = saved_line + curwin->w_cursor.col; + #ifdef FEAT_SMARTINDENT +--- 853,860 ---- + } + saved_line[curwin->w_cursor.col] = NUL; + } + +! if ((State & INSERT) && !(State & VREPLACE_FLAG)) + { + p_extra = saved_line + curwin->w_cursor.col; + #ifdef FEAT_SMARTINDENT +*************** +*** 1601,1609 **** + old_cursor = curwin->w_cursor; + if (dir == BACKWARD) + --curwin->w_cursor.lnum; +- #ifdef FEAT_VREPLACE + if (!(State & VREPLACE_FLAG) || old_cursor.lnum >= orig_line_count) +- #endif + { + if (ml_append(curwin->w_cursor.lnum, p_extra, (colnr_T)0, FALSE) + == FAIL) +--- 1592,1598 ---- +*************** +*** 1620,1626 **** + mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L); + did_append = TRUE; + } +- #ifdef FEAT_VREPLACE + else + { + /* +--- 1609,1614 ---- +*************** +*** 1640,1646 **** + curwin->w_cursor.lnum--; + did_append = FALSE; + } +- #endif + + if (newindent + #ifdef FEAT_SMARTINDENT +--- 1628,1633 ---- +*************** +*** 1744,1750 **** + curwin->w_cursor.coladd = 0; + #endif + +! #if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT)) + /* + * In VREPLACE mode, we are handling the replace stack ourselves, so stop + * fixthisline() from doing it (via change_indent()) by telling it we're in +--- 1731,1737 ---- + curwin->w_cursor.coladd = 0; + #endif + +! #if defined(FEAT_LISP) || defined(FEAT_CINDENT) + /* + * In VREPLACE mode, we are handling the replace stack ourselves, so stop + * fixthisline() from doing it (via change_indent()) by telling it we're in +*************** +*** 1791,1802 **** + ai_col = (colnr_T)getwhitecols_curline(); + } + #endif +! #if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT)) + if (vreplace_mode != 0) + State = vreplace_mode; + #endif + +- #ifdef FEAT_VREPLACE + /* + * Finally, VREPLACE gets the stuff on the new line, then puts back the + * original line, and inserts the new stuff char by char, pushing old stuff +--- 1778,1788 ---- + ai_col = (colnr_T)getwhitecols_curline(); + } + #endif +! #if defined(FEAT_LISP) || defined(FEAT_CINDENT) + if (vreplace_mode != 0) + State = vreplace_mode; + #endif + + /* + * Finally, VREPLACE gets the stuff on the new line, then puts back the + * original line, and inserts the new stuff char by char, pushing old stuff +*************** +*** 1821,1827 **** + vim_free(p_extra); + next_line = NULL; + } +- #endif + + retval = OK; /* success! */ + theend: +--- 1807,1812 ---- +*************** +*** 2307,2313 **** + return (count); + } + +- #if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) || defined(PROTO) + /* + * Insert string "p" at the cursor position. Stops at a NUL byte. + * Handles Replace mode and multi-byte characters. +--- 2292,2297 ---- +*************** +*** 2317,2326 **** + { + ins_bytes_len(p, (int)STRLEN(p)); + } +- #endif + +- #if defined(FEAT_VREPLACE) || defined(FEAT_INS_EXPAND) \ +- || defined(FEAT_COMMENTS) || defined(FEAT_MBYTE) || defined(PROTO) + /* + * Insert string "p" with length "len" at the cursor position. + * Handles Replace mode and multi-byte characters. +--- 2301,2307 ---- +*************** +*** 2329,2335 **** + ins_bytes_len(char_u *p, int len) + { + int i; +! # ifdef FEAT_MBYTE + int n; + + if (has_mbyte) +--- 2310,2316 ---- + ins_bytes_len(char_u *p, int len) + { + int i; +! #ifdef FEAT_MBYTE + int n; + + if (has_mbyte) +*************** +*** 2343,2353 **** + ins_char_bytes(p + i, n); + } + else +! # endif + for (i = 0; i < len; ++i) + ins_char(p[i]); + } +- #endif + + /* + * Insert or replace a single character at the cursor position. +--- 2324,2333 ---- + ins_char_bytes(p + i, n); + } + else +! #endif + for (i = 0; i < len; ++i) + ins_char(p[i]); + } + + /* + * Insert or replace a single character at the cursor position. +*************** +*** 2406,2412 **** + + if (State & REPLACE_FLAG) + { +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + { + colnr_T new_vcol = 0; /* init for GCC */ +--- 2386,2391 ---- +*************** +*** 2456,2462 **** + curwin->w_p_list = old_list; + } + else +- #endif + if (oldp[col] != NUL) + { + /* normal replace */ +--- 2435,2440 ---- +*** ../vim-8.1.0225/src/misc2.c 2018-06-29 20:28:27.505661796 +0200 +--- src/misc2.c 2018-07-29 15:46:23.876433899 +0200 +*************** +*** 3766,3775 **** + #endif + if (!mouse && State == SHOWMATCH) + return SHAPE_IDX_SM; +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + return SHAPE_IDX_R; +- #endif + if (State & REPLACE_FLAG) + return SHAPE_IDX_R; + if (State & INSERT) +--- 3766,3773 ---- +*** ../vim-8.1.0225/src/normal.c 2018-07-25 22:36:48.987518583 +0200 +--- src/normal.c 2018-07-29 15:46:49.824312935 +0200 +*************** +*** 111,119 **** + static void nv_undo(cmdarg_T *cap); + static void nv_kundo(cmdarg_T *cap); + static void nv_Replace(cmdarg_T *cap); +- #ifdef FEAT_VREPLACE + static void nv_vreplace(cmdarg_T *cap); +- #endif + static void v_swap_corners(int cmdchar); + static void nv_replace(cmdarg_T *cap); + static void n_swapchar(cmdarg_T *cap); +--- 111,117 ---- +*************** +*** 7300,7306 **** + } + } + +- #ifdef FEAT_VREPLACE + /* + * "gr". + */ +--- 7298,7303 ---- +*************** +*** 7323,7337 **** + cap->extra_char = get_literal(); + stuffcharReadbuff(cap->extra_char); + stuffcharReadbuff(ESC); +! # ifdef FEAT_VIRTUALEDIT + if (virtual_active()) + coladvance(getviscol()); +! # endif + invoke_edit(cap, TRUE, 'v', FALSE); + } + } + } +- #endif + + /* + * Swap case for "~" command, when it does not work like an operator. +--- 7320,7333 ---- + cap->extra_char = get_literal(); + stuffcharReadbuff(cap->extra_char); + stuffcharReadbuff(ESC); +! #ifdef FEAT_VIRTUALEDIT + if (virtual_active()) + coladvance(getviscol()); +! #endif + invoke_edit(cap, TRUE, 'v', FALSE); + } + } + } + + /* + * Swap case for "~" command, when it does not work like an operator. +*************** +*** 7944,7950 **** + clearopbeep(oap); + break; + +- #ifdef FEAT_VREPLACE + /* + * "gR": Enter virtual replace mode. + */ +--- 7940,7945 ---- +*************** +*** 7956,7962 **** + case 'r': + nv_vreplace(cap); + break; +- #endif + + case '&': + do_cmdline_cmd((char_u *)"%s//~/&"); +--- 7951,7956 ---- +*** ../vim-8.1.0225/src/ops.c 2018-07-08 16:50:33.107216836 +0200 +--- src/ops.c 2018-07-29 15:47:03.452248760 +0200 +*************** +*** 376,386 **** + } + + /* Set new indent */ +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + change_indent(INDENT_SET, count, FALSE, NUL, call_changed_bytes); + else +- #endif + (void)set_indent(count, call_changed_bytes ? SIN_CHANGED : 0); + } + +--- 376,384 ---- +*** ../vim-8.1.0225/src/screen.c 2018-06-28 22:22:56.233315600 +0200 +--- src/screen.c 2018-07-29 15:47:23.308154491 +0200 +*************** +*** 10375,10386 **** + else + #endif + { +- #ifdef FEAT_VREPLACE + if (State & VREPLACE_FLAG) + MSG_PUTS_ATTR(_(" VREPLACE"), attr); +! else +! #endif +! if (State & REPLACE_FLAG) + MSG_PUTS_ATTR(_(" REPLACE"), attr); + else if (State & INSERT) + { +--- 10375,10383 ---- + else + #endif + { + if (State & VREPLACE_FLAG) + MSG_PUTS_ATTR(_(" VREPLACE"), attr); +! else if (State & REPLACE_FLAG) + MSG_PUTS_ATTR(_(" REPLACE"), attr); + else if (State & INSERT) + { +*** ../vim-8.1.0225/src/version.c 2018-07-29 15:34:20.868300075 +0200 +--- src/version.c 2018-07-29 15:50:26.887245482 +0200 +*************** +*** 714,724 **** + #else + "-viminfo", + #endif +- #ifdef FEAT_VREPLACE + "+vreplace", +- #else +- "-vreplace", +- #endif + #ifdef WIN3264 + # ifdef FEAT_VTP + "+vtp", +--- 714,720 ---- +*** ../vim-8.1.0225/src/feature.h 2018-06-23 19:22:45.606486311 +0200 +--- src/feature.h 2018-07-29 15:47:53.028011765 +0200 +*************** +*** 207,219 **** + #endif + + /* +- * +vreplace "gR" and "gr" commands. +- */ +- #ifdef FEAT_NORMAL +- # define FEAT_VREPLACE +- #endif +- +- /* + * +cmdline_info 'showcmd' and 'ruler' options. + */ + #ifdef FEAT_NORMAL +--- 207,212 ---- +*** ../vim-8.1.0225/src/globals.h 2018-06-23 16:12:15.780258265 +0200 +--- src/globals.h 2018-07-29 15:48:07.903939623 +0200 +*************** +*** 778,790 **** + * op_insert(), to detect correctly where inserting by the user started. */ + EXTERN pos_T Insstart_orig; + +- #ifdef FEAT_VREPLACE + /* + * Stuff for VREPLACE mode. + */ + EXTERN int orig_line_count INIT(= 0); /* Line count when "gR" started */ + EXTERN int vr_lines_changed INIT(= 0); /* #Lines changed by "gR" so far */ +- #endif + + #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) + /* argument to SETJMP() for handling X IO errors */ +--- 778,788 ---- +*** ../vim-8.1.0225/src/macros.h 2018-06-28 19:26:24.321655175 +0200 +--- src/macros.h 2018-07-29 15:48:34.883807640 +0200 +*************** +*** 235,245 **** + # define TIME_MSG(s) do { /**/ } while (0) + #endif + +! #ifdef FEAT_VREPLACE +! # define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG)) +! #else +! # define REPLACE_NORMAL(s) ((s) & REPLACE_FLAG) +! #endif + + #ifdef FEAT_ARABIC + # define UTF_COMPOSINGLIKE(p1, p2) utf_composinglike((p1), (p2)) +--- 235,241 ---- + # define TIME_MSG(s) do { /**/ } while (0) + #endif + +! #define REPLACE_NORMAL(s) (((s) & REPLACE_FLAG) && !((s) & VREPLACE_FLAG)) + + #ifdef FEAT_ARABIC + # define UTF_COMPOSINGLIKE(p1, p2) utf_composinglike((p1), (p2)) +*** ../vim-8.1.0225/src/vim.h 2018-06-23 14:21:38.467484932 +0200 +--- src/vim.h 2018-07-29 15:48:48.695739525 +0200 +*************** +*** 675,684 **** + + #define REPLACE_FLAG 0x40 /* Replace mode flag */ + #define REPLACE (REPLACE_FLAG + INSERT) +! #ifdef FEAT_VREPLACE +! # define VREPLACE_FLAG 0x80 /* Virtual-replace mode flag */ +! # define VREPLACE (REPLACE_FLAG + VREPLACE_FLAG + INSERT) +! #endif + #define LREPLACE (REPLACE_FLAG + LANGMAP) + + #define NORMAL_BUSY (0x100 + NORMAL) /* Normal mode, busy with a command */ +--- 675,682 ---- + + #define REPLACE_FLAG 0x40 /* Replace mode flag */ + #define REPLACE (REPLACE_FLAG + INSERT) +! #define VREPLACE_FLAG 0x80 /* Virtual-replace mode flag */ +! #define VREPLACE (REPLACE_FLAG + VREPLACE_FLAG + INSERT) + #define LREPLACE (REPLACE_FLAG + LANGMAP) + + #define NORMAL_BUSY (0x100 + NORMAL) /* Normal mode, busy with a command */ +*** ../vim-8.1.0225/src/version.c 2018-07-29 15:34:20.868300075 +0200 +--- src/version.c 2018-07-29 15:50:26.887245482 +0200 +*************** +*** 800,801 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 226, + /**/ + +-- +Shit makes the flowers grow and that's beautiful + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0227 b/data/vim/patches/8.1.0227 new file mode 100644 index 000000000..91e81d40d --- /dev/null +++ b/data/vim/patches/8.1.0227 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0227 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0227 +Problem: Spaces instead of tabs in makefile. +Solution: Use tabs and fix sorting. (Ken Takata) +Files: src/po/Make_all.mak + + +*** ../vim-8.1.0226/src/po/Make_all.mak 2018-06-24 15:52:37.075719437 +0200 +--- src/po/Make_all.mak 2018-07-29 16:10:57.264347570 +0200 +*************** +*** 21,26 **** +--- 21,27 ---- + ja.sjis \ + ko \ + ko.UTF-8 \ ++ lv \ + nb \ + nl \ + no \ +*************** +*** 42,48 **** + zh_CN.cp936 \ + zh_TW \ + zh_TW.UTF-8 \ +- lv \ + + + MOFILES = \ +--- 43,48 ---- +*************** +*** 61,66 **** +--- 61,67 ---- + ja.mo \ + ko.UTF-8.mo \ + ko.mo \ ++ lv.mo \ + nb.mo \ + nl.mo \ + no.mo \ +*************** +*** 76,82 **** + zh_CN.mo \ + zh_TW.UTF-8.mo \ + zh_TW.mo \ +- lv.mo \ + + + MOCONVERTED = \ +--- 77,82 ---- +*** ../vim-8.1.0226/src/version.c 2018-07-29 16:09:14.644945560 +0200 +--- src/version.c 2018-07-29 16:12:16.627884068 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 227, + /**/ + +-- +Have you heard about the new Barbie doll? It's called Divorce +Barbie. It comes with all of Ken's stuff. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0228 b/data/vim/patches/8.1.0228 new file mode 100644 index 000000000..6c1ab54c7 --- /dev/null +++ b/data/vim/patches/8.1.0228 @@ -0,0 +1,569 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0228 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0228 +Problem: Dropping files is ignored while Vim is busy. +Solution: Postpone the effect of dropping files until it's safe. +Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/gui.c, src/gui.h, + src/screen.c, src/main.c, src/gui_mac.c + + +*** ../vim-8.1.0227/src/ex_docmd.c 2018-07-28 17:07:48.608154066 +0200 +--- src/ex_docmd.c 2018-07-29 17:22:20.940320176 +0200 +*************** +*** 7859,7915 **** + do_shell(NULL, 0); + } + +! #if defined(HAVE_DROP_FILE) \ +! || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \ +! || defined(FEAT_GUI_MSWIN) \ +! || defined(FEAT_GUI_MAC) \ +! || defined(PROTO) + +! /* +! * Handle a file drop. The code is here because a drop is *nearly* like an +! * :args command, but not quite (we have a list of exact filenames, so we +! * don't want to (a) parse a command line, or (b) expand wildcards. So the +! * code is very similar to :args and hence needs access to a lot of the static +! * functions in this file. +! * +! * The list should be allocated using alloc(), as should each item in the +! * list. This function takes over responsibility for freeing the list. +! * +! * XXX The list is made into the argument list. This is freed using +! * FreeWild(), which does a series of vim_free() calls. +! */ +! void +! handle_drop( +! int filec, /* the number of files dropped */ +! char_u **filev, /* the list of files dropped */ +! int split) /* force splitting the window */ + { + exarg_T ea; + int save_msg_scroll = msg_scroll; + +! /* Postpone this while editing the command line. */ +! if (text_locked()) +! return; +! if (curbuf_locked()) +! return; +! +! /* When the screen is being updated we should not change buffers and +! * windows structures, it may cause freed memory to be used. */ +! if (updating_screen) +! return; + + /* Check whether the current buffer is changed. If so, we will need + * to split the current window or data could be lost. + * We don't need to check if the 'hidden' option is set, as in this + * case the buffer won't be lost. + */ +! if (!buf_hide(curbuf) && !split) + { + ++emsg_off; +! split = check_changed(curbuf, CCGD_AW); + --emsg_off; + } +! if (split) + { + if (win_split(0, 0) == FAIL) + return; +--- 7859,7895 ---- + do_shell(NULL, 0); + } + +! #if defined(HAVE_DROP_FILE) || defined(PROTO) + +! static int drop_busy = FALSE; +! static int drop_filec; +! static char_u **drop_filev = NULL; +! static int drop_split; +! static void (*drop_callback)(void *); +! static void *drop_cookie; +! +! static void +! handle_drop_internal(void) + { + exarg_T ea; + int save_msg_scroll = msg_scroll; + +! // Setting the argument list may cause screen updates and being called +! // recursively. Avoid that by setting drop_busy. +! drop_busy = TRUE; + + /* Check whether the current buffer is changed. If so, we will need + * to split the current window or data could be lost. + * We don't need to check if the 'hidden' option is set, as in this + * case the buffer won't be lost. + */ +! if (!buf_hide(curbuf) && !drop_split) + { + ++emsg_off; +! drop_split = check_changed(curbuf, CCGD_AW); + --emsg_off; + } +! if (drop_split) + { + if (win_split(0, 0) == FAIL) + return; +*************** +*** 7924,7930 **** + /* + * Set up the new argument list. + */ +! alist_set(ALIST(curwin), filec, filev, FALSE, NULL, 0); + + /* + * Move to the first file. +--- 7904,7910 ---- + /* + * Set up the new argument list. + */ +! alist_set(ALIST(curwin), drop_filec, drop_filev, FALSE, NULL, 0); + + /* + * Move to the first file. +*************** +*** 7942,7947 **** +--- 7922,7999 ---- + * unexpectedly. The screen will be redrawn by the caller, thus + * msg_scroll being set by displaying a message is irrelevant. */ + msg_scroll = save_msg_scroll; ++ ++ if (drop_callback != NULL) ++ drop_callback(drop_cookie); ++ ++ drop_filev = NULL; ++ drop_busy = FALSE; ++ } ++ ++ /* ++ * Handle a file drop. The code is here because a drop is *nearly* like an ++ * :args command, but not quite (we have a list of exact filenames, so we ++ * don't want to (a) parse a command line, or (b) expand wildcards. So the ++ * code is very similar to :args and hence needs access to a lot of the static ++ * functions in this file. ++ * ++ * The "filev" list must have been allocated using alloc(), as should each item ++ * in the list. This function takes over responsibility for freeing the "filev" ++ * list. ++ */ ++ void ++ handle_drop( ++ int filec, // the number of files dropped ++ char_u **filev, // the list of files dropped ++ int split, // force splitting the window ++ void (*callback)(void *), // to be called after setting the argument ++ // list ++ void *cookie) // argument for "callback" (allocated) ++ { ++ // Cannot handle recursive drops, finish the pending one. ++ if (drop_busy) ++ { ++ FreeWild(filec, filev); ++ vim_free(cookie); ++ return; ++ } ++ ++ // When calling handle_drop() more than once in a row we only use the last ++ // one. ++ if (drop_filev != NULL) ++ { ++ FreeWild(drop_filec, drop_filev); ++ vim_free(drop_cookie); ++ } ++ ++ drop_filec = filec; ++ drop_filev = filev; ++ drop_split = split; ++ drop_callback = callback; ++ drop_cookie = cookie; ++ ++ // Postpone this when: ++ // - editing the command line ++ // - not possible to change the current buffer ++ // - updating the screen ++ // As it may change buffers and window structures that are in use and cause ++ // freed memory to be used. ++ if (text_locked() || curbuf_locked() || updating_screen) ++ return; ++ ++ handle_drop_internal(); ++ } ++ ++ /* ++ * To be called when text is unlocked, curbuf is unlocked or updating_screen is ++ * reset: Handle a postponed drop. ++ */ ++ void ++ handle_any_postponed_drop(void) ++ { ++ if (!drop_busy && drop_filev != NULL ++ && !text_locked() && !curbuf_locked() && !updating_screen) ++ handle_drop_internal(); + } + #endif + +*** ../vim-8.1.0227/src/proto/ex_docmd.pro 2018-05-17 13:52:34.000000000 +0200 +--- src/proto/ex_docmd.pro 2018-07-29 16:58:19.612440949 +0200 +*************** +*** 31,37 **** + void tabpage_close(int forceit); + void tabpage_close_other(tabpage_T *tp, int forceit); + void ex_all(exarg_T *eap); +! void handle_drop(int filec, char_u **filev, int split); + void alist_clear(alist_T *al); + void alist_init(alist_T *al); + void alist_unlink(alist_T *al); +--- 31,38 ---- + void tabpage_close(int forceit); + void tabpage_close_other(tabpage_T *tp, int forceit); + void ex_all(exarg_T *eap); +! void handle_drop(int filec, char_u **filev, int split, void (*callback)(void *), void *cookie); +! void handle_any_postponed_drop(void); + void alist_clear(alist_T *al); + void alist_init(alist_T *al); + void alist_unlink(alist_T *al); +*** ../vim-8.1.0227/src/gui.c 2018-07-29 16:09:14.636945607 +0200 +--- src/gui.c 2018-07-29 16:52:45.218249227 +0200 +*************** +*** 5383,5392 **** + + #endif + +! #if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \ +! || defined(FEAT_GUI_MSWIN) \ +! || defined(FEAT_GUI_MAC) \ +! || defined(PROTO) + + static void gui_wingoto_xy(int x, int y); + +--- 5383,5389 ---- + + #endif + +! #if defined(HAVE_DROP_FILE) || defined(PROTO) + + static void gui_wingoto_xy(int x, int y); + +*************** +*** 5409,5414 **** +--- 5406,5447 ---- + } + + /* ++ * Function passed to handle_drop() for the actions to be done after the ++ * argument list has been updated. ++ */ ++ static void ++ drop_callback(void *cookie) ++ { ++ char_u *p = cookie; ++ ++ /* If Shift held down, change to first file's directory. If the first ++ * item is a directory, change to that directory (and let the explorer ++ * plugin show the contents). */ ++ if (p != NULL) ++ { ++ if (mch_isdir(p)) ++ { ++ if (mch_chdir((char *)p) == 0) ++ shorten_fnames(TRUE); ++ } ++ else if (vim_chdirfile(p, "drop") == OK) ++ shorten_fnames(TRUE); ++ vim_free(p); ++ } ++ ++ /* Update the screen display */ ++ update_screen(NOT_VALID); ++ # ifdef FEAT_MENU ++ gui_update_menus(0); ++ # endif ++ #ifdef FEAT_TITLE ++ maketitle(); ++ #endif ++ setcursor(); ++ out_flush_cursor(FALSE, FALSE); ++ } ++ ++ /* + * Process file drop. Mouse cursor position, key modifiers, name of files + * and count of files are given. Argument "fnames[count]" has full pathnames + * of dropped files, they will be freed in this function, and caller can't use +*************** +*** 5488,5520 **** + vim_free(fnames); + } + else +! handle_drop(count, fnames, (modifiers & MOUSE_CTRL) != 0); +! +! /* If Shift held down, change to first file's directory. If the first +! * item is a directory, change to that directory (and let the explorer +! * plugin show the contents). */ +! if (p != NULL) +! { +! if (mch_isdir(p)) +! { +! if (mch_chdir((char *)p) == 0) +! shorten_fnames(TRUE); +! } +! else if (vim_chdirfile(p, "drop") == OK) +! shorten_fnames(TRUE); +! vim_free(p); +! } +! +! /* Update the screen display */ +! update_screen(NOT_VALID); +! # ifdef FEAT_MENU +! gui_update_menus(0); +! # endif +! #ifdef FEAT_TITLE +! maketitle(); +! #endif +! setcursor(); +! out_flush_cursor(FALSE, FALSE); + } + + entered = FALSE; +--- 5521,5528 ---- + vim_free(fnames); + } + else +! handle_drop(count, fnames, (modifiers & MOUSE_CTRL) != 0, +! drop_callback, (void *)p); + } + + entered = FALSE; +*** ../vim-8.1.0227/src/gui.h 2018-05-05 18:42:37.000000000 +0200 +--- src/gui.h 2018-07-29 16:52:19.418385701 +0200 +*************** +*** 65,72 **** + /* + * GUIs that support dropping files on a running Vim. + */ +! #if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) \ +! || defined(FEAT_GUI_GTK) + # define HAVE_DROP_FILE + #endif + +--- 65,73 ---- + /* + * GUIs that support dropping files on a running Vim. + */ +! #if (defined(FEAT_DND) && defined(FEAT_GUI_GTK)) \ +! || defined(FEAT_GUI_MSWIN) \ +! || defined(FEAT_GUI_MAC) + # define HAVE_DROP_FILE + #endif + +*** ../vim-8.1.0227/src/screen.c 2018-07-29 16:09:14.644945560 +0200 +--- src/screen.c 2018-07-29 16:51:41.606584708 +0200 +*************** +*** 526,531 **** +--- 526,537 ---- + #ifdef FEAT_TERMINAL + term_check_channel_closed_recently(); + #endif ++ ++ #ifdef HAVE_DROP_FILE ++ // If handle_drop() was called while updating_screen was TRUE need to ++ // handle the drop now. ++ handle_any_postponed_drop(); ++ #endif + } + + /* +*** ../vim-8.1.0227/src/main.c 2018-06-23 16:12:15.784258242 +0200 +--- src/main.c 2018-07-29 17:02:36.091020303 +0200 +*************** +*** 911,917 **** + + /* + * Call the main command loop. This never returns. +! */ + main_loop(FALSE, FALSE); + + #endif /* NO_VIM_MAIN */ +--- 911,917 ---- + + /* + * Call the main command loop. This never returns. +! */ + main_loop(FALSE, FALSE); + + #endif /* NO_VIM_MAIN */ +*************** +*** 1155,1163 **** + else if (do_redraw || stuff_empty()) + { + #ifdef FEAT_GUI +! /* If ui_breakcheck() was used a resize may have been postponed. */ + gui_may_resize_shell(); + #endif + /* Trigger CursorMoved if the cursor moved. */ + if (!finish_op && ( + has_cursormoved() +--- 1155,1169 ---- + else if (do_redraw || stuff_empty()) + { + #ifdef FEAT_GUI +! // If ui_breakcheck() was used a resize may have been postponed. + gui_may_resize_shell(); + #endif ++ #ifdef HAVE_DROP_FILE ++ // If files were dropped while text was locked or the curbuf was ++ // locked, this would be a good time to handle the drop. ++ handle_any_postponed_drop(); ++ #endif ++ + /* Trigger CursorMoved if the cursor moved. */ + if (!finish_op && ( + has_cursormoved() +*** ../vim-8.1.0227/src/gui_mac.c 2018-03-06 18:53:06.000000000 +0100 +--- src/gui_mac.c 2018-07-29 17:33:07.670760672 +0200 +*************** +*** 1007,1012 **** +--- 1007,1061 ---- + long theDate; // modification date/time + }; + ++ static long drop_numFiles; ++ static short drop_gotPosition; ++ static SelectionRange drop_thePosition; ++ ++ static void ++ drop_callback(void *cookie UNUSED) ++ { ++ /* TODO: Handle the goto/select line more cleanly */ ++ if ((drop_numFiles == 1) & (drop_gotPosition)) ++ { ++ if (drop_thePosition.lineNum >= 0) ++ { ++ lnum = drop_thePosition.lineNum + 1; ++ /* oap->motion_type = MLINE; ++ setpcmark();*/ ++ if (lnum < 1L) ++ lnum = 1L; ++ else if (lnum > curbuf->b_ml.ml_line_count) ++ lnum = curbuf->b_ml.ml_line_count; ++ curwin->w_cursor.lnum = lnum; ++ curwin->w_cursor.col = 0; ++ /* beginline(BL_SOL | BL_FIX);*/ ++ } ++ else ++ goto_byte(drop_thePosition.startRange + 1); ++ } ++ ++ /* Update the screen display */ ++ update_screen(NOT_VALID); ++ ++ /* Select the text if possible */ ++ if (drop_gotPosition) ++ { ++ VIsual_active = TRUE; ++ VIsual_select = FALSE; ++ VIsual = curwin->w_cursor; ++ if (drop_thePosition.lineNum < 0) ++ { ++ VIsual_mode = 'v'; ++ goto_byte(drop_thePosition.endRange); ++ } ++ else ++ { ++ VIsual_mode = 'V'; ++ VIsual.col = 0; ++ } ++ } ++ } ++ + /* The IDE uses the optional keyAEPosition parameter to tell the ed- + itor the selection range. If lineNum is zero or greater, scroll the text + to the specified line. If lineNum is less than zero, use the values in +*************** +*** 1113,1160 **** + } + + /* Handle the drop, :edit to get to the file */ +! handle_drop(numFiles, fnames, FALSE); +! +! /* TODO: Handle the goto/select line more cleanly */ +! if ((numFiles == 1) & (gotPosition)) +! { +! if (thePosition.lineNum >= 0) +! { +! lnum = thePosition.lineNum + 1; +! /* oap->motion_type = MLINE; +! setpcmark();*/ +! if (lnum < 1L) +! lnum = 1L; +! else if (lnum > curbuf->b_ml.ml_line_count) +! lnum = curbuf->b_ml.ml_line_count; +! curwin->w_cursor.lnum = lnum; +! curwin->w_cursor.col = 0; +! /* beginline(BL_SOL | BL_FIX);*/ +! } +! else +! goto_byte(thePosition.startRange + 1); +! } +! +! /* Update the screen display */ +! update_screen(NOT_VALID); +! +! /* Select the text if possible */ +! if (gotPosition) +! { +! VIsual_active = TRUE; +! VIsual_select = FALSE; +! VIsual = curwin->w_cursor; +! if (thePosition.lineNum < 0) +! { +! VIsual_mode = 'v'; +! goto_byte(thePosition.endRange); +! } +! else +! { +! VIsual_mode = 'V'; +! VIsual.col = 0; +! } +! } + + setcursor(); + out_flush(); +--- 1162,1171 ---- + } + + /* Handle the drop, :edit to get to the file */ +! drop_numFiles = numFiles; +! drop_gotPosition = gotPosition; +! drop_thePosition = thePosition; +! handle_drop(numFiles, fnames, FALSE, drop_callback, NULL); + + setcursor(); + out_flush(); +*** ../vim-8.1.0227/src/version.c 2018-07-29 16:13:13.431551849 +0200 +--- src/version.c 2018-07-29 16:44:55.344870301 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 228, + /**/ + + +-- +We do not stumble over mountains, but over molehills. + Confucius + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0229 b/data/vim/patches/8.1.0229 new file mode 100644 index 000000000..089e17bea --- /dev/null +++ b/data/vim/patches/8.1.0229 @@ -0,0 +1,124 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0229 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0229 +Problem: Crash when dumping profiling data. +Solution: Reset flag indicating that initialization was done. +Files: src/userfunc.c + + +*** ../vim-8.1.0228/src/userfunc.c 2018-07-10 19:39:14.994973018 +0200 +--- src/userfunc.c 2018-07-22 03:43:14.268242302 +0200 +*************** +*** 1102,1107 **** +--- 1102,1122 ---- + return FALSE; + } + ++ static void ++ func_clear_items(ufunc_T *fp) ++ { ++ ga_clear_strings(&(fp->uf_args)); ++ ga_clear_strings(&(fp->uf_lines)); ++ #ifdef FEAT_PROFILE ++ vim_free(fp->uf_tml_count); ++ fp->uf_tml_count = NULL; ++ vim_free(fp->uf_tml_total); ++ fp->uf_tml_total = NULL; ++ vim_free(fp->uf_tml_self); ++ fp->uf_tml_self = NULL; ++ #endif ++ } ++ + /* + * Free all things that a function contains. Does not free the function + * itself, use func_free() for that. +*************** +*** 1115,1127 **** + fp->uf_cleared = TRUE; + + /* clear this function */ +! ga_clear_strings(&(fp->uf_args)); +! ga_clear_strings(&(fp->uf_lines)); +! #ifdef FEAT_PROFILE +! vim_free(fp->uf_tml_count); +! vim_free(fp->uf_tml_total); +! vim_free(fp->uf_tml_self); +! #endif + funccal_unref(fp->uf_scoped, fp, force); + } + +--- 1130,1136 ---- + fp->uf_cleared = TRUE; + + /* clear this function */ +! func_clear_items(fp); + funccal_unref(fp->uf_scoped, fp, force); + } + +*************** +*** 2312,2320 **** + else + { + /* redefine existing function */ +- ga_clear_strings(&(fp->uf_args)); +- ga_clear_strings(&(fp->uf_lines)); + VIM_CLEAR(name); + } + } + } +--- 2321,2332 ---- + else + { + /* redefine existing function */ + VIM_CLEAR(name); ++ func_clear_items(fp); ++ #ifdef FEAT_PROFILE ++ fp->uf_profiling = FALSE; ++ fp->uf_prof_initialized = FALSE; ++ #endif + } + } + } +*************** +*** 2434,2443 **** + fp->uf_scoped = NULL; + + #ifdef FEAT_PROFILE +- fp->uf_tml_count = NULL; +- fp->uf_tml_total = NULL; +- fp->uf_tml_self = NULL; +- fp->uf_profiling = FALSE; + if (prof_def_func()) + func_do_profile(fp); + #endif +--- 2446,2451 ---- +*** ../vim-8.1.0228/src/version.c 2018-07-29 17:35:19.497750288 +0200 +--- src/version.c 2018-07-29 17:40:20.711582375 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 229, + /**/ + +-- +CUSTOMER: Well, can you hang around a couple of minutes? He won't be + long. +MORTICIAN: Naaah, I got to go on to Robinson's -- they've lost nine today. +CUSTOMER: Well, when is your next round? +MORTICIAN: Thursday. +DEAD PERSON: I think I'll go for a walk. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0230 b/data/vim/patches/8.1.0230 new file mode 100644 index 000000000..315207b0f --- /dev/null +++ b/data/vim/patches/8.1.0230 @@ -0,0 +1,156 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0230 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0230 +Problem: Directly checking 'buftype' value. +Solution: Add the bt_normal() function. (Yegappan Lakshmanan) +Files: src/buffer.c, src/ex_docmd.c, src/fileio.c, src/proto/buffer.pro, + src/quickfix.c + +*** ../vim-8.1.0229/src/buffer.c 2018-06-23 19:22:45.598486362 +0200 +--- src/buffer.c 2018-08-01 17:39:05.854918677 +0200 +*************** +*** 5627,5632 **** +--- 5627,5641 ---- + #endif + + /* ++ * Return TRUE if "buf" is a normal buffer, 'buftype' is empty. ++ */ ++ int ++ bt_normal(buf_T *buf) ++ { ++ return buf != NULL && buf->b_p_bt[0] == NUL; ++ } ++ ++ /* + * Return TRUE if "buf" is the quickfix buffer. + */ + int +*** ../vim-8.1.0229/src/ex_docmd.c 2018-07-29 17:35:19.493750319 +0200 +--- src/ex_docmd.c 2018-08-01 17:37:07.895552456 +0200 +*************** +*** 11768,11774 **** + */ + if ((*flagp & SSOP_FOLDS) + && wp->w_buffer->b_ffname != NULL +! && (*wp->w_buffer->b_p_bt == NUL || bt_help(wp->w_buffer))) + { + if (put_folds(fd, wp) == FAIL) + return FAIL; +--- 11768,11774 ---- + */ + if ((*flagp & SSOP_FOLDS) + && wp->w_buffer->b_ffname != NULL +! && (bt_normal(wp->w_buffer) || bt_help(wp->w_buffer))) + { + if (put_folds(fd, wp) == FAIL) + return FAIL; +*** ../vim-8.1.0229/src/fileio.c 2018-07-07 18:34:08.430551330 +0200 +--- src/fileio.c 2018-08-01 17:37:07.899552434 +0200 +*************** +*** 6897,6903 **** + * this buffer. */ + if (buf->b_ffname == NULL + || buf->b_ml.ml_mfp == NULL +! || *buf->b_p_bt != NUL + || buf->b_saving + || busy + #ifdef FEAT_NETBEANS_INTG +--- 6897,6903 ---- + * this buffer. */ + if (buf->b_ffname == NULL + || buf->b_ml.ml_mfp == NULL +! || !bt_normal(buf) + || buf->b_saving + || busy + #ifdef FEAT_NETBEANS_INTG +*** ../vim-8.1.0229/src/proto/buffer.pro 2018-06-03 14:42:17.848505102 +0200 +--- src/proto/buffer.pro 2018-08-01 17:39:55.638650591 +0200 +*************** +*** 56,61 **** +--- 56,62 ---- + void do_modelines(int flags); + int read_viminfo_bufferlist(vir_T *virp, int writing); + void write_viminfo_bufferlist(FILE *fp); ++ int bt_normal(buf_T *buf); + int bt_quickfix(buf_T *buf); + int bt_terminal(buf_T *buf); + int bt_help(buf_T *buf); +*** ../vim-8.1.0229/src/quickfix.c 2018-07-25 22:36:48.991518559 +0200 +--- src/quickfix.c 2018-08-01 17:37:07.899552434 +0200 +*************** +*** 2487,2493 **** + win_T *wp; + + FOR_ALL_WINDOWS(wp) +! if (wp->w_buffer->b_p_bt[0] == NUL) + return wp; + + return NULL; +--- 2487,2493 ---- + win_T *wp; + + FOR_ALL_WINDOWS(wp) +! if (bt_normal(wp->w_buffer)) + return wp; + + return NULL; +*************** +*** 2563,2569 **** + win = curwin; + do + { +! if (win->w_buffer->b_p_bt[0] == NUL) + break; + if (win->w_prev == NULL) + win = lastwin; /* wrap around the top */ +--- 2563,2569 ---- + win = curwin; + do + { +! if (bt_normal(win->w_buffer)) + break; + if (win->w_prev == NULL) + win = lastwin; /* wrap around the top */ +*************** +*** 2620,2627 **** + } + + /* Remember a usable window. */ +! if (altwin == NULL && !win->w_p_pvw +! && win->w_buffer->b_p_bt[0] == NUL) + altwin = win; + } + +--- 2620,2626 ---- + } + + /* Remember a usable window. */ +! if (altwin == NULL && !win->w_p_pvw && bt_normal(win->w_buffer)) + altwin = win; + } + +*** ../vim-8.1.0229/src/version.c 2018-07-29 17:40:37.239467625 +0200 +--- src/version.c 2018-08-01 17:38:23.335147376 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 230, + /**/ + +-- +Individualists unite! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0231 b/data/vim/patches/8.1.0231 new file mode 100644 index 000000000..00ee879a4 --- /dev/null +++ b/data/vim/patches/8.1.0231 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0231 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0231 +Problem: :help -? goes to help for -+. +Solution: Add -? to list of special cases. (Hirohito Higashi) +Files: src/ex_cmds.c, src/testdir/test_help_tagjump.vim + + +*** ../vim-8.1.0230/src/ex_cmds.c 2018-06-28 22:22:56.225315645 +0200 +--- src/ex_cmds.c 2018-08-01 17:59:36.447037278 +0200 +*************** +*** 6583,6589 **** + static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*", + "/*", "/\\*", "\"*", "**", + "cpo-*", "/\\(\\)", "/\\%(\\)", +! "?", ":?", "?", "g?", "g?g?", "g??", + "/\\?", "/\\z(\\)", "\\=", ":s\\=", + "[count]", "[quotex]", + "[range]", ":[range]", +--- 6583,6589 ---- + static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*", + "/*", "/\\*", "\"*", "**", + "cpo-*", "/\\(\\)", "/\\%(\\)", +! "?", ":?", "-?", "?", "g?", "g?g?", "g??", + "/\\?", "/\\z(\\)", "\\=", ":s\\=", + "[count]", "[quotex]", + "[range]", ":[range]", +*************** +*** 6593,6599 **** + static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", + "/star", "/\\\\star", "quotestar", "starstar", + "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)", +! "?", ":?", "?", "g?", "g?g?", "g??", + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", + "\\[range]", ":\\[range]", +--- 6593,6599 ---- + static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", + "/star", "/\\\\star", "quotestar", "starstar", + "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)", +! "?", ":?", "-?", "?", "g?", "g?g?", "g??", + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", + "\\[range]", ":\\[range]", +*** ../vim-8.1.0230/src/testdir/test_help_tagjump.vim 2017-03-16 22:15:33.000000000 +0100 +--- src/testdir/test_help_tagjump.vim 2018-08-01 17:59:36.447037278 +0200 +*************** +*** 26,31 **** +--- 26,36 ---- + call assert_true(getline('.') =~ '\*:?\*') + helpclose + ++ help -? ++ call assert_equal("help", &filetype) ++ call assert_true(getline('.') =~ '\*-?\*') ++ helpclose ++ + help FileW*Post + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*FileWritePost\*') +*** ../vim-8.1.0230/src/version.c 2018-08-01 17:53:04.693381270 +0200 +--- src/version.c 2018-08-01 18:01:08.102499244 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 231, + /**/ + +-- +ARTHUR: Then who is your lord? +WOMAN: We don't have a lord. +ARTHUR: What? +DENNIS: I told you. We're an anarcho-syndicalist commune. We take it in + turns to act as a sort of executive officer for the week. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0232 b/data/vim/patches/8.1.0232 new file mode 100644 index 000000000..b7ae0f036 --- /dev/null +++ b/data/vim/patches/8.1.0232 @@ -0,0 +1,188 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0232 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0232 +Problem: Ruby error does not include backtrace. +Solution: Add an error backtrace. (Masataka Pocke Kuwabara, closes #3267) +Files: src/if_ruby.c + + +*** ../vim-8.1.0231/src/if_ruby.c 2018-07-28 17:18:05.164865356 +0200 +--- src/if_ruby.c 2018-08-01 18:41:37.613550764 +0200 +*************** +*** 93,98 **** +--- 93,103 ---- + # define RUBY20_OR_LATER 1 + #endif + ++ #if (defined(RUBY_VERSION) && RUBY_VERSION >= 21) \ ++ || (defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 21) ++ # define RUBY21_OR_LATER 1 ++ #endif ++ + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 + /* Ruby 1.9 defines a number of static functions which use rb_num2long and + * rb_int2big */ +*************** +*** 238,248 **** +--- 243,263 ---- + # define rb_eRuntimeError (*dll_rb_eRuntimeError) + # define rb_eStandardError (*dll_rb_eStandardError) + # define rb_eval_string_protect dll_rb_eval_string_protect ++ # ifdef RUBY21_OR_LATER ++ # define rb_funcallv dll_rb_funcallv ++ # else ++ # define rb_funcall2 dll_rb_funcall2 ++ # endif + # define rb_global_variable dll_rb_global_variable + # define rb_hash_aset dll_rb_hash_aset + # define rb_hash_new dll_rb_hash_new + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum ++ # ifdef RUBY19_OR_LATER ++ # define rb_intern2 dll_rb_intern2 ++ # else ++ # define rb_intern dll_rb_intern ++ # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 + # define rb_fix2int dll_rb_fix2int +*************** +*** 367,377 **** +--- 382,402 ---- + static VALUE *dll_rb_eRuntimeError; + static VALUE *dll_rb_eStandardError; + static VALUE (*dll_rb_eval_string_protect) (const char*, int*); ++ # ifdef RUBY21_OR_LATER ++ static VALUE (*dll_rb_funcallv) (VALUE, ID, int, const VALUE*); ++ # else ++ static VALUE (*dll_rb_funcall2) (VALUE, ID, int, const VALUE*); ++ # endif + static void (*dll_rb_global_variable) (VALUE*); + static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE); + static VALUE (*dll_rb_hash_new) (void); + static VALUE (*dll_rb_inspect) (VALUE); + static VALUE (*dll_rb_int2inum) (long); ++ # ifdef RUBY19_OR_LATER ++ static ID (*dll_rb_intern2) (const char*, long); ++ # else ++ static ID (*dll_rb_intern) (const char*); ++ # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + static long (*dll_rb_fix2int) (VALUE); + static long (*dll_rb_num2int) (VALUE); +*************** +*** 561,571 **** +--- 586,606 ---- + {"rb_eRuntimeError", (RUBY_PROC*)&dll_rb_eRuntimeError}, + {"rb_eStandardError", (RUBY_PROC*)&dll_rb_eStandardError}, + {"rb_eval_string_protect", (RUBY_PROC*)&dll_rb_eval_string_protect}, ++ # ifdef RUBY21_OR_LATER ++ {"rb_funcallv", (RUBY_PROC*)&dll_rb_funcallv}, ++ # else ++ {"rb_funcall2", (RUBY_PROC*)&dll_rb_funcall2}, ++ # endif + {"rb_global_variable", (RUBY_PROC*)&dll_rb_global_variable}, + {"rb_hash_aset", (RUBY_PROC*)&dll_rb_hash_aset}, + {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new}, + {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, + {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, ++ # ifdef RUBY19_OR_LATER ++ {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, ++ # else ++ {"rb_intern", (RUBY_PROC*)&dll_rb_intern}, ++ # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, + {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int}, +*************** +*** 926,934 **** +--- 961,973 ---- + RUBYEXTERN VALUE ruby_errinfo; + #endif + #endif ++ VALUE error; + VALUE eclass; + VALUE einfo; ++ VALUE bt; ++ int attr; + char buff[BUFSIZ]; ++ long i; + + #define TAG_RETURN 0x1 + #define TAG_BREAK 0x2 +*************** +*** 960,971 **** + case TAG_RAISE: + case TAG_FATAL: + #ifdef RUBY19_OR_LATER +! eclass = CLASS_OF(rb_errinfo()); +! einfo = rb_obj_as_string(rb_errinfo()); + #else +! eclass = CLASS_OF(ruby_errinfo); +! einfo = rb_obj_as_string(ruby_errinfo); + #endif + if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0) + { + EMSG(_("E272: unhandled exception")); +--- 999,1010 ---- + case TAG_RAISE: + case TAG_FATAL: + #ifdef RUBY19_OR_LATER +! error = rb_errinfo(); + #else +! error = ruby_errinfo; + #endif ++ eclass = CLASS_OF(error); ++ einfo = rb_obj_as_string(error); + if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0) + { + EMSG(_("E272: unhandled exception")); +*************** +*** 982,987 **** +--- 1021,1037 ---- + if (p) *p = '\0'; + EMSG(buff); + } ++ ++ attr = syn_name2attr((char_u *)"Error"); ++ # ifdef RUBY21_OR_LATER ++ bt = rb_funcallv(error, rb_intern("backtrace"), 0, 0); ++ for (i = 0; i < RARRAY_LEN(bt); i++) ++ msg_attr((char_u *)RSTRING_PTR(RARRAY_AREF(bt, i)), attr); ++ # else ++ bt = rb_funcall2(error, rb_intern("backtrace"), 0, 0); ++ for (i = 0; i < RARRAY_LEN(bt); i++) ++ msg_attr((char_u *)RSTRING_PTR(RARRAY_PTR(bt)[i]), attr); ++ # endif + break; + default: + vim_snprintf(buff, BUFSIZ, _("E273: unknown longjmp status %d"), state); +*** ../vim-8.1.0231/src/version.c 2018-08-01 18:02:57.493860532 +0200 +--- src/version.c 2018-08-01 18:39:43.442285284 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 232, + /**/ + +-- +ARTHUR: Be quiet! +DENNIS: --but by a two-thirds majority in the case of more-- +ARTHUR: Be quiet! I order you to be quiet! +WOMAN: Order, eh -- who does he think he is? +ARTHUR: I am your king! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0233 b/data/vim/patches/8.1.0233 new file mode 100644 index 000000000..92eddef3b --- /dev/null +++ b/data/vim/patches/8.1.0233 @@ -0,0 +1,317 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0233 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0233 +Problem: "safe" argument of call_vim_function() is always FALSE. +Solution: Remove the argument. +Files: src/eval.c, src/proto/eval.pro, src/edit.c, src/mbyte.c, + src/normal.c, src/ex_getln.c + + +*** ../vim-8.1.0232/src/eval.c 2018-07-25 21:19:09.359656999 +0200 +--- src/eval.c 2018-08-01 19:01:56.055522006 +0200 +*************** +*** 1021,1049 **** + char_u *func, + int argc, + typval_T *argv, +! typval_T *rettv, +! int safe) /* use the sandbox */ + { + int doesrange; +- void *save_funccalp = NULL; + int ret; + +- if (safe) +- { +- save_funccalp = save_funccal(); +- ++sandbox; +- } +- + rettv->v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + ret = call_func(func, (int)STRLEN(func), rettv, argc, argv, NULL, + curwin->w_cursor.lnum, curwin->w_cursor.lnum, + &doesrange, TRUE, NULL, NULL); +- if (safe) +- { +- --sandbox; +- restore_funccal(save_funccalp); +- } +- + if (ret == FAIL) + clear_tv(rettv); + +--- 1021,1035 ---- + char_u *func, + int argc, + typval_T *argv, +! typval_T *rettv) + { + int doesrange; + int ret; + + rettv->v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + ret = call_func(func, (int)STRLEN(func), rettv, argc, argv, NULL, + curwin->w_cursor.lnum, curwin->w_cursor.lnum, + &doesrange, TRUE, NULL, NULL); + if (ret == FAIL) + clear_tv(rettv); + +*************** +*** 1060,1072 **** + call_func_retnr( + char_u *func, + int argc, +! typval_T *argv, +! int safe) /* use the sandbox */ + { + typval_T rettv; + varnumber_T retval; + +! if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL) + return -1; + + retval = get_tv_number_chk(&rettv, NULL); +--- 1046,1057 ---- + call_func_retnr( + char_u *func, + int argc, +! typval_T *argv) + { + typval_T rettv; + varnumber_T retval; + +! if (call_vim_function(func, argc, argv, &rettv) == FAIL) + return -1; + + retval = get_tv_number_chk(&rettv, NULL); +*************** +*** 1088,1100 **** + call_func_retstr( + char_u *func, + int argc, +! typval_T *argv, +! int safe) /* use the sandbox */ + { + typval_T rettv; + char_u *retval; + +! if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL) + return NULL; + + retval = vim_strsave(get_tv_string(&rettv)); +--- 1073,1084 ---- + call_func_retstr( + char_u *func, + int argc, +! typval_T *argv) + { + typval_T rettv; + char_u *retval; + +! if (call_vim_function(func, argc, argv, &rettv) == FAIL) + return NULL; + + retval = vim_strsave(get_tv_string(&rettv)); +*************** +*** 1113,1124 **** + call_func_retlist( + char_u *func, + int argc, +! typval_T *argv, +! int safe) /* use the sandbox */ + { + typval_T rettv; + +! if (call_vim_function(func, argc, argv, &rettv, safe) == FAIL) + return NULL; + + if (rettv.v_type != VAR_LIST) +--- 1097,1107 ---- + call_func_retlist( + char_u *func, + int argc, +! typval_T *argv) + { + typval_T rettv; + +! if (call_vim_function(func, argc, argv, &rettv) == FAIL) + return NULL; + + if (rettv.v_type != VAR_LIST) +*** ../vim-8.1.0232/src/proto/eval.pro 2018-07-25 21:19:09.359656999 +0200 +--- src/proto/eval.pro 2018-08-01 19:01:23.155692745 +0200 +*************** +*** 19,28 **** + list_T *eval_spell_expr(char_u *badword, char_u *expr); + int get_spellword(list_T *list, char_u **pp); + typval_T *eval_expr(char_u *arg, char_u **nextcmd); +! int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv, int safe); +! varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv, int safe); +! void *call_func_retstr(char_u *func, int argc, typval_T *argv, int safe); +! void *call_func_retlist(char_u *func, int argc, typval_T *argv, int safe); + int eval_foldexpr(char_u *arg, int *cp); + void ex_let(exarg_T *eap); + void list_hashtable_vars(hashtab_T *ht, char_u *prefix, int empty, int *first); +--- 19,28 ---- + list_T *eval_spell_expr(char_u *badword, char_u *expr); + int get_spellword(list_T *list, char_u **pp); + typval_T *eval_expr(char_u *arg, char_u **nextcmd); +! int call_vim_function(char_u *func, int argc, typval_T *argv, typval_T *rettv); +! varnumber_T call_func_retnr(char_u *func, int argc, typval_T *argv); +! void *call_func_retstr(char_u *func, int argc, typval_T *argv); +! void *call_func_retlist(char_u *func, int argc, typval_T *argv); + int eval_foldexpr(char_u *arg, int *cp); + void ex_let(exarg_T *eap); + void list_hashtable_vars(hashtab_T *ht, char_u *prefix, int empty, int *first); +*** ../vim-8.1.0232/src/edit.c 2018-07-29 16:09:14.632945629 +0200 +--- src/edit.c 2018-08-01 19:00:45.703885362 +0200 +*************** +*** 4239,4245 **** + curbuf_save = curbuf; + + /* Call a function, which returns a list or dict. */ +! if (call_vim_function(funcname, 2, args, &rettv, FALSE) == OK) + { + switch (rettv.v_type) + { +--- 4239,4245 ---- + curbuf_save = curbuf; + + /* Call a function, which returns a list or dict. */ +! if (call_vim_function(funcname, 2, args, &rettv) == OK) + { + switch (rettv.v_type) + { +*************** +*** 5569,5575 **** + pos = curwin->w_cursor; + curwin_save = curwin; + curbuf_save = curbuf; +! col = call_func_retnr(funcname, 2, args, FALSE); + if (curwin_save != curwin || curbuf_save != curbuf) + { + EMSG(_(e_complwin)); +--- 5569,5575 ---- + pos = curwin->w_cursor; + curwin_save = curwin; + curbuf_save = curbuf; +! col = call_func_retnr(funcname, 2, args); + if (curwin_save != curwin || curbuf_save != curbuf) + { + EMSG(_(e_complwin)); +*** ../vim-8.1.0232/src/mbyte.c 2018-07-14 19:30:32.320395535 +0200 +--- src/mbyte.c 2018-08-01 18:58:55.524439870 +0200 +*************** +*** 4825,4831 **** + argv[0].v_type = VAR_NUMBER; + argv[0].vval.v_number = active ? 1 : 0; + argv[1].v_type = VAR_UNKNOWN; +! (void)call_func_retnr(p_imaf, 1, argv, FALSE); + } + + static int +--- 4825,4831 ---- + argv[0].v_type = VAR_NUMBER; + argv[0].vval.v_number = active ? 1 : 0; + argv[1].v_type = VAR_UNKNOWN; +! (void)call_func_retnr(p_imaf, 1, argv); + } + + static int +*************** +*** 4839,4845 **** + /* FIXME: :py print 'xxx' is shown duplicate result. + * Use silent to avoid it. */ + ++msg_silent; +! is_active = call_func_retnr(p_imsf, 0, NULL, FALSE); + --msg_silent; + return (is_active > 0); + } +--- 4839,4845 ---- + /* FIXME: :py print 'xxx' is shown duplicate result. + * Use silent to avoid it. */ + ++msg_silent; +! is_active = call_func_retnr(p_imsf, 0, NULL); + --msg_silent; + return (is_active > 0); + } +*** ../vim-8.1.0232/src/normal.c 2018-07-29 16:09:14.640945583 +0200 +--- src/normal.c 2018-08-01 18:59:09.360371320 +0200 +*************** +*** 2248,2254 **** + virtual_op = MAYBE; + # endif + +! (void)call_func_retnr(p_opfunc, 1, argv, FALSE); + + # ifdef FEAT_VIRTUALEDIT + virtual_op = save_virtual_op; +--- 2248,2254 ---- + virtual_op = MAYBE; + # endif + +! (void)call_func_retnr(p_opfunc, 1, argv); + + # ifdef FEAT_VIRTUALEDIT + virtual_op = save_virtual_op; +*** ../vim-8.1.0232/src/ex_getln.c 2018-07-28 19:20:09.787586245 +0200 +--- src/ex_getln.c 2018-08-01 19:00:06.272086002 +0200 +*************** +*** 5279,5285 **** + */ + static void * + call_user_expand_func( +! void *(*user_expand_func)(char_u *, int, typval_T *, int), + expand_T *xp, + int *num_file, + char_u ***file) +--- 5279,5285 ---- + */ + static void * + call_user_expand_func( +! void *(*user_expand_func)(char_u *, int, typval_T *), + expand_T *xp, + int *num_file, + char_u ***file) +*************** +*** 5318,5324 **** + ccline.cmdprompt = NULL; + current_SID = xp->xp_scriptID; + +! ret = user_expand_func(xp->xp_arg, 3, args, FALSE); + + ccline = save_ccline; + current_SID = save_current_SID; +--- 5318,5324 ---- + ccline.cmdprompt = NULL; + current_SID = xp->xp_scriptID; + +! ret = user_expand_func(xp->xp_arg, 3, args); + + ccline = save_ccline; + current_SID = save_current_SID; +*** ../vim-8.1.0232/src/version.c 2018-08-01 18:42:09.837344296 +0200 +--- src/version.c 2018-08-01 19:05:21.534428381 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 233, + /**/ + +-- +Some say the world will end in fire; some say in segfaults. +I say it will end in a curly bracket. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0234 b/data/vim/patches/8.1.0234 new file mode 100644 index 000000000..bf2ab75e6 --- /dev/null +++ b/data/vim/patches/8.1.0234 @@ -0,0 +1,160 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0234 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0234 +Problem: Incorrect reference counting in Perl interface. +Solution: Call SvREFCNT_inc more often, add a test. (Damien) +Files: src/if_perl.xs, src/testdir/test_perl.vim + + +*** ../vim-8.1.0233/src/if_perl.xs 2018-07-25 22:02:32.231966301 +0200 +--- src/if_perl.xs 2018-08-02 21:43:01.012805454 +0200 +*************** +*** 831,838 **** + ptr->w_perl_private = newSV(0); + sv_setiv(ptr->w_perl_private, PTR2IV(ptr)); + } +! else +! SvREFCNT_inc_void_NN(ptr->w_perl_private); + SvRV(rv) = ptr->w_perl_private; + SvROK_on(rv); + return sv_bless(rv, gv_stashpv("VIWIN", TRUE)); +--- 831,837 ---- + ptr->w_perl_private = newSV(0); + sv_setiv(ptr->w_perl_private, PTR2IV(ptr)); + } +! SvREFCNT_inc_void_NN(ptr->w_perl_private); + SvRV(rv) = ptr->w_perl_private; + SvROK_on(rv); + return sv_bless(rv, gv_stashpv("VIWIN", TRUE)); +*************** +*** 847,854 **** + ptr->b_perl_private = newSV(0); + sv_setiv(ptr->b_perl_private, PTR2IV(ptr)); + } +! else +! SvREFCNT_inc_void_NN(ptr->b_perl_private); + SvRV(rv) = ptr->b_perl_private; + SvROK_on(rv); + return sv_bless(rv, gv_stashpv("VIBUF", TRUE)); +--- 846,852 ---- + ptr->b_perl_private = newSV(0); + sv_setiv(ptr->b_perl_private, PTR2IV(ptr)); + } +! SvREFCNT_inc_void_NN(ptr->b_perl_private); + SvRV(rv) = ptr->b_perl_private; + SvROK_on(rv); + return sv_bless(rv, gv_stashpv("VIBUF", TRUE)); +*************** +*** 918,929 **** + else + rv = newBUFrv(newSV(0), curbuf); + +! if (SvRV(sv) == SvRV(rv)) +! SvREFCNT_dec(SvRV(rv)); +! else // XXX: Not sure if the `else` condition are right +! // Test_SvREFCNT() pass in all case. + sv_setsv(sv, rv); + + return 0; + } + #endif /* !PROTO */ +--- 916,928 ---- + else + rv = newBUFrv(newSV(0), curbuf); + +! if (SvRV(sv) != SvRV(rv)) +! // XXX: This magic variable is a bit confusing... +! // Is curently refcounted ? + sv_setsv(sv, rv); + ++ SvREFCNT_dec(rv); ++ + return 0; + } + #endif /* !PROTO */ +*** ../vim-8.1.0233/src/testdir/test_perl.vim 2018-07-25 22:02:32.235966277 +0200 +--- src/testdir/test_perl.vim 2018-08-02 21:39:46.757852657 +0200 +*************** +*** 4,9 **** +--- 4,12 ---- + finish + end + ++ " FIXME: RunTest don't see any error when Perl abort... ++ perl $SIG{__WARN__} = sub { die "Unexpected warnings from perl: @_" }; ++ + func Test_change_buffer() + call setline(line('$'), ['1 line 1']) + perl VIM::DoCommand("normal /^1\n") +*************** +*** 229,234 **** +--- 232,246 ---- + #line 5 "Test_000_SvREFCNT()" + my ($b, $w); + ++ my $num = 0; ++ for ( 0 .. 100 ) { ++ if ( ++$num >= 8 ) { $num = 0 } ++ VIM::DoCommand("buffer X$num"); ++ $b = $curbuf; ++ } ++ ++ VIM::DoCommand("buffer t"); ++ + $b = $curbuf for 0 .. 100; + $w = $curwin for 0 .. 100; + () = VIM::Buffers for 0 .. 100; +*************** +*** 240,251 **** + my $cw = Internals::SvREFCNT($$w); + VIM::Eval("assert_equal(2, $cb, 'T1')"); + VIM::Eval("assert_equal(2, $cw, 'T2')"); + foreach ( VIM::Buffers, VIM::Windows ) { + my $c = Internals::SvREFCNT($_); + VIM::Eval("assert_equal(2, $c, 'T3')"); + $c = Internals::SvREFCNT($$_); +! # Why only one ref? +! # Look wrong but work. Maybe not portable... + VIM::Eval("assert_equal(1, $c, 'T4')"); + } + $cb = Internals::SvREFCNT($$curbuf); +--- 252,264 ---- + my $cw = Internals::SvREFCNT($$w); + VIM::Eval("assert_equal(2, $cb, 'T1')"); + VIM::Eval("assert_equal(2, $cw, 'T2')"); ++ my $strongref; + foreach ( VIM::Buffers, VIM::Windows ) { ++ VIM::DoCommand("%bw!"); + my $c = Internals::SvREFCNT($_); + VIM::Eval("assert_equal(2, $c, 'T3')"); + $c = Internals::SvREFCNT($$_); +! next if $c == 2 && !$strongref++; + VIM::Eval("assert_equal(1, $c, 'T4')"); + } + $cb = Internals::SvREFCNT($$curbuf); +*** ../vim-8.1.0233/src/version.c 2018-08-01 19:05:59.286223185 +0200 +--- src/version.c 2018-08-02 21:44:31.440307634 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 234, + /**/ + +-- +I'm sure that I asked CBuilder to do a "full" install. Looks like I got +a "fool" install, instead. Charles E Campbell, Jr, PhD + + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0235 b/data/vim/patches/8.1.0235 new file mode 100644 index 000000000..ecc85a937 --- /dev/null +++ b/data/vim/patches/8.1.0235 @@ -0,0 +1,171 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0235 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0235 (after 8.1.0231) +Problem: More help tags that jump to the wrong location. +Solution: Add more exceptions and a table for "expr-" tags. (Hirohito + Higashi) +Files: src/ex_cmds.c, src/testdir/test_help_tagjump.vim + + +*** ../vim-8.1.0234/src/ex_cmds.c 2018-08-01 18:02:57.493860532 +0200 +--- src/ex_cmds.c 2018-08-02 22:21:56.015278660 +0200 +*************** +*** 6583,6589 **** + static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*", + "/*", "/\\*", "\"*", "**", + "cpo-*", "/\\(\\)", "/\\%(\\)", +! "?", ":?", "-?", "?", "g?", "g?g?", "g??", + "/\\?", "/\\z(\\)", "\\=", ":s\\=", + "[count]", "[quotex]", + "[range]", ":[range]", +--- 6583,6590 ---- + static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*", + "/*", "/\\*", "\"*", "**", + "cpo-*", "/\\(\\)", "/\\%(\\)", +! "?", ":?", "?", "g?", "g?g?", "g??", +! "-?", "q?", "v_g?", + "/\\?", "/\\z(\\)", "\\=", ":s\\=", + "[count]", "[quotex]", + "[range]", ":[range]", +*************** +*** 6593,6619 **** + static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", + "/star", "/\\\\star", "quotestar", "starstar", + "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)", +! "?", ":?", "-?", "?", "g?", "g?g?", "g??", + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", + "\\[range]", ":\\[range]", + "\\[pattern]", "\\\\bar", "/\\\\%\\$", + "s/\\\\\\~", "s/\\\\U", "s/\\\\L", + "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"}; + int flags; + + d = IObuff; /* assume IObuff is long enough! */ + +! /* +! * Recognize a few exceptions to the rule. Some strings that contain '*' +! * with "star". Otherwise '*' is recognized as a wildcard. +! */ +! for (i = (int)(sizeof(mtable) / sizeof(char *)); --i >= 0; ) +! if (STRCMP(arg, mtable[i]) == 0) +! { +! STRCPY(d, rtable[i]); +! break; +! } + + if (i < 0) /* no match in table */ + { +--- 6594,6636 ---- + static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", + "/star", "/\\\\star", "quotestar", "starstar", + "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)", +! "?", ":?", "?", "g?", "g?g?", "g??", +! "-?", "q?", "v_g?", + "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", + "\\[count]", "\\[quotex]", + "\\[range]", ":\\[range]", + "\\[pattern]", "\\\\bar", "/\\\\%\\$", + "s/\\\\\\~", "s/\\\\U", "s/\\\\L", + "s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"}; ++ static char *(expr_table[]) = {"!=?", "!~?", "<=?", "=?", ">?", "is?", "isnot?"}; + int flags; + + d = IObuff; /* assume IObuff is long enough! */ + +! if (STRNICMP(arg, "expr-", 5) == 0) +! { +! // When the string starting with "expr-" and containing '?' and matches +! // the table, it is taken literally. Otherwise '?' is recognized as a +! // wildcard. +! for (i = (int)(sizeof(expr_table) / sizeof(char *)); --i >= 0; ) +! if (STRCMP(arg + 5, expr_table[i]) == 0) +! { +! STRCPY(d, arg); +! break; +! } +! } +! else +! { +! // Recognize a few exceptions to the rule. Some strings that contain +! // '*' with "star". Otherwise '*' is recognized as a wildcard. +! for (i = (int)(sizeof(mtable) / sizeof(char *)); --i >= 0; ) +! if (STRCMP(arg, mtable[i]) == 0) +! { +! STRCPY(d, rtable[i]); +! break; +! } +! } + + if (i < 0) /* no match in table */ + { +*** ../vim-8.1.0234/src/testdir/test_help_tagjump.vim 2018-08-01 18:02:57.493860532 +0200 +--- src/testdir/test_help_tagjump.vim 2018-08-02 22:16:50.581068403 +0200 +*************** +*** 26,36 **** +--- 26,59 ---- + call assert_true(getline('.') =~ '\*:?\*') + helpclose + ++ help q? ++ call assert_equal("help", &filetype) ++ call assert_true(getline('.') =~ '\*q?\*') ++ call assert_true(expand('') == 'q?') ++ helpclose ++ + help -? + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*-?\*') + helpclose + ++ help v_g? ++ call assert_equal("help", &filetype) ++ call assert_true(getline('.') =~ '\*v_g?\*') ++ helpclose ++ ++ help expr-!=? ++ call assert_equal("help", &filetype) ++ call assert_true(getline('.') =~ '\*expr-!=?\*') ++ call assert_true(expand('') == 'expr-!=?') ++ helpclose ++ ++ help expr-isnot? ++ call assert_equal("help", &filetype) ++ call assert_true(getline('.') =~ '\*expr-isnot?\*') ++ call assert_true(expand('') == 'expr-isnot?') ++ helpclose ++ + help FileW*Post + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*FileWritePost\*') +*** ../vim-8.1.0234/src/version.c 2018-08-02 21:46:47.579548771 +0200 +--- src/version.c 2018-08-02 22:18:16.740563501 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 235, + /**/ + +-- +ARTHUR: Be quiet! +DENNIS: Well you can't expect to wield supreme executive power just 'cause + some watery tart threw a sword at you! +ARTHUR: Shut up! +DENNIS: I mean, if I went around sayin' I was an empereror just because some + moistened bint had lobbed a scimitar at me they'd put me away! + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0236 b/data/vim/patches/8.1.0236 new file mode 100644 index 000000000..519fda126 --- /dev/null +++ b/data/vim/patches/8.1.0236 @@ -0,0 +1,108 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0236 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0236 (after 8.1.0232) +Problem: Ruby build fails when ruby_intern is missing. +Solution: Do not use ruby_intern2. (Ken Takata) +Files: src/if_ruby.c + + +*** ../vim-8.1.0235/src/if_ruby.c 2018-08-01 18:42:09.837344296 +0200 +--- src/if_ruby.c 2018-08-03 21:59:40.035744771 +0200 +*************** +*** 253,263 **** + # define rb_hash_new dll_rb_hash_new + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum +! # ifdef RUBY19_OR_LATER +! # define rb_intern2 dll_rb_intern2 +! # else + # define rb_intern dll_rb_intern + # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 + # define rb_fix2int dll_rb_fix2int +--- 253,264 ---- + # define rb_hash_new dll_rb_hash_new + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum +! # ifndef rb_intern + # define rb_intern dll_rb_intern + # endif ++ # ifdef RUBY_CONST_ID_CACHE ++ # define rb_intern2 dll_rb_intern2 ++ # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 + # define rb_fix2int dll_rb_fix2int +*************** +*** 392,401 **** + static VALUE (*dll_rb_hash_new) (void); + static VALUE (*dll_rb_inspect) (VALUE); + static VALUE (*dll_rb_int2inum) (long); +- # ifdef RUBY19_OR_LATER +- static ID (*dll_rb_intern2) (const char*, long); +- # else + static ID (*dll_rb_intern) (const char*); + # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + static long (*dll_rb_fix2int) (VALUE); +--- 393,401 ---- + static VALUE (*dll_rb_hash_new) (void); + static VALUE (*dll_rb_inspect) (VALUE); + static VALUE (*dll_rb_int2inum) (long); + static ID (*dll_rb_intern) (const char*); ++ # ifdef RUBY_CONST_ID_CACHE ++ static ID (*dll_rb_intern2) (const char*, long); + # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + static long (*dll_rb_fix2int) (VALUE); +*************** +*** 596,605 **** + {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new}, + {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, + {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, +- # ifdef RUBY19_OR_LATER +- {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, +- # else + {"rb_intern", (RUBY_PROC*)&dll_rb_intern}, + # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, +--- 596,604 ---- + {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new}, + {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, + {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, + {"rb_intern", (RUBY_PROC*)&dll_rb_intern}, ++ # ifdef RUBY_CONST_ID_CACHE ++ {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, + # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, +*** ../vim-8.1.0235/src/version.c 2018-08-02 22:23:53.342591238 +0200 +--- src/version.c 2018-08-03 21:51:04.635516492 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 236, + /**/ + +-- +ARTHUR: A scratch? Your arm's off! +BLACK KNIGHT: No, it isn't. +ARTHUR: Well, what's that then? +BLACK KNIGHT: I've had worse. + The Quest for the Holy Grail (Monty Python) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0237 b/data/vim/patches/8.1.0237 new file mode 100644 index 000000000..35830bc86 --- /dev/null +++ b/data/vim/patches/8.1.0237 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0237 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0237 +Problem: Ruby on Cygwin doesn't always work. +Solution: Use LIBRUBY_SO if LIBRUBY_ALIASES isn't set. (Ken Takata) +Files: src/configure.ac, src/auto/configure + + +*** ../vim-8.1.0236/src/configure.ac 2018-07-27 22:35:12.305014510 +0200 +--- src/configure.ac 2018-08-04 15:10:33.240017113 +0200 +*************** +*** 1956,1961 **** +--- 1956,1964 ---- + AC_DEFINE(FEAT_RUBY) + if test "$enable_rubyinterp" = "dynamic"; then + libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_ALIASES']].split[[0]]"` ++ if test -z "$libruby_soname"; then ++ libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG[['LIBRUBY_SO']]"` ++ fi + AC_DEFINE(DYNAMIC_RUBY) + RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS" + RUBY_LIBS= +*** ../vim-8.1.0236/src/auto/configure 2018-07-27 22:35:12.309014484 +0200 +--- src/auto/configure 2018-08-04 15:10:39.099973736 +0200 +*************** +*** 7606,7611 **** +--- 7606,7614 ---- + + if test "$enable_rubyinterp" = "dynamic"; then + libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"` ++ if test -z "$libruby_soname"; then ++ libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"` ++ fi + $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h + + RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS" +*** ../vim-8.1.0236/src/version.c 2018-08-03 22:03:13.178295933 +0200 +--- src/version.c 2018-08-04 15:12:44.107057819 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 237, + /**/ + +-- +"It's so simple to be wise. Just think of something stupid to say +and then don't say it." -- Sam Levenson + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0238 b/data/vim/patches/8.1.0238 new file mode 100644 index 000000000..47ad40e60 --- /dev/null +++ b/data/vim/patches/8.1.0238 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0238 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0238 +Problem: 'buftype' is cleared when using ":term ++hidden cat". (Marcin + Szamotulski) +Solution: Set the "options initialized" flag earlier. (closes #3278) +Files: src/terminal.c, src/testdir/test_terminal.vim + + +*** ../vim-8.1.0237/src/terminal.c 2018-07-08 20:49:03.427359658 +0200 +--- src/terminal.c 2018-08-04 16:52:59.228476711 +0200 +*************** +*** 529,534 **** +--- 529,536 ---- + + set_string_option_direct((char_u *)"buftype", -1, + (char_u *)"terminal", OPT_FREE|OPT_LOCAL, 0); ++ // Avoid that 'buftype' is reset when this buffer is entered. ++ curbuf->b_p_initialized = TRUE; + + /* Mark the buffer as not modifiable. It can only be made modifiable after + * the job finished. */ +*** ../vim-8.1.0237/src/testdir/test_terminal.vim 2018-07-08 20:49:03.427359658 +0200 +--- src/testdir/test_terminal.vim 2018-08-04 16:51:08.821245793 +0200 +*************** +*** 1605,1607 **** +--- 1605,1623 ---- + set guioptions& + call delete(filename) + endfunc ++ ++ func Test_terminal_hidden() ++ if !has('unix') ++ return ++ endif ++ term ++hidden cat ++ let bnr = bufnr('$') ++ call assert_equal('terminal', getbufvar(bnr, '&buftype')) ++ exe 'sbuf ' . bnr ++ call assert_equal('terminal', &buftype) ++ call term_sendkeys(bnr, "asdf\") ++ call WaitForAssert({-> assert_match('asdf', term_getline(bnr, 2))}) ++ call term_sendkeys(bnr, "\") ++ call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))}) ++ bwipe! ++ endfunc +*** ../vim-8.1.0237/src/version.c 2018-08-04 15:13:31.034718130 +0200 +--- src/version.c 2018-08-04 16:53:18.336344327 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 238, + /**/ + +-- +-rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed +-rwxr-xr-t 4 root 131720 Jan 1 1970 /usr/ucb/vi +-rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0239 b/data/vim/patches/8.1.0239 new file mode 100644 index 000000000..55becc277 --- /dev/null +++ b/data/vim/patches/8.1.0239 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0239 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0239 (after 8.1.0236) +Problem: Now Ruby build fails on other systems. +Solution: Always define rb_intern. (Ken Takata, closes #3275) +Files: src/if_ruby.c + + +*** ../vim-8.1.0238/src/if_ruby.c 2018-08-03 22:03:13.178295933 +0200 +--- src/if_ruby.c 2018-08-04 17:21:11.448378660 +0200 +*************** +*** 253,264 **** + # define rb_hash_new dll_rb_hash_new + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum +! # ifndef rb_intern +! # define rb_intern dll_rb_intern +! # endif +! # ifdef RUBY_CONST_ID_CACHE +! # define rb_intern2 dll_rb_intern2 +! # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 + # define rb_fix2int dll_rb_fix2int +--- 253,264 ---- + # define rb_hash_new dll_rb_hash_new + # define rb_inspect dll_rb_inspect + # define rb_int2inum dll_rb_int2inum +! +! // ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't +! // work. Not using the cache appears to be the best solution. +! # undef rb_intern +! # define rb_intern dll_rb_intern +! + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 + # define rb_fix2int dll_rb_fix2int +*************** +*** 394,402 **** + static VALUE (*dll_rb_inspect) (VALUE); + static VALUE (*dll_rb_int2inum) (long); + static ID (*dll_rb_intern) (const char*); +- # ifdef RUBY_CONST_ID_CACHE +- static ID (*dll_rb_intern2) (const char*, long); +- # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + static long (*dll_rb_fix2int) (VALUE); + static long (*dll_rb_num2int) (VALUE); +--- 394,399 ---- +*************** +*** 597,605 **** + {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, + {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, + {"rb_intern", (RUBY_PROC*)&dll_rb_intern}, +- # ifdef RUBY_CONST_ID_CACHE +- {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, +- # endif + # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ + {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, + {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int}, +--- 594,599 ---- +*** ../vim-8.1.0238/src/version.c 2018-08-04 16:54:06.348012520 +0200 +--- src/version.c 2018-08-04 17:22:36.283738635 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 239, + /**/ + +-- +FATHER: You killed eight wedding guests in all! +LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady. +FATHER: I can understand that. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0240 b/data/vim/patches/8.1.0240 new file mode 100644 index 000000000..6ad3a0da8 --- /dev/null +++ b/data/vim/patches/8.1.0240 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0240 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0240 +Problem: g:actual_curbuf set in wrong scope. (Daniel Hahler) +Solution: Prepend the "g:" name space. (closes #3279) +Files: src/buffer.c + + +*** ../vim-8.1.0239/src/buffer.c 2018-08-01 17:53:04.685381319 +0200 +--- src/buffer.c 2018-08-05 13:16:10.469261957 +0200 +*************** +*** 4229,4235 **** + + #ifdef FEAT_EVAL + vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum); +! set_internal_string_var((char_u *)"actual_curbuf", tmp); + + save_curbuf = curbuf; + save_curwin = curwin; +--- 4229,4235 ---- + + #ifdef FEAT_EVAL + vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum); +! set_internal_string_var((char_u *)"g:actual_curbuf", tmp); + + save_curbuf = curbuf; + save_curwin = curwin; +*** ../vim-8.1.0239/src/version.c 2018-08-04 17:24:39.062825210 +0200 +--- src/version.c 2018-08-05 13:21:12.363049597 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 240, + /**/ + +-- +FATHER: You only killed the bride's father - that's all - +LAUNCELOT: Oh dear, I didn't really mean to... +FATHER: Didn't mean to? You put your sword right through his head! +LAUNCELOT: Gosh - Is he all right? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0241 b/data/vim/patches/8.1.0241 new file mode 100644 index 000000000..a22c2e955 --- /dev/null +++ b/data/vim/patches/8.1.0241 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0241 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0241 +Problem: Effect of ":tabmove N" is not clear. +Solution: Add a test that shows the behavior. (Christian Brabandt, + closes #3288) +Files: src/testdir/test_tabpage.vim + + +*** ../vim-8.1.0240/src/testdir/test_tabpage.vim 2018-05-20 14:57:19.117429791 +0200 +--- src/testdir/test_tabpage.vim 2018-08-07 13:12:02.469260514 +0200 +*************** +*** 105,110 **** +--- 105,123 ---- + call assert_equal(4, tabpagenr()) + 7tabmove 5 + call assert_equal(5, tabpagenr()) ++ ++ " The following are a no-op ++ norm! 2gt ++ call assert_equal(2, tabpagenr()) ++ tabmove 2 ++ call assert_equal(2, tabpagenr()) ++ 2tabmove ++ call assert_equal(2, tabpagenr()) ++ tabmove 1 ++ call assert_equal(2, tabpagenr()) ++ 1tabmove ++ call assert_equal(2, tabpagenr()) ++ + call assert_fails("99tabmove", 'E16:') + call assert_fails("+99tabmove", 'E16:') + call assert_fails("-99tabmove", 'E16:') +*** ../vim-8.1.0240/src/version.c 2018-08-05 13:22:22.474562651 +0200 +--- src/version.c 2018-08-07 13:13:11.940836186 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 241, + /**/ + +-- +MESKIMEN'S LAW + There's never time to do it right, but always time to do it over. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0242 b/data/vim/patches/8.1.0242 new file mode 100644 index 000000000..2f8d1cc7c --- /dev/null +++ b/data/vim/patches/8.1.0242 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0242 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0242 +Problem: Insert mode completion may use an invalid buffer pointer. +Solution: Check for ins_buf to be valid. (closes #3290) +Files: src/edit.c + + +*** ../vim-8.1.0241/src/edit.c 2018-08-01 19:05:59.282223206 +0200 +--- src/edit.c 2018-08-07 14:53:05.865949346 +0200 +*************** +*** 4419,4428 **** + ? (char_u *)"." : curbuf->b_p_cpt; + last_match_pos = first_match_pos = *ini; + } + + compl_old_match = compl_curr_match; /* remember the last current match */ + pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos; +! /* For ^N/^P loop over all the flags/windows/buffers in 'complete' */ + for (;;) + { + found_new_match = FAIL; +--- 4419,4433 ---- + ? (char_u *)"." : curbuf->b_p_cpt; + last_match_pos = first_match_pos = *ini; + } ++ else if (ins_buf != curbuf && !buf_valid(ins_buf)) ++ ins_buf = curbuf; // In case the buffer was wiped out. + + compl_old_match = compl_curr_match; /* remember the last current match */ + pos = (compl_direction == FORWARD) ? &last_match_pos : &first_match_pos; +! +! /* +! * For ^N/^P loop over all the flags/windows/buffers in 'complete'. +! */ + for (;;) + { + found_new_match = FAIL; +*** ../vim-8.1.0241/src/version.c 2018-08-07 13:14:05.644508497 +0200 +--- src/version.c 2018-08-07 14:54:09.961578224 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 242, + /**/ + +-- +Did you ever stop to think... and forget to start again? + -- Steven Wright + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0243 b/data/vim/patches/8.1.0243 new file mode 100644 index 000000000..3a497d139 --- /dev/null +++ b/data/vim/patches/8.1.0243 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0243 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0243 +Problem: Using :term ++close ++hidden closes a window. (Marcin Szamotulski) +Solution: Don't close the window if only using it temporarily for unloading + the terminal buffer. (closes #3287) +Files: src/terminal.c, src/testdir/test_terminal.vim + + +*** ../vim-8.1.0242/src/terminal.c 2018-08-04 16:54:06.348012520 +0200 +--- src/terminal.c 2018-08-07 16:27:03.373988690 +0200 +*************** +*** 2818,2828 **** + if (term->tl_finish == TL_FINISH_CLOSE) + { + aco_save_T aco; + +! /* ++close or term_finish == "close" */ + ch_log(NULL, "terminal job finished, closing window"); + aucmd_prepbuf(&aco, term->tl_buffer); + do_bufdel(DOBUF_WIPE, (char_u *)"", 1, fnum, fnum, FALSE); + aucmd_restbuf(&aco); + return TRUE; + } +--- 2818,2834 ---- + if (term->tl_finish == TL_FINISH_CLOSE) + { + aco_save_T aco; ++ int do_set_w_closing = term->tl_buffer->b_nwindows == 0; + +! // ++close or term_finish == "close" + ch_log(NULL, "terminal job finished, closing window"); + aucmd_prepbuf(&aco, term->tl_buffer); ++ // Avoid closing the window if we temporarily use it. ++ if (do_set_w_closing) ++ curwin->w_closing = TRUE; + do_bufdel(DOBUF_WIPE, (char_u *)"", 1, fnum, fnum, FALSE); ++ if (do_set_w_closing) ++ curwin->w_closing = FALSE; + aucmd_restbuf(&aco); + return TRUE; + } +*** ../vim-8.1.0242/src/testdir/test_terminal.vim 2018-08-04 16:54:06.348012520 +0200 +--- src/testdir/test_terminal.vim 2018-08-07 16:32:04.084157368 +0200 +*************** +*** 1621,1623 **** +--- 1621,1635 ---- + call WaitForAssert({-> assert_equal('finished', term_getstatus(bnr))}) + bwipe! + endfunc ++ ++ func Test_terminal_hidden_and_close() ++ if !has('unix') ++ return ++ endif ++ call assert_equal(1, winnr('$')) ++ term ++hidden ++close ls ++ let bnr = bufnr('$') ++ call assert_equal('terminal', getbufvar(bnr, '&buftype')) ++ call WaitForAssert({-> assert_false(bufexists(bnr))}) ++ call assert_equal(1, winnr('$')) ++ endfunc +*** ../vim-8.1.0242/src/version.c 2018-08-07 14:55:04.905259782 +0200 +--- src/version.c 2018-08-07 16:28:42.681379863 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 243, + /**/ + +-- +ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery, + my friend and I will ... we will say "Ni!" +CRONE: Do your worst! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0244 b/data/vim/patches/8.1.0244 new file mode 100644 index 000000000..bf3231465 --- /dev/null +++ b/data/vim/patches/8.1.0244 @@ -0,0 +1,245 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0244 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0244 +Problem: No redraw when using a STOP signal on Vim and then a CONT signal. +Solution: Catch the CONT signal and force a redraw. (closes #3285) +Files: src/os_unix.c, src/term.c, src/proto/term.pro + + +*** ../vim-8.1.0243/src/os_unix.c 2018-06-19 19:59:15.244704285 +0200 +--- src/os_unix.c 2018-08-07 17:38:27.387722889 +0200 +*************** +*** 1227,1233 **** + SIGRETURN; + } + +! #if defined(_REENTRANT) && defined(SIGCONT) + /* + * On Solaris with multi-threading, suspending might not work immediately. + * Catch the SIGCONT signal, which will be used as an indication whether the +--- 1227,1249 ---- + SIGRETURN; + } + +! static void +! after_sigcont(void) +! { +! # ifdef FEAT_TITLE +! // Set oldtitle to NULL, so the current title is obtained again. +! VIM_CLEAR(oldtitle); +! # endif +! settmode(TMODE_RAW); +! need_check_timestamps = TRUE; +! did_check_timestamps = FALSE; +! } +! +! #if defined(SIGCONT) +! static RETSIGTYPE sigcont_handler SIGPROTOARG; +! static int in_mch_suspend = FALSE; +! +! # if defined(_REENTRANT) && defined(SIGCONT) + /* + * On Solaris with multi-threading, suspending might not work immediately. + * Catch the SIGCONT signal, which will be used as an indication whether the +*************** +*** 1239,1245 **** + * volatile because it is used in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; +! static RETSIGTYPE sigcont_handler SIGPROTOARG; + + /* + * signal handler for SIGCONT +--- 1255,1261 ---- + * volatile because it is used in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; +! # endif + + /* + * signal handler for SIGCONT +*************** +*** 1247,1253 **** + static RETSIGTYPE + sigcont_handler SIGDEFARG(sigarg) + { +! sigcont_received = TRUE; + SIGRETURN; + } + #endif +--- 1263,1300 ---- + static RETSIGTYPE + sigcont_handler SIGDEFARG(sigarg) + { +! if (in_mch_suspend) +! { +! # if defined(_REENTRANT) && defined(SIGCONT) +! sigcont_received = TRUE; +! # endif +! } +! else +! { +! // We didn't suspend ourselves, assume we were stopped by a SIGSTOP +! // signal (which can't be intercepted) and get a SIGCONT. Need to get +! // back to a sane mode and redraw. +! after_sigcont(); +! +! update_screen(CLEAR); +! if (State & CMDLINE) +! redrawcmdline(); +! else if (State == HITRETURN || State == SETWSIZE || State == ASKMORE +! || State == EXTERNCMD || State == CONFIRM || exmode_active) +! repeat_message(); +! else if (redrawing()) +! setcursor(); +! #if defined(FEAT_INS_EXPAND) +! if (pum_visible()) +! { +! redraw_later(NOT_VALID); +! ins_compl_show_pum(); +! } +! #endif +! cursor_on_force(); +! out_flush(); +! } +! + SIGRETURN; + } + #endif +*************** +*** 1330,1335 **** +--- 1377,1384 ---- + { + /* BeOS does have SIGTSTP, but it doesn't work. */ + #if defined(SIGTSTP) && !defined(__BEOS__) ++ in_mch_suspend = TRUE; ++ + out_flush(); /* needed to make cursor visible on some systems */ + settmode(TMODE_COOK); + out_flush(); /* needed to disable mouse on some systems */ +*************** +*** 1361,1376 **** + mch_delay(wait_time, FALSE); + } + # endif + +! # ifdef FEAT_TITLE +! /* +! * Set oldtitle to NULL, so the current title is obtained again. +! */ +! VIM_CLEAR(oldtitle); +! # endif +! settmode(TMODE_RAW); +! need_check_timestamps = TRUE; +! did_check_timestamps = FALSE; + #else + suspend_shell(); + #endif +--- 1410,1418 ---- + mch_delay(wait_time, FALSE); + } + # endif ++ in_mch_suspend = FALSE; + +! after_sigcont(); + #else + suspend_shell(); + #endif +*************** +*** 1410,1416 **** + #ifdef SIGTSTP + signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); + #endif +! #if defined(_REENTRANT) && defined(SIGCONT) + signal(SIGCONT, sigcont_handler); + #endif + +--- 1452,1458 ---- + #ifdef SIGTSTP + signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); + #endif +! #if defined(SIGCONT) + signal(SIGCONT, sigcont_handler); + #endif + +*** ../vim-8.1.0243/src/term.c 2018-07-10 17:33:41.825155261 +0200 +--- src/term.c 2018-08-07 17:22:23.328496700 +0200 +*************** +*** 3789,3804 **** + static int cursor_is_off = FALSE; + + /* + * Enable the cursor. + */ + void + cursor_on(void) + { + if (cursor_is_off) +! { +! out_str(T_VE); +! cursor_is_off = FALSE; +! } + } + + /* +--- 3789,3811 ---- + static int cursor_is_off = FALSE; + + /* ++ * Enable the cursor without checking if it's already enabled. ++ */ ++ void ++ cursor_on_force(void) ++ { ++ out_str(T_VE); ++ cursor_is_off = FALSE; ++ } ++ ++ /* + * Enable the cursor. + */ + void + cursor_on(void) + { + if (cursor_is_off) +! cursor_on_force(); + } + + /* +*** ../vim-8.1.0243/src/proto/term.pro 2018-05-17 13:52:53.000000000 +0200 +--- src/proto/term.pro 2018-08-07 17:28:27.358277122 +0200 +*************** +*** 50,55 **** +--- 50,56 ---- + int mouse_has(int c); + int mouse_model_popup(void); + void scroll_start(void); ++ void cursor_on_force(void); + void cursor_on(void); + void cursor_off(void); + void term_cursor_mode(int forced); +*** ../vim-8.1.0243/src/version.c 2018-08-07 16:33:15.255728441 +0200 +--- src/version.c 2018-08-07 17:35:43.784518901 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 244, + /**/ + +-- +When I look deep into your eyes, I see JPEG artifacts. +I can tell by the pixels that we're wrong for each other. (xkcd) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0245 b/data/vim/patches/8.1.0245 new file mode 100644 index 000000000..04698cb19 --- /dev/null +++ b/data/vim/patches/8.1.0245 @@ -0,0 +1,114 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0245 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0245 +Problem: Calling setline() in TextChangedI autocmd breaks undo. (Jason + Felice) +Solution: Don't save lines for undo when already saved. (closes #3291) +Files: src/edit.c, src/testdir/test_autocmd.vim + + +*** ../vim-8.1.0244/src/edit.c 2018-08-07 14:55:04.905259782 +0200 +--- src/edit.c 2018-08-07 18:26:35.026760346 +0200 +*************** +*** 1722,1732 **** +--- 1722,1740 ---- + { + aco_save_T aco; + ++ // Sync undo when the autocommand calls setline() or append(), so that ++ // it can be undone separately. ++ u_sync_once = 2; ++ + // save and restore curwin and curbuf, in case the autocmd changes them + aucmd_prepbuf(&aco, curbuf); + apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf); + aucmd_restbuf(&aco); + curbuf->b_last_changedtick = CHANGEDTICK(curbuf); ++ ++ if (u_sync_once == 1) ++ ins_need_undo = TRUE; ++ u_sync_once = 0; + } + + #ifdef FEAT_INS_EXPAND +*** ../vim-8.1.0244/src/testdir/test_autocmd.vim 2018-04-28 20:01:18.000000000 +0200 +--- src/testdir/test_autocmd.vim 2018-08-07 18:58:19.655939116 +0200 +*************** +*** 587,593 **** + " Cleanup + au! OptionSet + for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp'] +! exe printf(":set %s&vi", opt) + endfor + call test_override('starting', 0) + delfunc! AutoCommandOptionSet +--- 587,593 ---- + " Cleanup + au! OptionSet + for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp'] +! exe printf(":set %s&vim", opt) + endfor + call test_override('starting', 0) + delfunc! AutoCommandOptionSet +*************** +*** 1313,1318 **** +--- 1313,1343 ---- + bw! + endfunc + ++ let g:setline_handled = v:false ++ func! SetLineOne() ++ if !g:setline_handled ++ call setline(1, "(x)") ++ let g:setline_handled = v:true ++ endif ++ endfunc ++ ++ func Test_TextChangedI_with_setline() ++ new ++ call test_override('char_avail', 1) ++ autocmd TextChangedI call SetLineOne() ++ call feedkeys("i(\\", 'tx') ++ call assert_equal('(', getline(1)) ++ call assert_equal('x)', getline(2)) ++ undo ++ call assert_equal('(', getline(1)) ++ call assert_equal('', getline(2)) ++ undo ++ call assert_equal('', getline(1)) ++ ++ call test_override('starting', 0) ++ bwipe! ++ endfunc ++ + func Test_Changed_FirstTime() + if !has('terminal') || has('gui_running') + return +*** ../vim-8.1.0244/src/version.c 2018-08-07 17:38:36.995674625 +0200 +--- src/version.c 2018-08-07 19:04:25.389813721 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 245, + /**/ + +-- +ARTHUR: Ni! +BEDEVERE: Nu! +ARTHUR: No. Ni! More like this. "Ni"! +BEDEVERE: Ni, ni, ni! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0246 b/data/vim/patches/8.1.0246 new file mode 100644 index 000000000..7b6869270 --- /dev/null +++ b/data/vim/patches/8.1.0246 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0246 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0246 (after 8.1.0245) +Problem: Build failure without the +eval feature. +Solution: Add #ifdef +Files: src/edit.c + + +*** ../vim-8.1.0245/src/edit.c 2018-08-07 19:04:57.409627129 +0200 +--- src/edit.c 2018-08-07 19:31:01.308285633 +0200 +*************** +*** 1722,1730 **** +--- 1722,1732 ---- + { + aco_save_T aco; + ++ #ifdef FEAT_EVAL + // Sync undo when the autocommand calls setline() or append(), so that + // it can be undone separately. + u_sync_once = 2; ++ #endif + + // save and restore curwin and curbuf, in case the autocmd changes them + aucmd_prepbuf(&aco, curbuf); +*************** +*** 1732,1740 **** +--- 1734,1744 ---- + aucmd_restbuf(&aco); + curbuf->b_last_changedtick = CHANGEDTICK(curbuf); + ++ #ifdef FEAT_EVAL + if (u_sync_once == 1) + ins_need_undo = TRUE; + u_sync_once = 0; ++ #endif + } + + #ifdef FEAT_INS_EXPAND +*** ../vim-8.1.0245/src/version.c 2018-08-07 19:04:57.409627129 +0200 +--- src/version.c 2018-08-07 19:31:44.160031830 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 246, + /**/ + +-- +Michael: There is no such thing as a dump question. +Bernard: Sure there is. For example "what is a core dump?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0247 b/data/vim/patches/8.1.0247 new file mode 100644 index 000000000..0e481d271 --- /dev/null +++ b/data/vim/patches/8.1.0247 @@ -0,0 +1,318 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0247 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0247 +Problem: Python: error message for failing import is incorrect. +Solution: Adjust how modules are loaded. (Ozaki Kiichi, closes #3162) +Files: src/if_py_both.h, src/testdir/test86.ok, src/testdir/test87.ok + + +*** ../vim-8.1.0246/src/if_py_both.h 2018-07-25 22:02:32.231966301 +0200 +--- src/if_py_both.h 2018-08-07 19:38:33.041613725 +0200 +*************** +*** 544,570 **** + } + + #if PY_VERSION_HEX < 0x030700f0 + typedef struct + { + PyObject_HEAD +! PyObject *module; + } LoaderObject; + static PyTypeObject LoaderType; + + static void + LoaderDestructor(LoaderObject *self) + { +! Py_DECREF(self->module); + DESTRUCTOR_FINISH(self); + } + + static PyObject * + LoaderLoadModule(LoaderObject *self, PyObject *args UNUSED) + { +! PyObject *ret = self->module; + +! Py_INCREF(ret); +! return ret; + } + + static struct PyMethodDef LoaderMethods[] = { +--- 544,600 ---- + } + + #if PY_VERSION_HEX < 0x030700f0 ++ static PyObject *call_load_module(char *name, int len, PyObject *find_module_result); ++ + typedef struct + { + PyObject_HEAD +! char *fullname; +! PyObject *result; + } LoaderObject; + static PyTypeObject LoaderType; + + static void + LoaderDestructor(LoaderObject *self) + { +! vim_free(self->fullname); +! Py_XDECREF(self->result); + DESTRUCTOR_FINISH(self); + } + + static PyObject * + LoaderLoadModule(LoaderObject *self, PyObject *args UNUSED) + { +! char *fullname = self->fullname; +! PyObject *result = self->result; +! PyObject *module; + +! if (!fullname) +! { +! module = result ? result : Py_None; +! Py_INCREF(module); +! return module; +! } +! +! module = call_load_module(fullname, (int)STRLEN(fullname), result); +! +! self->fullname = NULL; +! self->result = module; +! +! vim_free(fullname); +! Py_DECREF(result); +! +! if (!module) +! { +! if (PyErr_Occurred()) +! return NULL; +! +! Py_INCREF(Py_None); +! return Py_None; +! } +! +! Py_INCREF(module); +! return module; + } + + static struct PyMethodDef LoaderMethods[] = { +*************** +*** 1252,1258 **** +--- 1282,1292 ---- + + if (!(find_module_result = PyObject_CallFunction(py_find_module, + "s#O", tail, partlen, new_path))) ++ { ++ if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_ImportError)) ++ PyErr_Clear(); + return NULL; ++ } + + if (!(module = call_load_module( + fullname, +*************** +*** 1273,1302 **** + + Py_DECREF(module); + +! module = find_module(fullname, dot + 1, newest_path); + + Py_DECREF(newest_path); + +! return module; + } + else + { + if (!(find_module_result = PyObject_CallFunction(py_find_module, + "sO", tail, new_path))) +- return NULL; +- +- if (!(module = call_load_module( +- fullname, +- (int)STRLEN(fullname), +- find_module_result))) + { +! Py_DECREF(find_module_result); + return NULL; + } + +! Py_DECREF(find_module_result); +! +! return module; + } + } + +--- 1307,1329 ---- + + Py_DECREF(module); + +! find_module_result = find_module(fullname, dot + 1, newest_path); + + Py_DECREF(newest_path); + +! return find_module_result; + } + else + { + if (!(find_module_result = PyObject_CallFunction(py_find_module, + "sO", tail, new_path))) + { +! if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_ImportError)) +! PyErr_Clear(); + return NULL; + } + +! return find_module_result; + } + } + +*************** +*** 1304,1310 **** + FinderFindModule(PyObject *self, PyObject *args) + { + char *fullname; +! PyObject *module; + PyObject *new_path; + LoaderObject *loader; + +--- 1331,1337 ---- + FinderFindModule(PyObject *self, PyObject *args) + { + char *fullname; +! PyObject *result; + PyObject *new_path; + LoaderObject *loader; + +*************** +*** 1314,1344 **** + if (!(new_path = Vim_GetPaths(self))) + return NULL; + +! module = find_module(fullname, fullname, new_path); + + Py_DECREF(new_path); + +! if (!module) + { + if (PyErr_Occurred()) +! { +! if (PyErr_ExceptionMatches(PyExc_ImportError)) +! PyErr_Clear(); +! else +! return NULL; +! } + + Py_INCREF(Py_None); + return Py_None; + } + + if (!(loader = PyObject_NEW(LoaderObject, &LoaderType))) + { +! Py_DECREF(module); + return NULL; + } + +! loader->module = module; + + return (PyObject *) loader; + } +--- 1341,1375 ---- + if (!(new_path = Vim_GetPaths(self))) + return NULL; + +! result = find_module(fullname, fullname, new_path); + + Py_DECREF(new_path); + +! if (!result) + { + if (PyErr_Occurred()) +! return NULL; + + Py_INCREF(Py_None); + return Py_None; + } + ++ if (!(fullname = (char *)vim_strsave((char_u *)fullname))) ++ { ++ Py_DECREF(result); ++ PyErr_NoMemory(); ++ return NULL; ++ } ++ + if (!(loader = PyObject_NEW(LoaderObject, &LoaderType))) + { +! vim_free(fullname); +! Py_DECREF(result); + return NULL; + } + +! loader->fullname = fullname; +! loader->result = result; + + return (PyObject *) loader; + } +*** ../vim-8.1.0246/src/testdir/test86.ok 2018-06-10 13:55:48.527949068 +0200 +--- src/testdir/test86.ok 2018-08-07 19:38:33.041613725 +0200 +*************** +*** 701,707 **** + vim.foreach_rtp(int, 2):TypeError:('foreach_rtp() takes exactly one argument (2 given)',) + > import + import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',) +! import failing_import:ImportError:('No module named failing_import',) + import failing:NotImplementedError:() + > Options + >> OptionsItem +--- 701,707 ---- + vim.foreach_rtp(int, 2):TypeError:('foreach_rtp() takes exactly one argument (2 given)',) + > import + import xxx_no_such_module_xxx:ImportError:('No module named xxx_no_such_module_xxx',) +! import failing_import:ImportError:() + import failing:NotImplementedError:() + > Options + >> OptionsItem +*** ../vim-8.1.0246/src/testdir/test87.ok 2018-06-10 13:55:48.527949068 +0200 +--- src/testdir/test87.ok 2018-08-07 19:38:33.045613701 +0200 +*************** +*** 701,707 **** + vim.foreach_rtp(int, 2):(, TypeError('foreach_rtp() takes exactly one argument (2 given)',)) + > import + import xxx_no_such_module_xxx:(, ImportError('No module named xxx_no_such_module_xxx',)) +! import failing_import:(, ImportError('No module named failing_import',)) + import failing:(, NotImplementedError()) + > Options + >> OptionsItem +--- 701,707 ---- + vim.foreach_rtp(int, 2):(, TypeError('foreach_rtp() takes exactly one argument (2 given)',)) + > import + import xxx_no_such_module_xxx:(, ImportError('No module named xxx_no_such_module_xxx',)) +! import failing_import:(, ImportError()) + import failing:(, NotImplementedError()) + > Options + >> OptionsItem +*** ../vim-8.1.0246/src/version.c 2018-08-07 19:32:48.371651690 +0200 +--- src/version.c 2018-08-07 19:41:29.784569837 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 247, + /**/ + +-- +ARTHUR: Did you say shrubberies? +ROGER: Yes. Shrubberies are my trade. I am a shrubber. My name is Roger + the Shrubber. I arrange, design, and sell shrubberies. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0248 b/data/vim/patches/8.1.0248 new file mode 100644 index 000000000..ca371b423 --- /dev/null +++ b/data/vim/patches/8.1.0248 @@ -0,0 +1,147 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0248 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0248 +Problem: duplicated quickfix code. +Solution: Move the code to a function. +Files: src/quickfix.c + + +*** ../vim-8.1.0247/src/quickfix.c 2018-08-01 17:53:04.693381270 +0200 +--- src/quickfix.c 2018-08-01 20:00:00.659109066 +0200 +*************** +*** 4126,4131 **** +--- 4126,4145 ---- + } + + /* ++ * Jump to the first entry if there is one. ++ */ ++ static void ++ qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit) ++ { ++ // If autocommands changed the current list, then restore it ++ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) ++ qi->qf_curlist = qf_id2nr(qi, save_qfid); ++ ++ if (qi->qf_lists[qi->qf_curlist].qf_count > 0) ++ qf_jump(qi, 0, 0, forceit); ++ } ++ ++ /* + * Return TRUE when using ":vimgrep" for ":grep". + */ + int +*************** +*** 4247,4258 **** + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); + if (res > 0 && !eap->forceit && qflist_valid(wp, save_qfid)) +! { +! // If autocommands changed the current list, then restore it +! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) +! qi->qf_curlist = qf_id2nr(qi, save_qfid); +! qf_jump(qi, 0, 0, FALSE); /* display first error */ +! } + + cleanup: + mch_remove(fname); +--- 4261,4268 ---- + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); + if (res > 0 && !eap->forceit && qflist_valid(wp, save_qfid)) +! // display the first error +! qf_jump_first(qi, save_qfid, FALSE); + + cleanup: + mch_remove(fname); +*************** +*** 4650,4659 **** + if (res > 0 && (eap->cmdidx == CMD_cfile || eap->cmdidx == CMD_lfile) + && qflist_valid(wp, save_qfid)) + { +! // If autocommands changed the current list, then restore it +! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) +! qi->qf_curlist = qf_id2nr(qi, save_qfid); +! qf_jump(qi, 0, 0, eap->forceit); /* display first error */ + } + } + +--- 4660,4667 ---- + if (res > 0 && (eap->cmdidx == CMD_cfile || eap->cmdidx == CMD_lfile) + && qflist_valid(wp, save_qfid)) + { +! // display the first error +! qf_jump_first(qi, save_qfid, eap->forceit); + } + } + +*************** +*** 6361,6370 **** + eap->cmdidx == CMD_lbuffer) + && qflist_valid(wp, save_qfid)) + { +! // If autocommands changed the current list, then restore it +! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) +! qi->qf_curlist = qf_id2nr(qi, save_qfid); +! qf_jump(qi, 0, 0, eap->forceit); /* display first error */ + } + } + } +--- 6369,6376 ---- + eap->cmdidx == CMD_lbuffer) + && qflist_valid(wp, save_qfid)) + { +! // display the first error +! qf_jump_first(qi, save_qfid, eap->forceit); + } + } + } +*************** +*** 6443,6452 **** + || eap->cmdidx == CMD_lexpr) + && qflist_valid(wp, save_qfid)) + { +! // If autocommands changed the current list, then restore it +! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) +! qi->qf_curlist = qf_id2nr(qi, save_qfid); +! qf_jump(qi, 0, 0, eap->forceit); + } + } + else +--- 6449,6456 ---- + || eap->cmdidx == CMD_lexpr) + && qflist_valid(wp, save_qfid)) + { +! // display the first error +! qf_jump_first(qi, save_qfid, eap->forceit); + } + } + else +*** ../vim-8.1.0247/src/version.c 2018-08-07 19:45:22.623218411 +0200 +--- src/version.c 2018-08-07 19:47:15.006608513 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 248, + /**/ + +-- +TALL KNIGHT: We are now no longer the Knights Who Say Ni! +ONE KNIGHT: Ni! +OTHERS: Sh! +ONE KNIGHT: (whispers) Sorry. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0249 b/data/vim/patches/8.1.0249 new file mode 100644 index 000000000..772cd519e --- /dev/null +++ b/data/vim/patches/8.1.0249 @@ -0,0 +1,88 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0249 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0249 +Problem: GTK: when screen DPI changes Vim does not handle it. +Solution: Handle the gtk-xft-dpi signal. (Roel van de Kraats, + closes #2357) +Files: src/gui_gtk_x11.c + + +*** ../vim-8.1.0248/src/gui_gtk_x11.c 2018-04-14 13:54:46.000000000 +0200 +--- src/gui_gtk_x11.c 2018-08-07 20:00:51.725991750 +0200 +*************** +*** 788,793 **** +--- 788,816 ---- + } + #endif /* defined(FEAT_CLIENTSERVER) */ + ++ /* ++ * Handle changes to the "Xft/DPI" setting ++ */ ++ static void ++ gtk_settings_xft_dpi_changed_cb(GtkSettings *gtk_settings UNUSED, ++ GParamSpec *pspec UNUSED, ++ gpointer data UNUSED) ++ { ++ // Create a new PangoContext for this screen, and initialize it ++ // with the current font if necessary. ++ if (gui.text_context != NULL) ++ g_object_unref(gui.text_context); ++ ++ gui.text_context = gtk_widget_create_pango_context(gui.mainwin); ++ pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR); ++ ++ if (gui.norm_font != NULL) ++ { ++ // force default font ++ gui_mch_init_font(*p_guifont == NUL ? NULL : p_guifont, FALSE); ++ gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH); ++ } ++ } + + #if GTK_CHECK_VERSION(3,0,0) + typedef gboolean timeout_cb_type; +*************** +*** 4383,4388 **** +--- 4406,4420 ---- + /* Pretend we don't have input focus, we will get an event if we do. */ + gui.in_focus = FALSE; + ++ // Handle changes to the "Xft/DPI" setting. ++ { ++ GtkSettings *gtk_settings = ++ gtk_settings_get_for_screen(gdk_screen_get_default()); ++ ++ g_signal_connect(gtk_settings, "notify::gtk-xft-dpi", ++ G_CALLBACK(gtk_settings_xft_dpi_changed_cb), NULL); ++ } ++ + return OK; + } + +*** ../vim-8.1.0248/src/version.c 2018-08-07 19:47:46.746434541 +0200 +--- src/version.c 2018-08-07 19:59:06.534596911 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 249, + /**/ + +-- +TALL KNIGHT: Firstly. You must get us another shrubbery! +OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni! +ARTHUR: Not another shrubbery - + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0250 b/data/vim/patches/8.1.0250 new file mode 100644 index 000000000..50c7f4be1 --- /dev/null +++ b/data/vim/patches/8.1.0250 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0250 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0250 +Problem: MS-Windows using VTP: windows size change incorrect. +Solution: Call SetConsoleScreenBufferSize() first. (Nobuhiro Takasaki, + closes #3164) +Files: src/os_win32.c + + +*** ../vim-8.1.0249/src/os_win32.c 2018-06-19 19:59:15.244704285 +0200 +--- src/os_win32.c 2018-08-07 20:45:29.601418126 +0200 +*************** +*** 3967,3972 **** +--- 3967,4014 ---- + } + + /* ++ * Resize console buffer to 'COORD' ++ */ ++ static void ++ ResizeConBuf( ++ HANDLE hConsole, ++ COORD coordScreen) ++ { ++ if (!SetConsoleScreenBufferSize(hConsole, coordScreen)) ++ { ++ #ifdef MCH_WRITE_DUMP ++ if (fdDump) ++ { ++ fprintf(fdDump, "SetConsoleScreenBufferSize failed: %lx\n", ++ GetLastError()); ++ fflush(fdDump); ++ } ++ #endif ++ } ++ } ++ ++ /* ++ * Resize console window size to 'srWindowRect' ++ */ ++ static void ++ ResizeWindow( ++ HANDLE hConsole, ++ SMALL_RECT srWindowRect) ++ { ++ if (!SetConsoleWindowInfo(hConsole, TRUE, &srWindowRect)) ++ { ++ #ifdef MCH_WRITE_DUMP ++ if (fdDump) ++ { ++ fprintf(fdDump, "SetConsoleWindowInfo failed: %lx\n", ++ GetLastError()); ++ fflush(fdDump); ++ } ++ #endif ++ } ++ } ++ ++ /* + * Set a console window to `xSize' * `ySize' + */ + static void +*************** +*** 4019,4050 **** + } + } + +! if (!SetConsoleWindowInfo(g_hConOut, TRUE, &srWindowRect)) +! { +! #ifdef MCH_WRITE_DUMP +! if (fdDump) +! { +! fprintf(fdDump, "SetConsoleWindowInfo failed: %lx\n", +! GetLastError()); +! fflush(fdDump); +! } +! #endif +! } +! +! /* define the new console buffer size */ + coordScreen.X = xSize; + coordScreen.Y = ySize; + +! if (!SetConsoleScreenBufferSize(hConsole, coordScreen)) + { +! #ifdef MCH_WRITE_DUMP +! if (fdDump) +! { +! fprintf(fdDump, "SetConsoleScreenBufferSize failed: %lx\n", +! GetLastError()); +! fflush(fdDump); +! } +! #endif + } + } + +--- 4061,4080 ---- + } + } + +! // define the new console buffer size + coordScreen.X = xSize; + coordScreen.Y = ySize; + +! // In the new console call API in reverse order +! if (!vtp_working) + { +! ResizeWindow(hConsole, srWindowRect); +! ResizeConBuf(hConsole, coordScreen); +! } +! else +! { +! ResizeConBuf(hConsole, coordScreen); +! ResizeWindow(hConsole, srWindowRect); + } + } + +*** ../vim-8.1.0249/src/version.c 2018-08-07 20:01:34.245746660 +0200 +--- src/version.c 2018-08-07 20:44:49.633662912 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 250, + /**/ + +-- +Vi beats Emacs to death, and then again! + http://linuxtoday.com/stories/5764.html + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0251 b/data/vim/patches/8.1.0251 new file mode 100644 index 000000000..f5b927a09 --- /dev/null +++ b/data/vim/patches/8.1.0251 @@ -0,0 +1,365 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0251 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0251 +Problem: Using a full path is supported for 'directory' but not for + 'backupdir'. (Mikolaj Machowski) +Solution: Support 'backupdir' as well. (Christian Brabandt, closes #179) +Files: runtime/doc/options.txt, src/fileio.c, src/memline.c, + src/proto/memline.pro, src/testdir/test_alot.vim, + src/testdir/test_backup.vim, src/Make_all.mak + + +*** ../vim-8.1.0250/runtime/doc/options.txt 2018-06-23 19:22:45.598486362 +0200 +--- runtime/doc/options.txt 2018-08-07 21:04:11.238964573 +0200 +*************** +*** 1052,1057 **** +--- 1054,1067 ---- + name, precede it with a backslash. + - To include a comma in a directory name precede it with a backslash. + - A directory name may end in an '/'. ++ - For Unix and Win32, if a directory ends in two path separators "//", ++ the swap file name will be built from the complete path to the file ++ with all path separators changed to percent '%' signs. This will ++ ensure file name uniqueness in the backup directory. ++ On Win32, it is also possible to end with "\\". However, When a ++ separating comma is following, you must use "//", since "\\" will ++ include the comma in the file name. Therefore it is recommended to ++ use '//', instead of '\\'. + - Environment variables are expanded |:set_env|. + - Careful with '\' characters, type one before a space, type two to + get one in the option (see |option-backslash|), for example: > +*************** +*** 2678,2689 **** + - A directory starting with "./" (or ".\" for MS-DOS et al.) means to + put the swap file relative to where the edited file is. The leading + "." is replaced with the path name of the edited file. +! - For Unix and Win32, if a directory ends in two path separators "//" +! or "\\", the swap file name will be built from the complete path to +! the file with all path separators substituted to percent '%' signs. +! This will ensure file name uniqueness in the preserve directory. +! On Win32, when a separating comma is following, you must use "//", +! since "\\" will include the comma in the file name. + - Spaces after the comma are ignored, other spaces are considered part + of the directory name. To have a space at the start of a directory + name, precede it with a backslash. +--- 2688,2701 ---- + - A directory starting with "./" (or ".\" for MS-DOS et al.) means to + put the swap file relative to where the edited file is. The leading + "." is replaced with the path name of the edited file. +! - For Unix and Win32, if a directory ends in two path separators "//", +! the swap file name will be built from the complete path to the file +! with all path separators substituted to percent '%' signs. This will +! ensure file name uniqueness in the preserve directory. +! On Win32, it is also possible to end with "\\". However, When a +! separating comma is following, you must use "//", since "\\" will +! include the comma in the file name. Therefore it is recommended to +! use '//', instead of '\\'. + - Spaces after the comma are ignored, other spaces are considered part + of the directory name. To have a space at the start of a directory + name, precede it with a backslash. +*** ../vim-8.1.0250/src/fileio.c 2018-08-01 17:53:04.689381294 +0200 +--- src/fileio.c 2018-08-07 21:36:54.903803767 +0200 +*************** +*** 3850,3855 **** +--- 3850,3858 ---- + stat_T st_new; + char_u *dirp; + char_u *rootname; ++ #if defined(UNIX) || defined(WIN3264) ++ char_u *p; ++ #endif + #if defined(UNIX) + int did_set_shortname; + mode_t umask_save; +*************** +*** 3887,3892 **** +--- 3890,3906 ---- + * Isolate one directory name, using an entry in 'bdir'. + */ + (void)copy_option_part(&dirp, copybuf, BUFSIZE, ","); ++ ++ #if defined(UNIX) || defined(WIN3264) ++ p = copybuf + STRLEN(copybuf); ++ if (after_pathsep(copybuf, p) && p[-1] == p[-2]) ++ // Ends with '//', use full path ++ if ((p = make_percent_swname(copybuf, fname)) != NULL) ++ { ++ backup = modname(p, backup_ext, FALSE); ++ vim_free(p); ++ } ++ #endif + rootname = get_file_in_dir(fname, copybuf); + if (rootname == NULL) + { +*************** +*** 3904,3912 **** + for (;;) + { + /* +! * Make backup file name. + */ +! backup = buf_modname((buf->b_p_sn || buf->b_shortname), + rootname, backup_ext, FALSE); + if (backup == NULL) + { +--- 3918,3927 ---- + for (;;) + { + /* +! * Make the backup file name. + */ +! if (backup == NULL) +! backup = buf_modname((buf->b_p_sn || buf->b_shortname), + rootname, backup_ext, FALSE); + if (backup == NULL) + { +*************** +*** 4108,4121 **** + * Isolate one directory name and make the backup file name. + */ + (void)copy_option_part(&dirp, IObuff, IOSIZE, ","); +! rootname = get_file_in_dir(fname, IObuff); +! if (rootname == NULL) +! backup = NULL; +! else + { +! backup = buf_modname((buf->b_p_sn || buf->b_shortname), +! rootname, backup_ext, FALSE); +! vim_free(rootname); + } + + if (backup != NULL) +--- 4123,4151 ---- + * Isolate one directory name and make the backup file name. + */ + (void)copy_option_part(&dirp, IObuff, IOSIZE, ","); +! +! #if defined(UNIX) || defined(WIN3264) +! p = IObuff + STRLEN(IObuff); +! if (after_pathsep(IObuff, p) && p[-1] == p[-2]) +! // path ends with '//', use full path +! if ((p = make_percent_swname(IObuff, fname)) != NULL) +! { +! backup = modname(p, backup_ext, FALSE); +! vim_free(p); +! } +! #endif +! if (backup == NULL) + { +! rootname = get_file_in_dir(fname, IObuff); +! if (rootname == NULL) +! backup = NULL; +! else +! { +! backup = buf_modname( +! (buf->b_p_sn || buf->b_shortname), +! rootname, backup_ext, FALSE); +! vim_free(rootname); +! } + } + + if (backup != NULL) +*************** +*** 6252,6258 **** + #endif + + /* +! * add extension to file name - change path/fo.o.h to path/fo.o.h.ext or + * fo_o_h.ext for MSDOS or when shortname option set. + * + * Assumed that fname is a valid name found in the filesystem we assure that +--- 6282,6288 ---- + #endif + + /* +! * Add extension to file name - change path/fo.o.h to path/fo.o.h.ext or + * fo_o_h.ext for MSDOS or when shortname option set. + * + * Assumed that fname is a valid name found in the filesystem we assure that +*** ../vim-8.1.0250/src/memline.c 2018-05-26 17:35:19.717625256 +0200 +--- src/memline.c 2018-08-07 21:32:43.441160597 +0200 +*************** +*** 262,270 **** + #endif + static void long_to_char(long, char_u *); + static long char_to_long(char_u *); +- #if defined(UNIX) || defined(WIN3264) +- static char_u *make_percent_swname(char_u *dir, char_u *name); +- #endif + #ifdef FEAT_CRYPT + static cryptstate_T *ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading); + #endif +--- 262,267 ---- +*************** +*** 2007,2024 **** + return file_count; + } + +! #if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */ + /* + * Append the full path to name with path separators made into percent + * signs, to dir. An unnamed buffer is handled as "" (/"") + */ +! static char_u * + make_percent_swname(char_u *dir, char_u *name) + { +! char_u *d, *s, *f; + +! f = fix_fname(name != NULL ? name : (char_u *) ""); +! d = NULL; + if (f != NULL) + { + s = alloc((unsigned)(STRLEN(f) + 1)); +--- 2004,2021 ---- + return file_count; + } + +! #if defined(UNIX) || defined(WIN3264) || defined(PROTO) + /* ++ * Need _very_ long file names. + * Append the full path to name with path separators made into percent + * signs, to dir. An unnamed buffer is handled as "" (/"") + */ +! char_u * + make_percent_swname(char_u *dir, char_u *name) + { +! char_u *d = NULL, *s, *f; + +! f = fix_fname(name != NULL ? name : (char_u *)""); + if (f != NULL) + { + s = alloc((unsigned)(STRLEN(f) + 1)); +*************** +*** 4070,4077 **** + } + + #if defined(FEAT_EVAL) +- static int do_swapexists(buf_T *buf, char_u *fname); +- + /* + * Trigger the SwapExists autocommands. + * Returns a value for equivalent to do_dialog() (see below): +--- 4067,4072 ---- +*** ../vim-8.1.0250/src/proto/memline.pro 2018-05-17 13:52:44.000000000 +0200 +--- src/proto/memline.pro 2018-08-07 20:56:46.217467718 +0200 +*************** +*** 34,37 **** +--- 34,38 ---- + void ml_decrypt_data(memfile_T *mfp, char_u *data, off_T offset, unsigned size); + long ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp); + void goto_byte(long cnt); ++ char_u *make_percent_swname (char_u *dir, char_u *name); + /* vim: set ft=c : */ +*** ../vim-8.1.0250/src/testdir/test_alot.vim 2018-07-23 04:11:37.648969780 +0200 +--- src/testdir/test_alot.vim 2018-08-07 20:57:34.725202003 +0200 +*************** +*** 2,7 **** +--- 2,8 ---- + " This makes testing go faster, since Vim doesn't need to restart. + + source test_assign.vim ++ source test_backup.vim + source test_bufline.vim + source test_cd.vim + source test_changedtick.vim +*** ../vim-8.1.0250/src/testdir/test_backup.vim 2018-08-07 21:37:56.879462014 +0200 +--- src/testdir/test_backup.vim 2018-08-07 21:21:16.656940451 +0200 +*************** +*** 0 **** +--- 1,58 ---- ++ " Tests for the backup function ++ ++ func Test_backup() ++ set backup backupdir=. ++ new ++ call setline(1, ['line1', 'line2']) ++ :f Xbackup.txt ++ :w! Xbackup.txt ++ " backup file is only created after ++ " writing a second time (before overwriting) ++ :w! Xbackup.txt ++ let l = readfile('Xbackup.txt~') ++ call assert_equal(['line1', 'line2'], l) ++ bw! ++ set backup&vim backupdir&vim ++ call delete('Xbackup.txt') ++ call delete('Xbackup.txt~') ++ endfunc ++ ++ func Test_backup2() ++ set backup backupdir=.// ++ new ++ call setline(1, ['line1', 'line2', 'line3']) ++ :f Xbackup.txt ++ :w! Xbackup.txt ++ " backup file is only created after ++ " writing a second time (before overwriting) ++ :w! Xbackup.txt ++ sp *Xbackup.txt~ ++ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) ++ let f=expand('%') ++ call assert_match('src%testdir%Xbackup.txt\~', f) ++ bw! ++ bw! ++ call delete('Xbackup.txt') ++ call delete(f) ++ set backup&vim backupdir&vim ++ endfunc ++ ++ func Test_backup2_backupcopy() ++ set backup backupdir=.// backupcopy=yes ++ new ++ call setline(1, ['line1', 'line2', 'line3']) ++ :f Xbackup.txt ++ :w! Xbackup.txt ++ " backup file is only created after ++ " writing a second time (before overwriting) ++ :w! Xbackup.txt ++ sp *Xbackup.txt~ ++ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) ++ let f=expand('%') ++ call assert_match('src%testdir%Xbackup.txt\~', f) ++ bw! ++ bw! ++ call delete('Xbackup.txt') ++ call delete(f) ++ set backup&vim backupdir&vim backupcopy&vim ++ endfunc +*** ../vim-8.1.0250/src/Make_all.mak 2018-07-23 04:11:37.644969804 +0200 +--- src/Make_all.mak 2018-08-07 21:17:31.690274783 +0200 +*************** +*** 12,17 **** +--- 12,18 ---- + test_autocmd \ + test_autoload \ + test_backspace_opt \ ++ test_backup \ + test_blockedit \ + test_breakindent \ + test_bufline \ +*** ../vim-8.1.0250/src/version.c 2018-08-07 20:47:02.756848221 +0200 +--- src/version.c 2018-08-07 20:59:39.444509393 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 251, + /**/ + +-- +TALL KNIGHT: When you have found the shrubbery, then you must cut down the + mightiest tree in the forest ... with a herring. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0252 b/data/vim/patches/8.1.0252 new file mode 100644 index 000000000..f72f55a0d --- /dev/null +++ b/data/vim/patches/8.1.0252 @@ -0,0 +1,1540 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0252 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0252 +Problem: Quickfix functions are too long. +Solution: Refactor. (Yegappan Lakshmanan, closes #2950) +Files: src/quickfix.c + + +*** ../vim-8.1.0251/src/quickfix.c 2018-08-07 19:47:46.746434541 +0200 +--- src/quickfix.c 2018-08-07 21:52:51.654369210 +0200 +*************** +*** 201,306 **** + + /* + * Convert an errorformat pattern to a regular expression pattern. +! * See fmt_pat definition above for the list of supported patterns. + */ + static char_u * +! fmtpat_to_regpat( +! char_u *efmp, +! efm_T *fmt_ptr, + int idx, + int round, +- char_u *ptr, + char_u *errmsg) + { + char_u *srcptr; + +! if (fmt_ptr->addr[idx]) + { + /* Each errorformat pattern can occur only once */ + sprintf((char *)errmsg, +! _("E372: Too many %%%c in format string"), *efmp); + EMSG(errmsg); + return NULL; + } + if ((idx && idx < 6 +! && vim_strchr((char_u *)"DXOPQ", fmt_ptr->prefix) != NULL) + || (idx == 6 +! && vim_strchr((char_u *)"OPQ", fmt_ptr->prefix) == NULL)) + { + sprintf((char *)errmsg, +! _("E373: Unexpected %%%c in format string"), *efmp); + EMSG(errmsg); + return NULL; + } +! fmt_ptr->addr[idx] = (char_u)++round; +! *ptr++ = '\\'; +! *ptr++ = '('; + #ifdef BACKSLASH_IN_FILENAME +! if (*efmp == 'f') + { + /* Also match "c:" in the file name, even when + * checking for a colon next: "%f:". + * "\%(\a:\)\=" */ +! STRCPY(ptr, "\\%(\\a:\\)\\="); +! ptr += 10; + } + #endif +! if (*efmp == 'f' && efmp[1] != NUL) + { +! if (efmp[1] != '\\' && efmp[1] != '%') + { + /* A file name may contain spaces, but this isn't + * in "\f". For "%f:%l:%m" there may be a ":" in + * the file name. Use ".\{-1,}x" instead (x is + * the next character), the requirement that :999: + * follows should work. */ +! STRCPY(ptr, ".\\{-1,}"); +! ptr += 7; + } + else + { + /* File name followed by '\\' or '%': include as + * many file name chars as possible. */ +! STRCPY(ptr, "\\f\\+"); +! ptr += 4; + } + } + else + { + srcptr = (char_u *)fmt_pat[idx].pattern; +! while ((*ptr = *srcptr++) != NUL) +! ++ptr; + } +! *ptr++ = '\\'; +! *ptr++ = ')'; + +! return ptr; + } + + /* + * Convert a scanf like format in 'errorformat' to a regular expression. + */ + static char_u * + scanf_fmt_to_regpat( + char_u *efm, + int len, +! char_u **pefmp, +! char_u *ptr, + char_u *errmsg) + { + char_u *efmp = *pefmp; + +! if (*++efmp == '[' || *efmp == '\\') + { +! if ((*ptr++ = *efmp) == '[') /* %*[^a-z0-9] etc. */ + { + if (efmp[1] == '^') +! *ptr++ = *++efmp; + if (efmp < efm + len) + { +! *ptr++ = *++efmp; /* could be ']' */ + while (efmp < efm + len +! && (*ptr++ = *++efmp) != ']') + /* skip */; + if (efmp == efm + len) + { +--- 201,309 ---- + + /* + * Convert an errorformat pattern to a regular expression pattern. +! * See fmt_pat definition above for the list of supported patterns. The +! * pattern specifier is supplied in "efmpat". The converted pattern is stored +! * in "regpat". Returns a pointer to the location after the pattern. + */ + static char_u * +! efmpat_to_regpat( +! char_u *efmpat, +! char_u *regpat, +! efm_T *efminfo, + int idx, + int round, + char_u *errmsg) + { + char_u *srcptr; + +! if (efminfo->addr[idx]) + { + /* Each errorformat pattern can occur only once */ + sprintf((char *)errmsg, +! _("E372: Too many %%%c in format string"), *efmpat); + EMSG(errmsg); + return NULL; + } + if ((idx && idx < 6 +! && vim_strchr((char_u *)"DXOPQ", efminfo->prefix) != NULL) + || (idx == 6 +! && vim_strchr((char_u *)"OPQ", efminfo->prefix) == NULL)) + { + sprintf((char *)errmsg, +! _("E373: Unexpected %%%c in format string"), *efmpat); + EMSG(errmsg); + return NULL; + } +! efminfo->addr[idx] = (char_u)++round; +! *regpat++ = '\\'; +! *regpat++ = '('; + #ifdef BACKSLASH_IN_FILENAME +! if (*efmpat == 'f') + { + /* Also match "c:" in the file name, even when + * checking for a colon next: "%f:". + * "\%(\a:\)\=" */ +! STRCPY(regpat, "\\%(\\a:\\)\\="); +! regpat += 10; + } + #endif +! if (*efmpat == 'f' && efmpat[1] != NUL) + { +! if (efmpat[1] != '\\' && efmpat[1] != '%') + { + /* A file name may contain spaces, but this isn't + * in "\f". For "%f:%l:%m" there may be a ":" in + * the file name. Use ".\{-1,}x" instead (x is + * the next character), the requirement that :999: + * follows should work. */ +! STRCPY(regpat, ".\\{-1,}"); +! regpat += 7; + } + else + { + /* File name followed by '\\' or '%': include as + * many file name chars as possible. */ +! STRCPY(regpat, "\\f\\+"); +! regpat += 4; + } + } + else + { + srcptr = (char_u *)fmt_pat[idx].pattern; +! while ((*regpat = *srcptr++) != NUL) +! ++regpat; + } +! *regpat++ = '\\'; +! *regpat++ = ')'; + +! return regpat; + } + + /* + * Convert a scanf like format in 'errorformat' to a regular expression. ++ * Returns a pointer to the location after the pattern. + */ + static char_u * + scanf_fmt_to_regpat( ++ char_u **pefmp, + char_u *efm, + int len, +! char_u *regpat, + char_u *errmsg) + { + char_u *efmp = *pefmp; + +! if (*efmp == '[' || *efmp == '\\') + { +! if ((*regpat++ = *efmp) == '[') /* %*[^a-z0-9] etc. */ + { + if (efmp[1] == '^') +! *regpat++ = *++efmp; + if (efmp < efm + len) + { +! *regpat++ = *++efmp; /* could be ']' */ + while (efmp < efm + len +! && (*regpat++ = *++efmp) != ']') + /* skip */; + if (efmp == efm + len) + { +*************** +*** 310,318 **** + } + } + else if (efmp < efm + len) /* %*\D, %*\s etc. */ +! *ptr++ = *++efmp; +! *ptr++ = '\\'; +! *ptr++ = '+'; + } + else + { +--- 313,321 ---- + } + } + else if (efmp < efm + len) /* %*\D, %*\s etc. */ +! *regpat++ = *++efmp; +! *regpat++ = '\\'; +! *regpat++ = '+'; + } + else + { +*************** +*** 325,360 **** + + *pefmp = efmp; + +! return ptr; + } + + /* + * Analyze/parse an errorformat prefix. + */ +! static int +! efm_analyze_prefix(char_u **pefmp, efm_T *fmt_ptr, char_u *errmsg) + { +- char_u *efmp = *pefmp; +- + if (vim_strchr((char_u *)"+-", *efmp) != NULL) +! fmt_ptr->flags = *efmp++; + if (vim_strchr((char_u *)"DXAEWICZGOPQ", *efmp) != NULL) +! fmt_ptr->prefix = *efmp; + else + { + sprintf((char *)errmsg, + _("E376: Invalid %%%c in format string prefix"), *efmp); + EMSG(errmsg); +! return FAIL; + } + +! *pefmp = efmp; +! +! return OK; + } + + /* +! * Converts a 'errorformat' string to regular expression pattern + */ + static int + efm_to_regpat( +--- 328,362 ---- + + *pefmp = efmp; + +! return regpat; + } + + /* + * Analyze/parse an errorformat prefix. + */ +! static char_u * +! efm_analyze_prefix(char_u *efmp, efm_T *efminfo, char_u *errmsg) + { + if (vim_strchr((char_u *)"+-", *efmp) != NULL) +! efminfo->flags = *efmp++; + if (vim_strchr((char_u *)"DXAEWICZGOPQ", *efmp) != NULL) +! efminfo->prefix = *efmp; + else + { + sprintf((char *)errmsg, + _("E376: Invalid %%%c in format string prefix"), *efmp); + EMSG(errmsg); +! return NULL; + } + +! return efmp; + } + + /* +! * Converts a 'errorformat' string part in 'efm' to a regular expression +! * pattern. The resulting regex pattern is returned in "regpat". Additional +! * information about the 'erroformat' pattern is returned in "fmt_ptr". +! * Returns OK or FAIL. + */ + static int + efm_to_regpat( +*************** +*** 370,376 **** + int idx = 0; + + /* +! * Build regexp pattern from current 'errorformat' option + */ + ptr = regpat; + *ptr++ = '^'; +--- 372,378 ---- + int idx = 0; + + /* +! * Build a regexp pattern for a 'errorformat' option part + */ + ptr = regpat; + *ptr++ = '^'; +*************** +*** 385,401 **** + break; + if (idx < FMT_PATTERNS) + { +! ptr = fmtpat_to_regpat(efmp, fmt_ptr, idx, round, ptr, + errmsg); + if (ptr == NULL) +! return -1; + round++; + } + else if (*efmp == '*') + { +! ptr = scanf_fmt_to_regpat(efm, len, &efmp, ptr, errmsg); + if (ptr == NULL) +! return -1; + } + else if (vim_strchr((char_u *)"%\\.^$~[", *efmp) != NULL) + *ptr++ = *efmp; /* regexp magic characters */ +--- 387,404 ---- + break; + if (idx < FMT_PATTERNS) + { +! ptr = efmpat_to_regpat(efmp, ptr, fmt_ptr, idx, round, + errmsg); + if (ptr == NULL) +! return FAIL; + round++; + } + else if (*efmp == '*') + { +! ++efmp; +! ptr = scanf_fmt_to_regpat(&efmp, efm, len, ptr, errmsg); + if (ptr == NULL) +! return FAIL; + } + else if (vim_strchr((char_u *)"%\\.^$~[", *efmp) != NULL) + *ptr++ = *efmp; /* regexp magic characters */ +*************** +*** 405,419 **** + fmt_ptr->conthere = TRUE; + else if (efmp == efm + 1) /* analyse prefix */ + { +! if (efm_analyze_prefix(&efmp, fmt_ptr, errmsg) == FAIL) +! return -1; + } + else + { + sprintf((char *)errmsg, + _("E377: Invalid %%%c in format string"), *efmp); + EMSG(errmsg); +! return -1; + } + } + else /* copy normal character */ +--- 408,427 ---- + fmt_ptr->conthere = TRUE; + else if (efmp == efm + 1) /* analyse prefix */ + { +! /* +! * prefix is allowed only at the beginning of the errorformat +! * option part +! */ +! efmp = efm_analyze_prefix(efmp, fmt_ptr, errmsg); +! if (efmp == NULL) +! return FAIL; + } + else + { + sprintf((char *)errmsg, + _("E377: Invalid %%%c in format string"), *efmp); + EMSG(errmsg); +! return FAIL; + } + } + else /* copy normal character */ +*************** +*** 429,437 **** + *ptr++ = '$'; + *ptr = NUL; + +! return 0; + } + + static void + free_efm_list(efm_T **efm_first) + { +--- 437,448 ---- + *ptr++ = '$'; + *ptr = NUL; + +! return OK; + } + ++ /* ++ * Free the 'errorformat' information list ++ */ + static void + free_efm_list(efm_T **efm_first) + { +*************** +*** 446,452 **** + fmt_start = NULL; + } + +! /* Parse 'errorformat' option */ + static efm_T * + parse_efm_option(char_u *efm) + { +--- 457,504 ---- + fmt_start = NULL; + } + +! /* +! * Compute the size of the buffer used to convert a 'errorformat' pattern into +! * a regular expression pattern. +! */ +! static int +! efm_regpat_bufsz(char_u *efm) +! { +! int sz; +! int i; +! +! sz = (FMT_PATTERNS * 3) + ((int)STRLEN(efm) << 2); +! for (i = FMT_PATTERNS; i > 0; ) +! sz += (int)STRLEN(fmt_pat[--i].pattern); +! #ifdef BACKSLASH_IN_FILENAME +! sz += 12; /* "%f" can become twelve chars longer (see efm_to_regpat) */ +! #else +! sz += 2; /* "%f" can become two chars longer */ +! #endif +! +! return sz; +! } +! +! /* +! * Return the length of a 'errorformat' option part (separated by ","). +! */ +! static int +! efm_option_part_len(char_u *efm) +! { +! int len; +! +! for (len = 0; efm[len] != NUL && efm[len] != ','; ++len) +! if (efm[len] == '\\' && efm[len + 1] != NUL) +! ++len; +! +! return len; +! } +! +! /* +! * Parse the 'errorformat' option. Multiple parts in the 'errorformat' option +! * are parsed and converted to regular expressions. Returns information about +! * the parsed 'errorformat' option. +! */ + static efm_T * + parse_efm_option(char_u *efm) + { +*************** +*** 457,464 **** + efm_T *fmt_last = NULL; + char_u *fmtstr = NULL; + int len; +! int i; +! int round; + + errmsglen = CMDBUFFSIZE + 1; + errmsg = alloc_id(errmsglen, aid_qf_errmsg); +--- 509,515 ---- + efm_T *fmt_last = NULL; + char_u *fmtstr = NULL; + int len; +! int sz; + + errmsglen = CMDBUFFSIZE + 1; + errmsg = alloc_id(errmsglen, aid_qf_errmsg); +*************** +*** 473,487 **** + /* + * Get some space to modify the format string into. + */ +! i = (FMT_PATTERNS * 3) + ((int)STRLEN(efm) << 2); +! for (round = FMT_PATTERNS; round > 0; ) +! i += (int)STRLEN(fmt_pat[--round].pattern); +! #ifdef BACKSLASH_IN_FILENAME +! i += 12; /* "%f" can become twelve chars longer (see efm_to_regpat) */ +! #else +! i += 2; /* "%f" can become two chars longer */ +! #endif +! if ((fmtstr = alloc(i)) == NULL) + goto parse_efm_error; + + while (efm[0] != NUL) +--- 524,531 ---- + /* + * Get some space to modify the format string into. + */ +! sz = efm_regpat_bufsz(efm); +! if ((fmtstr = alloc(sz)) == NULL) + goto parse_efm_error; + + while (efm[0] != NUL) +*************** +*** 501,511 **** + /* + * Isolate one part in the 'errorformat' option + */ +! for (len = 0; efm[len] != NUL && efm[len] != ','; ++len) +! if (efm[len] == '\\' && efm[len + 1] != NUL) +! ++len; + +! if (efm_to_regpat(efm, len, fmt_ptr, fmtstr, errmsg) == -1) + goto parse_efm_error; + if ((fmt_ptr->prog = vim_regcomp(fmtstr, RE_MAGIC + RE_STRING)) == NULL) + goto parse_efm_error; +--- 545,553 ---- + /* + * Isolate one part in the 'errorformat' option + */ +! len = efm_option_part_len(efm); + +! if (efm_to_regpat(efm, len, fmt_ptr, fmtstr, errmsg) == FAIL) + goto parse_efm_error; + if ((fmt_ptr->prog = vim_regcomp(fmtstr, RE_MAGIC + RE_STRING)) == NULL) + goto parse_efm_error; +*************** +*** 539,544 **** +--- 581,590 ---- + QF_MULTISCAN = 5, + }; + ++ /* ++ * State information used to parse lines and add entries to a quickfix/location ++ * list. ++ */ + typedef struct { + char_u *linebuf; + int linelen; +*************** +*** 554,559 **** +--- 600,608 ---- + vimconv_T vc; + } qfstate_T; + ++ /* ++ * Allocate more memory for the line buffer used for parsing lines. ++ */ + static char_u * + qf_grow_linebuf(qfstate_T *state, int newsz) + { +*************** +*** 861,870 **** + } qffields_T; + + /* +! * Parse the error format matches in 'regmatch' and set the values in 'fields'. +! * fmt_ptr contains the 'efm' format specifiers/prefixes that have a match. +! * Returns QF_OK if all the matches are successfully parsed. On failure, +! * returns QF_FAIL or QF_NOMEM. + */ + static int + qf_parse_match( +--- 910,1160 ---- + } qffields_T; + + /* +! * Parse the match for filename ('%f') pattern in regmatch. +! * Return the matched value in "fields->namebuf". +! */ +! static int +! qf_parse_fmt_f(regmatch_T *rmp, int midx, qffields_T *fields, int prefix) +! { +! int c; +! +! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL) +! return QF_FAIL; +! +! /* Expand ~/file and $HOME/file to full path. */ +! c = *rmp->endp[midx]; +! *rmp->endp[midx] = NUL; +! expand_env(rmp->startp[midx], fields->namebuf, CMDBUFFSIZE); +! *rmp->endp[midx] = c; +! +! /* +! * For separate filename patterns (%O, %P and %Q), the specified file +! * should exist. +! */ +! if (vim_strchr((char_u *)"OPQ", prefix) != NULL +! && mch_getperm(fields->namebuf) == -1) +! return QF_FAIL; +! +! return QF_OK; +! } +! +! /* +! * Parse the match for error number ('%n') pattern in regmatch. +! * Return the matched value in "fields->enr". +! */ +! static int +! qf_parse_fmt_n(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! if (rmp->startp[midx] == NULL) +! return QF_FAIL; +! fields->enr = (int)atol((char *)rmp->startp[midx]); +! return QF_OK; +! } +! +! /* +! * Parse the match for line number (%l') pattern in regmatch. +! * Return the matched value in "fields->lnum". +! */ +! static int +! qf_parse_fmt_l(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! if (rmp->startp[midx] == NULL) +! return QF_FAIL; +! fields->lnum = atol((char *)rmp->startp[midx]); +! return QF_OK; +! } +! +! /* +! * Parse the match for column number ('%c') pattern in regmatch. +! * Return the matched value in "fields->col". +! */ +! static int +! qf_parse_fmt_c(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! if (rmp->startp[midx] == NULL) +! return QF_FAIL; +! fields->col = (int)atol((char *)rmp->startp[midx]); +! return QF_OK; +! } +! +! /* +! * Parse the match for error type ('%t') pattern in regmatch. +! * Return the matched value in "fields->type". +! */ +! static int +! qf_parse_fmt_t(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! if (rmp->startp[midx] == NULL) +! return QF_FAIL; +! fields->type = *rmp->startp[midx]; +! return QF_OK; +! } +! +! /* +! * Parse the match for '%+' format pattern. The whole matching line is included +! * in the error string. Return the matched line in "fields->errmsg". +! */ +! static int +! qf_parse_fmt_plus(char_u *linebuf, int linelen, qffields_T *fields) +! { +! char_u *p; +! +! if (linelen >= fields->errmsglen) +! { +! /* linelen + null terminator */ +! if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL) +! return QF_NOMEM; +! fields->errmsg = p; +! fields->errmsglen = linelen + 1; +! } +! vim_strncpy(fields->errmsg, linebuf, linelen); +! return QF_OK; +! } +! +! /* +! * Parse the match for error message ('%m') pattern in regmatch. +! * Return the matched value in "fields->errmsg". +! */ +! static int +! qf_parse_fmt_m(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! char_u *p; +! int len; +! +! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL) +! return QF_FAIL; +! len = (int)(rmp->endp[midx] - rmp->startp[midx]); +! if (len >= fields->errmsglen) +! { +! /* len + null terminator */ +! if ((p = vim_realloc(fields->errmsg, len + 1)) == NULL) +! return QF_NOMEM; +! fields->errmsg = p; +! fields->errmsglen = len + 1; +! } +! vim_strncpy(fields->errmsg, rmp->startp[midx], len); +! return QF_OK; +! } +! +! /* +! * Parse the match for rest of a single-line file message ('%r') pattern. +! * Return the matched value in "tail". +! */ +! static int +! qf_parse_fmt_r(regmatch_T *rmp, int midx, char_u **tail) +! { +! if (rmp->startp[midx] == NULL) +! return QF_FAIL; +! *tail = rmp->startp[midx]; +! return QF_OK; +! } +! +! /* +! * Parse the match for the pointer line ('%p') pattern in regmatch. +! * Return the matched value in "fields->col". +! */ +! static int +! qf_parse_fmt_p(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! char_u *match_ptr; +! +! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL) +! return QF_FAIL; +! fields->col = 0; +! for (match_ptr = rmp->startp[midx]; match_ptr != rmp->endp[midx]; +! ++match_ptr) +! { +! ++fields->col; +! if (*match_ptr == TAB) +! { +! fields->col += 7; +! fields->col -= fields->col % 8; +! } +! } +! ++fields->col; +! fields->use_viscol = TRUE; +! return QF_OK; +! } +! +! /* +! * Parse the match for the virtual column number ('%v') pattern in regmatch. +! * Return the matched value in "fields->col". +! */ +! static int +! qf_parse_fmt_v(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! if (rmp->startp[midx] == NULL) +! return QF_FAIL; +! fields->col = (int)atol((char *)rmp->startp[midx]); +! fields->use_viscol = TRUE; +! return QF_OK; +! } +! +! /* +! * Parse the match for the search text ('%s') pattern in regmatch. +! * Return the matched value in "fields->pattern". +! */ +! static int +! qf_parse_fmt_s(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! int len; +! +! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL) +! return QF_FAIL; +! len = (int)(rmp->endp[midx] - rmp->startp[midx]); +! if (len > CMDBUFFSIZE - 5) +! len = CMDBUFFSIZE - 5; +! STRCPY(fields->pattern, "^\\V"); +! STRNCAT(fields->pattern, rmp->startp[midx], len); +! fields->pattern[len + 3] = '\\'; +! fields->pattern[len + 4] = '$'; +! fields->pattern[len + 5] = NUL; +! return QF_OK; +! } +! +! /* +! * Parse the match for the module ('%o') pattern in regmatch. +! * Return the matched value in "fields->module". +! */ +! static int +! qf_parse_fmt_o(regmatch_T *rmp, int midx, qffields_T *fields) +! { +! int len; +! +! if (rmp->startp[midx] == NULL || rmp->endp[midx] == NULL) +! return QF_FAIL; +! len = (int)(rmp->endp[midx] - rmp->startp[midx]); +! if (len > CMDBUFFSIZE) +! len = CMDBUFFSIZE; +! STRNCAT(fields->module, rmp->startp[midx], len); +! return QF_OK; +! } +! +! /* +! * 'errorformat' format pattern parser functions. +! * The '%f' and '%r' formats are parsed differently from other formats. +! * See qf_parse_match() for details. +! */ +! static int (*qf_parse_fmt[FMT_PATTERNS])(regmatch_T *, int, qffields_T *) = +! { +! NULL, +! qf_parse_fmt_n, +! qf_parse_fmt_l, +! qf_parse_fmt_c, +! qf_parse_fmt_t, +! qf_parse_fmt_m, +! NULL, +! qf_parse_fmt_p, +! qf_parse_fmt_v, +! qf_parse_fmt_s, +! qf_parse_fmt_o +! }; +! +! /* +! * Parse the error format pattern matches in "regmatch" and set the values in +! * "fields". fmt_ptr contains the 'efm' format specifiers/prefixes that have a +! * match. Returns QF_OK if all the matches are successfully parsed. On +! * failure, returns QF_FAIL or QF_NOMEM. + */ + static int + qf_parse_match( +*************** +*** 877,886 **** + int qf_multiscan, + char_u **tail) + { +- char_u *p; + int idx = fmt_ptr->prefix; + int i; +! int len; + + if ((idx == 'C' || idx == 'Z') && !qf_multiline) + return QF_FAIL; +--- 1167,1176 ---- + int qf_multiscan, + char_u **tail) + { + int idx = fmt_ptr->prefix; + int i; +! int midx; +! int status; + + if ((idx == 'C' || idx == 'Z') && !qf_multiline) + return QF_FAIL; +*************** +*** 893,1020 **** + * We check for an actual submatch, because "\[" and "\]" in + * the 'errorformat' may cause the wrong submatch to be used. + */ +! if ((i = (int)fmt_ptr->addr[0]) > 0) /* %f */ + { +! int c; + +! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL) +! return QF_FAIL; +! +! /* Expand ~/file and $HOME/file to full path. */ +! c = *regmatch->endp[i]; +! *regmatch->endp[i] = NUL; +! expand_env(regmatch->startp[i], fields->namebuf, CMDBUFFSIZE); +! *regmatch->endp[i] = c; +! +! if (vim_strchr((char_u *)"OPQ", idx) != NULL +! && mch_getperm(fields->namebuf) == -1) +! return QF_FAIL; +! } +! if ((i = (int)fmt_ptr->addr[1]) > 0) /* %n */ +! { +! if (regmatch->startp[i] == NULL) +! return QF_FAIL; +! fields->enr = (int)atol((char *)regmatch->startp[i]); +! } +! if ((i = (int)fmt_ptr->addr[2]) > 0) /* %l */ +! { +! if (regmatch->startp[i] == NULL) +! return QF_FAIL; +! fields->lnum = atol((char *)regmatch->startp[i]); +! } +! if ((i = (int)fmt_ptr->addr[3]) > 0) /* %c */ +! { +! if (regmatch->startp[i] == NULL) +! return QF_FAIL; +! fields->col = (int)atol((char *)regmatch->startp[i]); +! } +! if ((i = (int)fmt_ptr->addr[4]) > 0) /* %t */ +! { +! if (regmatch->startp[i] == NULL) +! return QF_FAIL; +! fields->type = *regmatch->startp[i]; +! } +! if (fmt_ptr->flags == '+' && !qf_multiscan) /* %+ */ +! { +! if (linelen >= fields->errmsglen) +! { +! /* linelen + null terminator */ +! if ((p = vim_realloc(fields->errmsg, linelen + 1)) == NULL) +! return QF_NOMEM; +! fields->errmsg = p; +! fields->errmsglen = linelen + 1; +! } +! vim_strncpy(fields->errmsg, linebuf, linelen); +! } +! else if ((i = (int)fmt_ptr->addr[5]) > 0) /* %m */ +! { +! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL) +! return QF_FAIL; +! len = (int)(regmatch->endp[i] - regmatch->startp[i]); +! if (len >= fields->errmsglen) +! { +! /* len + null terminator */ +! if ((p = vim_realloc(fields->errmsg, len + 1)) == NULL) +! return QF_NOMEM; +! fields->errmsg = p; +! fields->errmsglen = len + 1; +! } +! vim_strncpy(fields->errmsg, regmatch->startp[i], len); +! } +! if ((i = (int)fmt_ptr->addr[6]) > 0) /* %r */ +! { +! if (regmatch->startp[i] == NULL) +! return QF_FAIL; +! *tail = regmatch->startp[i]; +! } +! if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */ +! { +! char_u *match_ptr; +! +! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL) +! return QF_FAIL; +! fields->col = 0; +! for (match_ptr = regmatch->startp[i]; +! match_ptr != regmatch->endp[i]; ++match_ptr) +! { +! ++fields->col; +! if (*match_ptr == TAB) +! { +! fields->col += 7; +! fields->col -= fields->col % 8; +! } +! } +! ++fields->col; +! fields->use_viscol = TRUE; +! } +! if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */ +! { +! if (regmatch->startp[i] == NULL) +! return QF_FAIL; +! fields->col = (int)atol((char *)regmatch->startp[i]); +! fields->use_viscol = TRUE; +! } +! if ((i = (int)fmt_ptr->addr[9]) > 0) /* %s */ +! { +! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL) +! return QF_FAIL; +! len = (int)(regmatch->endp[i] - regmatch->startp[i]); +! if (len > CMDBUFFSIZE - 5) +! len = CMDBUFFSIZE - 5; +! STRCPY(fields->pattern, "^\\V"); +! STRNCAT(fields->pattern, regmatch->startp[i], len); +! fields->pattern[len + 3] = '\\'; +! fields->pattern[len + 4] = '$'; +! fields->pattern[len + 5] = NUL; +! } +! if ((i = (int)fmt_ptr->addr[10]) > 0) /* %o */ +! { +! if (regmatch->startp[i] == NULL || regmatch->endp[i] == NULL) +! return QF_FAIL; +! len = (int)(regmatch->endp[i] - regmatch->startp[i]); +! if (len > CMDBUFFSIZE) +! len = CMDBUFFSIZE; +! STRNCAT(fields->module, regmatch->startp[i], len); + } + + return QF_OK; +--- 1183,1208 ---- + * We check for an actual submatch, because "\[" and "\]" in + * the 'errorformat' may cause the wrong submatch to be used. + */ +! for (i = 0; i < FMT_PATTERNS; i++) + { +! status = QF_OK; +! midx = (int)fmt_ptr->addr[i]; +! if (i == 0 && midx > 0) /* %f */ +! status = qf_parse_fmt_f(regmatch, midx, fields, idx); +! else if (i == 5) +! { +! if (fmt_ptr->flags == '+' && !qf_multiscan) /* %+ */ +! status = qf_parse_fmt_plus(linebuf, linelen, fields); +! else if (midx > 0) /* %m */ +! status = qf_parse_fmt_m(regmatch, midx, fields); +! } +! else if (i == 6 && midx > 0) /* %r */ +! status = qf_parse_fmt_r(regmatch, midx, tail); +! else if (midx > 0) /* others */ +! status = (qf_parse_fmt[i])(regmatch, midx, fields); + +! if (status != QF_OK) +! return status; + } + + return QF_OK; +*************** +*** 1308,1313 **** +--- 1496,1513 ---- + } + + /* ++ * Returns TRUE if the specified quickfix/location list is empty. ++ */ ++ static int ++ qf_list_empty(qf_info_T *qi, int qf_idx) ++ { ++ if (qi == NULL || qf_idx < 0 || qf_idx >= LISTCOUNT) ++ return TRUE; ++ return qi->qf_lists[qf_idx].qf_count <= 0; ++ } ++ ++ ++ /* + * Allocate the fields used for parsing lines and populating a quickfix list. + */ + static int +*************** +*** 1450,1456 **** + { + /* Adding to existing list, use last entry. */ + adding = TRUE; +! if (qi->qf_lists[qf_idx].qf_count > 0) + old_last = qi->qf_lists[qf_idx].qf_last; + } + +--- 1650,1656 ---- + { + /* Adding to existing list, use last entry. */ + adding = TRUE; +! if (!qf_list_empty(qi, qf_idx)) + old_last = qi->qf_lists[qf_idx].qf_last; + } + +*************** +*** 1777,1784 **** + qfp->qf_valid = valid; + + lastp = &qi->qf_lists[qf_idx].qf_last; +! if (qi->qf_lists[qf_idx].qf_count == 0) +! /* first element in the list */ + { + qi->qf_lists[qf_idx].qf_start = qfp; + qi->qf_lists[qf_idx].qf_ptr = qfp; +--- 1977,1983 ---- + qfp->qf_valid = valid; + + lastp = &qi->qf_lists[qf_idx].qf_last; +! if (qf_list_empty(qi, qf_idx)) /* first element in the list */ + { + qi->qf_lists[qf_idx].qf_start = qfp; + qi->qf_lists[qf_idx].qf_ptr = qfp; +*************** +*** 1875,1881 **** + to->w_llist->qf_listcount = qi->qf_listcount; + + /* Copy the location lists one at a time */ +! for (idx = 0; idx < qi->qf_listcount; idx++) + { + qf_list_T *from_qfl; + qf_list_T *to_qfl; +--- 2074,2080 ---- + to->w_llist->qf_listcount = qi->qf_listcount; + + /* Copy the location lists one at a time */ +! for (idx = 0; idx < qi->qf_listcount; ++idx) + { + qf_list_T *from_qfl; + qf_list_T *to_qfl; +*************** +*** 2907,2913 **** + qi = &ql_info; + + if (qi->qf_curlist >= qi->qf_listcount +! || qi->qf_lists[qi->qf_curlist].qf_count == 0) + { + EMSG(_(e_quickfix)); + return; +--- 3106,3112 ---- + qi = &ql_info; + + if (qi->qf_curlist >= qi->qf_listcount +! || qf_list_empty(qi, qi->qf_curlist)) + { + EMSG(_(e_quickfix)); + return; +*************** +*** 3033,3056 **** + } + + /* + * ":clist": list all errors + * ":llist": list all locations + */ + void + qf_list(exarg_T *eap) + { +- buf_T *buf; +- char_u *fname; + qfline_T *qfp; + int i; + int idx1 = 1; + int idx2 = -1; + char_u *arg = eap->arg; + int plus = FALSE; +- int qfFileAttr; +- int qfSepAttr; +- int qfLineAttr; +- int filter_entry; + int all = eap->forceit; /* if not :cl!, only show + recognised errors */ + qf_info_T *qi = &ql_info; +--- 3232,3336 ---- + } + + /* ++ * Highlight attributes used for displaying entries from the quickfix list. ++ */ ++ static int qfFileAttr; ++ static int qfSepAttr; ++ static int qfLineAttr; ++ ++ /* ++ * Display information about a single entry from the quickfix/location list. ++ * Used by ":clist/:llist" commands. ++ */ ++ static void ++ qf_list_entry(qf_info_T *qi, qfline_T *qfp, int qf_idx) ++ { ++ char_u *fname; ++ buf_T *buf; ++ int filter_entry; ++ ++ fname = NULL; ++ if (qfp->qf_module != NULL && *qfp->qf_module != NUL) ++ vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", qf_idx, ++ (char *)qfp->qf_module); ++ else { ++ if (qfp->qf_fnum != 0 ++ && (buf = buflist_findnr(qfp->qf_fnum)) != NULL) ++ { ++ fname = buf->b_fname; ++ if (qfp->qf_type == 1) /* :helpgrep */ ++ fname = gettail(fname); ++ } ++ if (fname == NULL) ++ sprintf((char *)IObuff, "%2d", qf_idx); ++ else ++ vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", ++ qf_idx, (char *)fname); ++ } ++ ++ // Support for filtering entries using :filter /pat/ clist ++ // Match against the module name, file name, search pattern and ++ // text of the entry. ++ filter_entry = TRUE; ++ if (qfp->qf_module != NULL && *qfp->qf_module != NUL) ++ filter_entry &= message_filtered(qfp->qf_module); ++ if (filter_entry && fname != NULL) ++ filter_entry &= message_filtered(fname); ++ if (filter_entry && qfp->qf_pattern != NULL) ++ filter_entry &= message_filtered(qfp->qf_pattern); ++ if (filter_entry) ++ filter_entry &= message_filtered(qfp->qf_text); ++ if (filter_entry) ++ return; ++ ++ msg_putchar('\n'); ++ msg_outtrans_attr(IObuff, qf_idx == qi->qf_lists[qi->qf_curlist].qf_index ++ ? HL_ATTR(HLF_QFL) : qfFileAttr); ++ ++ if (qfp->qf_lnum != 0) ++ msg_puts_attr((char_u *)":", qfSepAttr); ++ if (qfp->qf_lnum == 0) ++ IObuff[0] = NUL; ++ else if (qfp->qf_col == 0) ++ sprintf((char *)IObuff, "%ld", qfp->qf_lnum); ++ else ++ sprintf((char *)IObuff, "%ld col %d", ++ qfp->qf_lnum, qfp->qf_col); ++ sprintf((char *)IObuff + STRLEN(IObuff), "%s", ++ (char *)qf_types(qfp->qf_type, qfp->qf_nr)); ++ msg_puts_attr(IObuff, qfLineAttr); ++ msg_puts_attr((char_u *)":", qfSepAttr); ++ if (qfp->qf_pattern != NULL) ++ { ++ qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE); ++ msg_puts(IObuff); ++ msg_puts_attr((char_u *)":", qfSepAttr); ++ } ++ msg_puts((char_u *)" "); ++ ++ /* Remove newlines and leading whitespace from the text. For an ++ * unrecognized line keep the indent, the compiler may mark a word ++ * with ^^^^. */ ++ qf_fmt_text((fname != NULL || qfp->qf_lnum != 0) ++ ? skipwhite(qfp->qf_text) : qfp->qf_text, ++ IObuff, IOSIZE); ++ msg_prt_line(IObuff, FALSE); ++ out_flush(); /* show one line at a time */ ++ } ++ ++ /* + * ":clist": list all errors + * ":llist": list all locations + */ + void + qf_list(exarg_T *eap) + { + qfline_T *qfp; + int i; + int idx1 = 1; + int idx2 = -1; + char_u *arg = eap->arg; + int plus = FALSE; + int all = eap->forceit; /* if not :cl!, only show + recognised errors */ + qf_info_T *qi = &ql_info; +*************** +*** 3066,3072 **** + } + + if (qi->qf_curlist >= qi->qf_listcount +! || qi->qf_lists[qi->qf_curlist].qf_count == 0) + { + EMSG(_(e_quickfix)); + return; +--- 3346,3352 ---- + } + + if (qi->qf_curlist >= qi->qf_listcount +! || qf_list_empty(qi, qi->qf_curlist)) + { + EMSG(_(e_quickfix)); + return; +*************** +*** 3123,3197 **** + if (got_int) + break; + +! fname = NULL; +! if (qfp->qf_module != NULL && *qfp->qf_module != NUL) +! vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", i, (char *)qfp->qf_module); +! else { +! if (qfp->qf_fnum != 0 +! && (buf = buflist_findnr(qfp->qf_fnum)) != NULL) +! { +! fname = buf->b_fname; +! if (qfp->qf_type == 1) /* :helpgrep */ +! fname = gettail(fname); +! } +! if (fname == NULL) +! sprintf((char *)IObuff, "%2d", i); +! else +! vim_snprintf((char *)IObuff, IOSIZE, "%2d %s", +! i, (char *)fname); +! } +! +! // Support for filtering entries using :filter /pat/ clist +! // Match against the module name, file name, search pattern and +! // text of the entry. +! filter_entry = TRUE; +! if (qfp->qf_module != NULL && *qfp->qf_module != NUL) +! filter_entry &= message_filtered(qfp->qf_module); +! if (filter_entry && fname != NULL) +! filter_entry &= message_filtered(fname); +! if (filter_entry && qfp->qf_pattern != NULL) +! filter_entry &= message_filtered(qfp->qf_pattern); +! if (filter_entry) +! filter_entry &= message_filtered(qfp->qf_text); +! if (filter_entry) +! goto next_entry; +! +! msg_putchar('\n'); +! msg_outtrans_attr(IObuff, i == qi->qf_lists[qi->qf_curlist].qf_index +! ? HL_ATTR(HLF_QFL) : qfFileAttr); +! +! if (qfp->qf_lnum != 0) +! msg_puts_attr((char_u *)":", qfSepAttr); +! if (qfp->qf_lnum == 0) +! IObuff[0] = NUL; +! else if (qfp->qf_col == 0) +! sprintf((char *)IObuff, "%ld", qfp->qf_lnum); +! else +! sprintf((char *)IObuff, "%ld col %d", +! qfp->qf_lnum, qfp->qf_col); +! sprintf((char *)IObuff + STRLEN(IObuff), "%s", +! (char *)qf_types(qfp->qf_type, qfp->qf_nr)); +! msg_puts_attr(IObuff, qfLineAttr); +! msg_puts_attr((char_u *)":", qfSepAttr); +! if (qfp->qf_pattern != NULL) +! { +! qf_fmt_text(qfp->qf_pattern, IObuff, IOSIZE); +! msg_puts(IObuff); +! msg_puts_attr((char_u *)":", qfSepAttr); +! } +! msg_puts((char_u *)" "); +! +! /* Remove newlines and leading whitespace from the text. For an +! * unrecognized line keep the indent, the compiler may mark a word +! * with ^^^^. */ +! qf_fmt_text((fname != NULL || qfp->qf_lnum != 0) +! ? skipwhite(qfp->qf_text) : qfp->qf_text, +! IObuff, IOSIZE); +! msg_prt_line(IObuff, FALSE); +! out_flush(); /* show one line at a time */ + } + +- next_entry: + qfp = qfp->qf_next; + if (qfp == NULL) + break; +--- 3403,3411 ---- + if (got_int) + break; + +! qf_list_entry(qi, qfp, i); + } + + qfp = qfp->qf_next; + if (qfp == NULL) + break; +*************** +*** 3320,3326 **** + if (eap->cmdidx == CMD_lhistory) + qi = GET_LOC_LIST(curwin); + if (qi == NULL || (qi->qf_listcount == 0 +! && qi->qf_lists[qi->qf_curlist].qf_count == 0)) + MSG(_("No entries")); + else + for (i = 0; i < qi->qf_listcount; ++i) +--- 3534,3540 ---- + if (eap->cmdidx == CMD_lhistory) + qi = GET_LOC_LIST(curwin); + if (qi == NULL || (qi->qf_listcount == 0 +! && qf_list_empty(qi, qi->qf_curlist))) + MSG(_("No entries")); + else + for (i = 0; i < qi->qf_listcount; ++i) +*************** +*** 3421,3427 **** + } + + for (idx = 0; idx < qi->qf_listcount; ++idx) +! if (qi->qf_lists[idx].qf_count) + for (i = 0, qfp = qi->qf_lists[idx].qf_start; + i < qi->qf_lists[idx].qf_count && qfp != NULL; + ++i, qfp = qfp->qf_next) +--- 3635,3641 ---- + } + + for (idx = 0; idx < qi->qf_listcount; ++idx) +! if (!qf_list_empty(qi, idx)) + for (i = 0, qfp = qi->qf_lists[idx].qf_start; + i < qi->qf_lists[idx].qf_count && qfp != NULL; + ++i, qfp = qfp->qf_next) +*************** +*** 3552,3558 **** + * it if we have errors; otherwise, leave it closed. + */ + if (qi->qf_lists[qi->qf_curlist].qf_nonevalid +! || qi->qf_lists[qi->qf_curlist].qf_count == 0 + || qi->qf_curlist >= qi->qf_listcount) + { + if (win != NULL) +--- 3766,3772 ---- + * it if we have errors; otherwise, leave it closed. + */ + if (qi->qf_lists[qi->qf_curlist].qf_nonevalid +! || qf_list_empty(qi, qi->qf_curlist) + || qi->qf_curlist >= qi->qf_listcount) + { + if (win != NULL) +*************** +*** 5154,5160 **** + qi->qf_curlist = qf_id2nr(qi, save_qfid); + + /* Jump to first match. */ +! if (qi->qf_lists[qi->qf_curlist].qf_count > 0) + { + if ((flags & VGR_NOJUMP) == 0) + vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy, +--- 5368,5374 ---- + qi->qf_curlist = qf_id2nr(qi, save_qfid); + + /* Jump to first match. */ +! if (!qf_list_empty(qi, qi->qf_curlist)) + { + if ((flags & VGR_NOJUMP) == 0) + vgr_jump_to_match(qi, eap->forceit, &redraw_for_dummy, +*************** +*** 5387,5394 **** + if (qf_idx == INVALID_QFIDX) + qf_idx = qi->qf_curlist; + +! if (qf_idx >= qi->qf_listcount +! || qi->qf_lists[qf_idx].qf_count == 0) + return FAIL; + + qfp = qi->qf_lists[qf_idx].qf_start; +--- 5601,5607 ---- + if (qf_idx == INVALID_QFIDX) + qf_idx = qi->qf_curlist; + +! if (qf_idx >= qi->qf_listcount || qf_list_empty(qi, qf_idx)) + return FAIL; + + qfp = qi->qf_lists[qf_idx].qf_start; +*************** +*** 5709,5715 **** + qf_getprop_idx(qf_info_T *qi, int qf_idx, dict_T *retdict) + { + int idx = qi->qf_lists[qf_idx].qf_index; +! if (qi->qf_lists[qf_idx].qf_count == 0) + /* For empty lists, qf_index is set to 1 */ + idx = 0; + return dict_add_number(retdict, "idx", idx); +--- 5922,5928 ---- + qf_getprop_idx(qf_info_T *qi, int qf_idx, dict_T *retdict) + { + int idx = qi->qf_lists[qf_idx].qf_index; +! if (qf_list_empty(qi, qf_idx)) + /* For empty lists, qf_index is set to 1 */ + idx = 0; + return dict_add_number(retdict, "idx", idx); +*************** +*** 5798,5804 **** + qf_new_list(qi, title); + qf_idx = qi->qf_curlist; + } +! else if (action == 'a' && qi->qf_lists[qf_idx].qf_count > 0) + /* Adding to existing list, use last entry. */ + old_last = qi->qf_lists[qf_idx].qf_last; + else if (action == 'r') +--- 6011,6017 ---- + qf_new_list(qi, title); + qf_idx = qi->qf_curlist; + } +! else if (action == 'a' && !qf_list_empty(qi, qf_idx)) + /* Adding to existing list, use last entry. */ + old_last = qi->qf_lists[qf_idx].qf_last; + else if (action == 'r') +*************** +*** 5887,5893 **** + { + qi->qf_lists[qf_idx].qf_ptr = + qi->qf_lists[qf_idx].qf_start; +! if (qi->qf_lists[qf_idx].qf_count > 0) + qi->qf_lists[qf_idx].qf_index = 1; + } + +--- 6100,6106 ---- + { + qi->qf_lists[qf_idx].qf_ptr = + qi->qf_lists[qf_idx].qf_start; +! if (!qf_list_empty(qi, qf_idx)) + qi->qf_lists[qf_idx].qf_index = 1; + } + +*************** +*** 6746,6752 **** + } + + /* Jump to first match. */ +! if (qi->qf_lists[qi->qf_curlist].qf_count > 0) + qf_jump(qi, 0, 0, FALSE); + else + EMSG2(_(e_nomatch2), eap->arg); +--- 6959,6965 ---- + } + + /* Jump to first match. */ +! if (!qf_list_empty(qi, qi->qf_curlist)) + qf_jump(qi, 0, 0, FALSE); + else + EMSG2(_(e_nomatch2), eap->arg); +*** ../vim-8.1.0251/src/version.c 2018-08-07 21:39:09.251060096 +0200 +--- src/version.c 2018-08-07 21:43:08.981711510 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 252, + /**/ + +-- +Q: How do you tell the difference between a female cat and a male cat? +A: You ask it a question and if HE answers, it's a male but, if SHE + answers, it's a female. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0253 b/data/vim/patches/8.1.0253 new file mode 100644 index 000000000..a77bf4f89 --- /dev/null +++ b/data/vim/patches/8.1.0253 @@ -0,0 +1,475 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0253 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0253 +Problem: Saving and restoring window title does not always work. +Solution: Use the stack push and pop commands. (Kouichi Iwamoto, + closes #3059) +Files: runtime/doc/term.txt, src/main.c, src/option.c, src/os_unix.c, + src/proto/term.pro, src/term.c, src/term.h, src/vim.h, + src/buffer.c, src/ex_docmd.c, src/os_amiga.c, + src/os_mswin.c, src/os_win32.c + +*** ../vim-8.1.0252/runtime/doc/term.txt 2018-05-17 13:42:03.000000000 +0200 +--- runtime/doc/term.txt 2018-08-07 22:02:48.947042241 +0200 +*************** +*** 342,347 **** +--- 352,361 ---- + t_SH set cursor shape *t_SH* *'t_SH'* + t_RC request terminal cursor blinking *t_RC* *'t_RC'* + t_RS request terminal cursor style *t_RS* *'t_RS'* ++ t_ST save window title to stack *t_ST* *'t_ST'* ++ t_RT restore window title from stack *t_RT* *'t_RT'* ++ t_Si save icon text to stack *t_Si* *'t_Si'* ++ t_Ri restore icon text from stack *t_Ri* *'t_Ri'* + + Some codes have a start, middle and end part. The start and end are defined + by the termcap option, the middle part is text. +*** ../vim-8.1.0252/src/main.c 2018-07-29 17:35:19.497750288 +0200 +--- src/main.c 2018-08-07 22:11:50.444370658 +0200 +*************** +*** 706,711 **** +--- 706,715 ---- + scroll_region_reset(); /* In case Rows changed */ + scroll_start(); /* may scroll the screen to the right position */ + ++ #ifdef FEAT_TITLE ++ term_push_title(SAVE_RESTORE_BOTH); ++ #endif ++ + /* + * Don't clear the screen when starting in Ex mode, unless using the GUI. + */ +*** ../vim-8.1.0252/src/option.c 2018-07-23 04:11:37.652969757 +0200 +--- src/option.c 2018-08-07 22:26:59.391401674 +0200 +*************** +*** 3192,3198 **** +--- 3192,3200 ---- + p_term("t_RB", T_RBG) + p_term("t_RC", T_CRC) + p_term("t_RI", T_CRI) ++ p_term("t_Ri", T_SRI) + p_term("t_RS", T_CRS) ++ p_term("t_RT", T_CRT) + p_term("t_RV", T_CRV) + p_term("t_Sb", T_CSB) + p_term("t_SC", T_CSC) +*************** +*** 3200,3208 **** +--- 3202,3212 ---- + p_term("t_Sf", T_CSF) + p_term("t_SH", T_CSH) + p_term("t_SI", T_CSI) ++ p_term("t_Si", T_SSI) + p_term("t_so", T_SO) + p_term("t_SR", T_CSR) + p_term("t_sr", T_SR) ++ p_term("t_ST", T_CST) + p_term("t_Te", T_STE) + p_term("t_te", T_TE) + p_term("t_ti", T_TI) +*************** +*** 10414,10420 **** + mch_setmouse(FALSE); /* switch mouse off */ + #endif + #ifdef FEAT_TITLE +! mch_restore_title(3); /* restore window titles */ + #endif + #if defined(FEAT_XCLIPBOARD) && defined(FEAT_GUI) + /* When starting the GUI close the display opened for the clipboard. +--- 10418,10424 ---- + mch_setmouse(FALSE); /* switch mouse off */ + #endif + #ifdef FEAT_TITLE +! mch_restore_title(SAVE_RESTORE_BOTH); /* restore window titles */ + #endif + #if defined(FEAT_XCLIPBOARD) && defined(FEAT_GUI) + /* When starting the GUI close the display opened for the clipboard. +*************** +*** 11219,11226 **** + buf->b_p_isk = NULL; + } + /* +! * Always free the allocated strings. +! * If not already initialized, set 'readonly' and copy 'fileformat'. + */ + if (!buf->b_p_initialized) + { +--- 11223,11230 ---- + buf->b_p_isk = NULL; + } + /* +! * Always free the allocated strings. If not already initialized, +! * reset 'readonly' and copy 'fileformat'. + */ + if (!buf->b_p_initialized) + { +*** ../vim-8.1.0252/src/os_unix.c 2018-08-07 17:38:36.991674646 +0200 +--- src/os_unix.c 2018-08-07 22:15:19.147259744 +0200 +*************** +*** 2336,2352 **** + /* + * Restore the window/icon title. + * "which" is one of: +! * 1 only restore title +! * 2 only restore icon +! * 3 restore title and icon + */ + void + mch_restore_title(int which) + { + /* only restore the title or icon when it has been set */ +! mch_settitle(((which & 1) && did_set_title) ? + (oldtitle ? oldtitle : p_titleold) : NULL, +! ((which & 2) && did_set_icon) ? oldicon : NULL); + } + + #endif /* FEAT_TITLE */ +--- 2336,2356 ---- + /* + * Restore the window/icon title. + * "which" is one of: +! * SAVE_RESTORE_TITLE only restore title +! * SAVE_RESTORE_ICON only restore icon +! * SAVE_RESTORE_BOTH restore title and icon + */ + void + mch_restore_title(int which) + { + /* only restore the title or icon when it has been set */ +! mch_settitle(((which & SAVE_RESTORE_TITLE) && did_set_title) ? + (oldtitle ? oldtitle : p_titleold) : NULL, +! ((which & SAVE_RESTORE_ICON) && did_set_icon) ? oldicon : NULL); +! +! // pop and push from/to the stack +! term_pop_title(which); +! term_push_title(which); + } + + #endif /* FEAT_TITLE */ +*************** +*** 3412,3418 **** + { + settmode(TMODE_COOK); + #ifdef FEAT_TITLE +! mch_restore_title(3); /* restore xterm title and icon name */ + #endif + /* + * When t_ti is not empty but it doesn't cause swapping terminal +--- 3416,3424 ---- + { + settmode(TMODE_COOK); + #ifdef FEAT_TITLE +! // restore xterm title and icon name +! mch_restore_title(SAVE_RESTORE_BOTH); +! term_pop_title(SAVE_RESTORE_BOTH); + #endif + /* + * When t_ti is not empty but it doesn't cause swapping terminal +*** ../vim-8.1.0252/src/proto/term.pro 2018-08-07 17:38:36.995674625 +0200 +--- src/proto/term.pro 2018-08-07 22:14:11.971620330 +0200 +*************** +*** 31,36 **** +--- 31,38 ---- + void term_fg_rgb_color(guicolor_T rgb); + void term_bg_rgb_color(guicolor_T rgb); + void term_settitle(char_u *title); ++ void term_push_title(int which); ++ void term_pop_title(int which); + void ttest(int pairs); + void add_long_to_buf(long_u val, char_u *dst); + void check_shellsize(void); +*** ../vim-8.1.0252/src/term.c 2018-08-07 17:38:36.995674625 +0200 +--- src/term.c 2018-08-07 22:13:41.603782475 +0200 +*************** +*** 922,927 **** +--- 922,931 ---- + # endif + {(int)KS_CBE, IF_EB("\033[?2004h", ESC_STR "[?2004h")}, + {(int)KS_CBD, IF_EB("\033[?2004l", ESC_STR "[?2004l")}, ++ {(int)KS_CST, IF_EB("\033[22;2t", ESC_STR "[22;2t")}, ++ {(int)KS_CRT, IF_EB("\033[23;2t", ESC_STR "[23;2t")}, ++ {(int)KS_SSI, IF_EB("\033[22;1t", ESC_STR "[22;1t")}, ++ {(int)KS_SRI, IF_EB("\033[23;1t", ESC_STR "[23;1t")}, + + {K_UP, IF_EB("\033O*A", ESC_STR "O*A")}, + {K_DOWN, IF_EB("\033O*B", ESC_STR "O*B")}, +*************** +*** 1600,1605 **** +--- 1604,1611 ---- + {KS_8F, "8f"}, {KS_8B, "8b"}, + {KS_CBE, "BE"}, {KS_CBD, "BD"}, + {KS_CPS, "PS"}, {KS_CPE, "PE"}, ++ {KS_CST, "ST"}, {KS_CRT, "RT"}, ++ {KS_SSI, "Si"}, {KS_SRI, "Ri"}, + {(enum SpecialKey)0, NULL} + }; + int i; +*************** +*** 2974,2979 **** +--- 2980,3024 ---- + out_str(T_FS); /* set title end */ + out_flush(); + } ++ ++ /* ++ * Tell the terminal to push (save) the title and/or icon, so that it can be ++ * popped (restored) later. ++ */ ++ void ++ term_push_title(int which) ++ { ++ if ((which & SAVE_RESTORE_TITLE) && *T_CST != NUL) ++ { ++ OUT_STR(T_CST); ++ out_flush(); ++ } ++ ++ if ((which & SAVE_RESTORE_ICON) && *T_SSI != NUL) ++ { ++ OUT_STR(T_SSI); ++ out_flush(); ++ } ++ } ++ ++ /* ++ * Tell the terminal to pop the title and/or icon. ++ */ ++ void ++ term_pop_title(int which) ++ { ++ if ((which & SAVE_RESTORE_TITLE) && *T_CRT != NUL) ++ { ++ OUT_STR(T_CRT); ++ out_flush(); ++ } ++ ++ if ((which & SAVE_RESTORE_ICON) && *T_SRI != NUL) ++ { ++ OUT_STR(T_SRI); ++ out_flush(); ++ } ++ } + #endif + + /* +*** ../vim-8.1.0252/src/term.h 2017-10-14 22:14:45.000000000 +0200 +--- src/term.h 2018-08-07 22:02:48.951042224 +0200 +*************** +*** 101,110 **** + KS_CBE, /* enable bracketed paste mode */ + KS_CBD, /* disable bracketed paste mode */ + KS_CPS, /* start of bracketed paste */ +! KS_CPE /* end of bracketed paste */ + }; + +! #define KS_LAST KS_CPE + + /* + * the terminal capabilities are stored in this array +--- 101,114 ---- + KS_CBE, /* enable bracketed paste mode */ + KS_CBD, /* disable bracketed paste mode */ + KS_CPS, /* start of bracketed paste */ +! KS_CPE, /* end of bracketed paste */ +! KS_CST, /* save window title */ +! KS_CRT, /* restore window title */ +! KS_SSI, /* save icon text */ +! KS_SRI /* restore icon text */ + }; + +! #define KS_LAST KS_SRI + + /* + * the terminal capabilities are stored in this array +*************** +*** 196,201 **** +--- 200,209 ---- + #define T_BD (TERM_STR(KS_CBD)) /* disable bracketed paste mode */ + #define T_PS (TERM_STR(KS_CPS)) /* start of bracketed paste */ + #define T_PE (TERM_STR(KS_CPE)) /* end of bracketed paste */ ++ #define T_CST (TERM_STR(KS_CST)) /* save window title */ ++ #define T_CRT (TERM_STR(KS_CRT)) /* restore window title */ ++ #define T_SSI (TERM_STR(KS_SSI)) /* save icon text */ ++ #define T_SRI (TERM_STR(KS_SRI)) /* restore icon text */ + + #define TMODE_COOK 0 /* terminal mode for external cmds and Ex mode */ + #define TMODE_SLEEP 1 /* terminal mode for sleeping (cooked but no echo) */ +*** ../vim-8.1.0252/src/vim.h 2018-07-29 16:09:14.644945560 +0200 +--- src/vim.h 2018-08-07 22:14:06.727648372 +0200 +*************** +*** 2548,2551 **** +--- 2548,2563 ---- + #define TERM_START_FORCEIT 2 + #define TERM_START_SYSTEM 4 + ++ #if defined(HAVE_DROP_FILE) \ ++ || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \ ++ || defined(FEAT_GUI_MSWIN) \ ++ || defined(FEAT_GUI_MAC) ++ # define HAVE_HANDLE_DROP ++ #endif ++ ++ // Used for icon/title save and restore. ++ #define SAVE_RESTORE_TITLE 1 ++ #define SAVE_RESTORE_ICON 2 ++ #define SAVE_RESTORE_BOTH (SAVE_RESTORE_TITLE | SAVE_RESTORE_ICON) ++ + #endif /* VIM__H */ +*** ../vim-8.1.0252/src/buffer.c 2018-08-05 13:22:22.474562651 +0200 +--- src/buffer.c 2018-08-07 22:15:46.499112220 +0200 +*************** +*** 3798,3804 **** + if (str == NULL) + { + *last = NULL; +! mch_restore_title(last == &lasttitle ? 1 : 2); + } + else + { +--- 3798,3805 ---- + if (str == NULL) + { + *last = NULL; +! mch_restore_title( +! last == &lasttitle ? SAVE_RESTORE_TITLE : SAVE_RESTORE_ICON); + } + else + { +*** ../vim-8.1.0252/src/ex_docmd.c 2018-08-01 17:53:04.689381294 +0200 +--- src/ex_docmd.c 2018-08-07 22:16:05.727008287 +0200 +*************** +*** 7750,7756 **** + stoptermcap(); + out_flush(); /* needed for SUN to restore xterm buffer */ + #ifdef FEAT_TITLE +! mch_restore_title(3); /* restore window titles */ + #endif + ui_suspend(); /* call machine specific function */ + #ifdef FEAT_TITLE +--- 7750,7756 ---- + stoptermcap(); + out_flush(); /* needed for SUN to restore xterm buffer */ + #ifdef FEAT_TITLE +! mch_restore_title(SAVE_RESTORE_BOTH); /* restore window titles */ + #endif + ui_suspend(); /* call machine specific function */ + #ifdef FEAT_TITLE +*** ../vim-8.1.0252/src/os_amiga.c 2018-03-04 16:16:34.000000000 +0100 +--- src/os_amiga.c 2018-08-07 22:17:36.474515466 +0200 +*************** +*** 617,630 **** + /* + * Restore the window/icon title. + * which is one of: +! * 1 Just restore title +! * 2 Just restore icon (which we don't have) +! * 3 Restore title and icon (which we don't have) + */ + void + mch_restore_title(int which) + { +! if (which & 1) + mch_settitle(oldwindowtitle, NULL); + } + +--- 617,630 ---- + /* + * Restore the window/icon title. + * which is one of: +! * SAVE_RESTORE_TITLE Just restore title +! * SAVE_RESTORE_ICON Just restore icon (which we don't have) +! * SAVE_RESTORE_BOTH Restore title and icon (which we don't have) + */ + void + mch_restore_title(int which) + { +! if (which & SAVE_RESTORE_TITLE) + mch_settitle(oldwindowtitle, NULL); + } + +*************** +*** 907,913 **** + } + + #ifdef FEAT_TITLE +! mch_restore_title(3); /* restore window title */ + #endif + + ml_close_all(TRUE); /* remove all memfiles */ +--- 907,913 ---- + } + + #ifdef FEAT_TITLE +! mch_restore_title(SAVE_RESTORE_BOTH); /* restore window title */ + #endif + + ml_close_all(TRUE); /* remove all memfiles */ +*** ../vim-8.1.0252/src/os_mswin.c 2018-05-13 17:28:51.000000000 +0200 +--- src/os_mswin.c 2018-08-07 22:18:09.022337873 +0200 +*************** +*** 304,312 **** + /* + * Restore the window/icon title. + * which is one of: +! * 1: Just restore title +! * 2: Just restore icon (which we don't have) +! * 3: Restore title and icon (which we don't have) + */ + void + mch_restore_title(int which UNUSED) +--- 304,312 ---- + /* + * Restore the window/icon title. + * which is one of: +! * SAVE_RESTORE_TITLE: Just restore title +! * SAVE_RESTORE_ICON: Just restore icon (which we don't have) +! * SAVE_RESTORE_BOTH: Restore title and icon (which we don't have) + */ + void + mch_restore_title(int which UNUSED) +*** ../vim-8.1.0252/src/os_win32.c 2018-08-07 20:47:02.756848221 +0200 +--- src/os_win32.c 2018-08-07 22:18:29.258227246 +0200 +*************** +*** 2695,2701 **** + if (g_fWindInitCalled) + { + #ifdef FEAT_TITLE +! mch_restore_title(3); + /* + * Restore both the small and big icons of the console window to + * what they were at startup. Don't do this when the window is +--- 2695,2701 ---- + if (g_fWindInitCalled) + { + #ifdef FEAT_TITLE +! mch_restore_title(SAVE_RESTORE_BOTH); + /* + * Restore both the small and big icons of the console window to + * what they were at startup. Don't do this when the window is +*** ../vim-8.1.0252/src/version.c 2018-08-07 21:54:27.725813349 +0200 +--- src/version.c 2018-08-07 22:04:25.166600764 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 253, + /**/ + +-- + [Autumn changed into Winter ... Winter changed into Spring ... Spring + changed back into Autumn and Autumn gave Winter and Spring a miss and + went straight on into Summer ... Until one day ...] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0254 b/data/vim/patches/8.1.0254 new file mode 100644 index 000000000..6be43ae0e --- /dev/null +++ b/data/vim/patches/8.1.0254 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0254 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0254 (after 8.1.0253) +Problem: Cannot build on MS-Windows; Unused macro HAVE_HANDLE_DROP. +Solution: Adjust #ifdef. Delete the macro. +Files: src/main.c, src/vim.h + + +*** ../vim-8.1.0253/src/main.c 2018-08-07 22:30:26.662240885 +0200 +--- src/main.c 2018-08-07 22:41:19.402019109 +0200 +*************** +*** 706,712 **** + scroll_region_reset(); /* In case Rows changed */ + scroll_start(); /* may scroll the screen to the right position */ + +! #ifdef FEAT_TITLE + term_push_title(SAVE_RESTORE_BOTH); + #endif + +--- 706,712 ---- + scroll_region_reset(); /* In case Rows changed */ + scroll_start(); /* may scroll the screen to the right position */ + +! #if defined(FEAT_TITLE) && (defined(UNIX) || defined(VMS) || defined(MACOS_X)) + term_push_title(SAVE_RESTORE_BOTH); + #endif + +*** ../vim-8.1.0253/src/vim.h 2018-08-07 22:30:26.666240863 +0200 +--- src/vim.h 2018-08-07 22:37:17.179721167 +0200 +*************** +*** 2548,2560 **** + #define TERM_START_FORCEIT 2 + #define TERM_START_SYSTEM 4 + +- #if defined(HAVE_DROP_FILE) \ +- || (defined(FEAT_GUI_GTK) && defined(FEAT_DND)) \ +- || defined(FEAT_GUI_MSWIN) \ +- || defined(FEAT_GUI_MAC) +- # define HAVE_HANDLE_DROP +- #endif +- + // Used for icon/title save and restore. + #define SAVE_RESTORE_TITLE 1 + #define SAVE_RESTORE_ICON 2 +--- 2548,2553 ---- +*** ../vim-8.1.0253/src/version.c 2018-08-07 22:30:26.674240818 +0200 +--- src/version.c 2018-08-07 22:38:21.219258973 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 254, + /**/ + +-- +TIM: To the north there lies a cave, the cave of Caerbannog, wherein, carved + in mystic runes, upon the very living rock, the last words of Olfin + Bedwere of Rheged make plain the last resting place of the most Holy + Grail. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0255 b/data/vim/patches/8.1.0255 new file mode 100644 index 000000000..a4ce7f3c2 --- /dev/null +++ b/data/vim/patches/8.1.0255 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0255 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0255 (after 8.1.0251) +Problem: Backup test fails when using shadow directory. +Solution: Remove check for "src". +Files: src/testdir/test_backup.vim + + +*** ../vim-8.1.0254/src/testdir/test_backup.vim 2018-08-07 21:39:09.251060096 +0200 +--- src/testdir/test_backup.vim 2018-08-08 11:00:33.345896867 +0200 +*************** +*** 29,35 **** + sp *Xbackup.txt~ + call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) + let f=expand('%') +! call assert_match('src%testdir%Xbackup.txt\~', f) + bw! + bw! + call delete('Xbackup.txt') +--- 29,35 ---- + sp *Xbackup.txt~ + call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) + let f=expand('%') +! call assert_match('%testdir%Xbackup.txt\~', f) + bw! + bw! + call delete('Xbackup.txt') +*************** +*** 49,55 **** + sp *Xbackup.txt~ + call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) + let f=expand('%') +! call assert_match('src%testdir%Xbackup.txt\~', f) + bw! + bw! + call delete('Xbackup.txt') +--- 49,55 ---- + sp *Xbackup.txt~ + call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) + let f=expand('%') +! call assert_match('%testdir%Xbackup.txt\~', f) + bw! + bw! + call delete('Xbackup.txt') +*** ../vim-8.1.0254/src/version.c 2018-08-07 22:42:48.965416564 +0200 +--- src/version.c 2018-08-08 11:01:24.270573213 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 255, + /**/ + +-- +TIM: Too late. +ARTHUR: What? +TIM: There he is! + [They all turn, and see a large white RABBIT lollop a few yards out of the + cave. Accompanied by terrifying chord and jarring metallic monster noise.] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0256 b/data/vim/patches/8.1.0256 new file mode 100644 index 000000000..55d8eef40 --- /dev/null +++ b/data/vim/patches/8.1.0256 @@ -0,0 +1,286 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0256 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0256 (after 8.1.0245) +Problem: Using setline() in TextChangedI splits undo. +Solution: Use another solution for undo not working properly. +Files: src/edit.c, src/testdir/test_autocmd.vim + + +*** ../vim-8.1.0255/src/edit.c 2018-08-07 19:32:48.371651690 +0200 +--- src/edit.c 2018-08-08 22:07:51.235091964 +0200 +*************** +*** 279,284 **** +--- 279,285 ---- + #if defined(FEAT_EVAL) + static char_u *do_insert_char_pre(int c); + #endif ++ static int ins_apply_autocmds(event_T event); + + static colnr_T Insstart_textlen; /* length of line when insert started */ + static colnr_T Insstart_blank_vcol; /* vcol for first inserted blank */ +*************** +*** 411,417 **** + set_vim_var_string(VV_INSERTMODE, ptr, 1); + set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */ + #endif +! apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf); + + /* Make sure the cursor didn't move. Do call check_cursor_col() in + * case the text was modified. Since Insert mode was not started yet +--- 412,418 ---- + set_vim_var_string(VV_INSERTMODE, ptr, 1); + set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */ + #endif +! ins_apply_autocmds(EVENT_INSERTENTER); + + /* Make sure the cursor didn't move. Do call check_cursor_col() in + * case the text was modified. Since Insert mode was not started yet +*************** +*** 1061,1068 **** + if (ins_esc(&count, cmdchar, nomove)) + { + if (cmdchar != 'r' && cmdchar != 'v') +! apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL, +! FALSE, curbuf); + did_cursorhold = FALSE; + return (c == Ctrl_O); + } +--- 1062,1068 ---- + if (ins_esc(&count, cmdchar, nomove)) + { + if (cmdchar != 'r' && cmdchar != 'v') +! ins_apply_autocmds(EVENT_INSERTLEAVE); + did_cursorhold = FALSE; + return (c == Ctrl_O); + } +*************** +*** 1275,1281 **** + break; + + case K_CURSORHOLD: /* Didn't type something for a while. */ +! apply_autocmds(EVENT_CURSORHOLDI, NULL, NULL, FALSE, curbuf); + did_cursorhold = TRUE; + break; + +--- 1275,1281 ---- + break; + + case K_CURSORHOLD: /* Didn't type something for a while. */ +! ins_apply_autocmds(EVENT_CURSORHOLDI); + did_cursorhold = TRUE; + break; + +*************** +*** 1698,1704 **** + /* Make sure curswant is correct, an autocommand may call + * getcurpos(). */ + update_curswant(); +! apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); + } + # ifdef FEAT_CONCEAL + if (curwin->w_p_cole > 0) +--- 1698,1704 ---- + /* Make sure curswant is correct, an autocommand may call + * getcurpos(). */ + update_curswant(); +! ins_apply_autocmds(EVENT_CURSORMOVEDI); + } + # ifdef FEAT_CONCEAL + if (curwin->w_p_cole > 0) +*************** +*** 1721,1744 **** + ) + { + aco_save_T aco; +! +! #ifdef FEAT_EVAL +! // Sync undo when the autocommand calls setline() or append(), so that +! // it can be undone separately. +! u_sync_once = 2; +! #endif + + // save and restore curwin and curbuf, in case the autocmd changes them + aucmd_prepbuf(&aco, curbuf); + apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf); + aucmd_restbuf(&aco); + curbuf->b_last_changedtick = CHANGEDTICK(curbuf); +! +! #ifdef FEAT_EVAL +! if (u_sync_once == 1) +! ins_need_undo = TRUE; +! u_sync_once = 0; +! #endif + } + + #ifdef FEAT_INS_EXPAND +--- 1721,1736 ---- + ) + { + aco_save_T aco; +! varnumber_T tick = CHANGEDTICK(curbuf); + + // save and restore curwin and curbuf, in case the autocmd changes them + aucmd_prepbuf(&aco, curbuf); + apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf); + aucmd_restbuf(&aco); + curbuf->b_last_changedtick = CHANGEDTICK(curbuf); +! if (tick != CHANGEDTICK(curbuf)) // see ins_apply_autocmds() +! u_save(curwin->w_cursor.lnum, +! (linenr_T)(curwin->w_cursor.lnum + 1)); + } + + #ifdef FEAT_INS_EXPAND +*************** +*** 1750,1761 **** +--- 1742,1757 ---- + && pum_visible()) + { + aco_save_T aco; ++ varnumber_T tick = CHANGEDTICK(curbuf); + + // save and restore curwin and curbuf, in case the autocmd changes them + aucmd_prepbuf(&aco, curbuf); + apply_autocmds(EVENT_TEXTCHANGEDP, NULL, NULL, FALSE, curbuf); + aucmd_restbuf(&aco); + curbuf->b_last_changedtick_pum = CHANGEDTICK(curbuf); ++ if (tick != CHANGEDTICK(curbuf)) // see ins_apply_autocmds() ++ u_save(curwin->w_cursor.lnum, ++ (linenr_T)(curwin->w_cursor.lnum + 1)); + } + #endif + +*************** +*** 4124,4136 **** + #endif + /* Trigger the CompleteDone event to give scripts a chance to act + * upon the completion. */ +! apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf); + } + } + else if (ctrl_x_mode == CTRL_X_LOCAL_MSG) + /* Trigger the CompleteDone event to give scripts a chance to act + * upon the (possibly failed) completion. */ +! apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf); + + /* reset continue_* if we left expansion-mode, if we stay they'll be + * (re)set properly in ins_complete() */ +--- 4120,4132 ---- + #endif + /* Trigger the CompleteDone event to give scripts a chance to act + * upon the completion. */ +! ins_apply_autocmds(EVENT_COMPLETEDONE); + } + } + else if (ctrl_x_mode == CTRL_X_LOCAL_MSG) + /* Trigger the CompleteDone event to give scripts a chance to act + * upon the (possibly failed) completion. */ +! ins_apply_autocmds(EVENT_COMPLETEDONE); + + /* reset continue_* if we left expansion-mode, if we stay they'll be + * (re)set properly in ins_complete() */ +*************** +*** 8944,8950 **** + : replaceState == VREPLACE ? "v" + : "r"), 1); + # endif +! apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf); + if (State & REPLACE_FLAG) + State = INSERT | (State & LANGMAP); + else +--- 8940,8946 ---- + : replaceState == VREPLACE ? "v" + : "r"), 1); + # endif +! ins_apply_autocmds(EVENT_INSERTCHANGE); + if (State & REPLACE_FLAG) + State = INSERT | (State & LANGMAP); + else +*************** +*** 10738,10744 **** + set_vim_var_string(VV_CHAR, buf, -1); /* set v:char */ + + res = NULL; +! if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, FALSE, curbuf)) + { + /* Get the value of v:char. It may be empty or more than one + * character. Only use it when changed, otherwise continue with the +--- 10734,10740 ---- + set_vim_var_string(VV_CHAR, buf, -1); /* set v:char */ + + res = NULL; +! if (ins_apply_autocmds(EVENT_INSERTCHARPRE)) + { + /* Get the value of v:char. It may be empty or more than one + * character. Only use it when changed, otherwise continue with the +*************** +*** 10753,10755 **** +--- 10749,10770 ---- + return res; + } + #endif ++ ++ /* ++ * Trigger "event" and take care of fixing undo. ++ */ ++ static int ++ ins_apply_autocmds(event_T event) ++ { ++ varnumber_T tick = CHANGEDTICK(curbuf); ++ int r; ++ ++ r = apply_autocmds(event, NULL, NULL, FALSE, curbuf); ++ ++ // If u_savesub() was called then we are not prepared to start ++ // a new line. Call u_save() with no contents to fix that. ++ if (tick != CHANGEDTICK(curbuf)) ++ u_save(curwin->w_cursor.lnum, (linenr_T)(curwin->w_cursor.lnum + 1)); ++ ++ return r; ++ } +*** ../vim-8.1.0255/src/testdir/test_autocmd.vim 2018-08-07 19:04:57.409627129 +0200 +--- src/testdir/test_autocmd.vim 2018-08-08 21:43:44.368570016 +0200 +*************** +*** 1329,1338 **** + call assert_equal('(', getline(1)) + call assert_equal('x)', getline(2)) + undo +- call assert_equal('(', getline(1)) +- call assert_equal('', getline(2)) +- undo + call assert_equal('', getline(1)) + + call test_override('starting', 0) + bwipe! +--- 1329,1336 ---- + call assert_equal('(', getline(1)) + call assert_equal('x)', getline(2)) + undo + call assert_equal('', getline(1)) ++ call assert_equal('', getline(2)) + + call test_override('starting', 0) + bwipe! +*** ../vim-8.1.0255/src/version.c 2018-08-08 11:02:26.855415573 +0200 +--- src/version.c 2018-08-08 21:43:06.112860972 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 256, + /**/ + +-- +If "R" is Reverse, how come "D" is FORWARD? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0257 b/data/vim/patches/8.1.0257 new file mode 100644 index 000000000..17f3de197 --- /dev/null +++ b/data/vim/patches/8.1.0257 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0257 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0257 +Problem: No test for pathshorten(). +Solution: Add a test. (Dominique Pelle, closes #3295) +Files: src/testdir/test_functions.vim + + +*** ../vim-8.1.0256/src/testdir/test_functions.vim 2018-07-29 15:34:20.868300075 +0200 +--- src/testdir/test_functions.vim 2018-08-08 22:26:53.791238105 +0200 +*************** +*** 208,213 **** +--- 208,228 ---- + call assert_fails('call simplify(1.2)', 'E806:') + endfunc + ++ func Test_pathshorten() ++ call assert_equal('', pathshorten('')) ++ call assert_equal('foo', pathshorten('foo')) ++ call assert_equal('/foo', pathshorten('/foo')) ++ call assert_equal('f/', pathshorten('foo/')) ++ call assert_equal('f/bar', pathshorten('foo/bar')) ++ call assert_equal('f/b/foobar', pathshorten('foo/bar/foobar')) ++ call assert_equal('/f/b/foobar', pathshorten('/foo/bar/foobar')) ++ call assert_equal('.f/bar', pathshorten('.foo/bar')) ++ call assert_equal('~f/bar', pathshorten('~foo/bar')) ++ call assert_equal('~.f/bar', pathshorten('~.foo/bar')) ++ call assert_equal('.~f/bar', pathshorten('.~foo/bar')) ++ call assert_equal('~/f/bar', pathshorten('~/foo/bar')) ++ endfunc ++ + func Test_strpart() + call assert_equal('de', strpart('abcdefg', 3, 2)) + call assert_equal('ab', strpart('abcdefg', -2, 4)) +*** ../vim-8.1.0256/src/version.c 2018-08-08 22:08:28.326846653 +0200 +--- src/version.c 2018-08-08 22:24:55.740064770 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 257, + /**/ + +-- +Why isn't there mouse-flavored cat food? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0258 b/data/vim/patches/8.1.0258 new file mode 100644 index 000000000..b1b1e4c70 --- /dev/null +++ b/data/vim/patches/8.1.0258 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0258 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0258 +Problem: Not enough testing for the CompleteDone event. +Solution: Add a test. (closes #3297) +Files: src/testdir/test_ins_complete.vim + + +*** ../vim-8.1.0257/src/testdir/test_ins_complete.vim 2018-06-13 21:27:20.213366293 +0200 +--- src/testdir/test_ins_complete.vim 2018-08-08 22:48:57.633314237 +0200 +*************** +*** 262,267 **** +--- 262,280 ---- + au! CompleteDone + endfunc + ++ func Test_CompleteDone_undo() ++ au CompleteDone * call append(0, "prepend1") ++ new ++ call setline(1, ["line1", "line2"]) ++ call feedkeys("Go\\\\", "tx") ++ call assert_equal(["prepend1", "line1", "line2", "line1", ""], ++ \ getline(1, '$')) ++ undo ++ call assert_equal(["line1", "line2"], getline(1, '$')) ++ bwipe! ++ au! CompleteDone ++ endfunc ++ + " Check that when using feedkeys() typeahead does not interrupt searching for + " completions. + func Test_compl_feedkeys() +*** ../vim-8.1.0257/src/version.c 2018-08-08 22:27:27.043005000 +0200 +--- src/version.c 2018-08-08 22:53:55.883157583 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 258, + /**/ + +-- +If cars evolved at the same rate as computers have, they'd cost five euro, +run for a year on a couple of liters of petrol, and explode once a day. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0259 b/data/vim/patches/8.1.0259 new file mode 100644 index 000000000..32e09e50d --- /dev/null +++ b/data/vim/patches/8.1.0259 @@ -0,0 +1,161 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0259 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0259 +Problem: No test for fixed quickfix issue. +Solution: Add a test. Clean up the code a bit. (Yegappan Lakshmanan) +Files: src/quickfix.c, src/testdir/test_quickfix.vim + + +*** ../vim-8.1.0258/src/quickfix.c 2018-08-07 21:54:27.725813349 +0200 +--- src/quickfix.c 2018-08-09 21:14:43.248703692 +0200 +*************** +*** 1506,1512 **** + return qi->qf_lists[qf_idx].qf_count <= 0; + } + +- + /* + * Allocate the fields used for parsing lines and populating a quickfix list. + */ +--- 1506,1511 ---- +*************** +*** 3717,3723 **** + if (IS_LL_WINDOW(curwin)) + qi = GET_LOC_LIST(curwin); + +! if (qi == NULL || qi->qf_lists[qi->qf_curlist].qf_count == 0) + { + EMSG(_(e_quickfix)); + return; +--- 3716,3722 ---- + if (IS_LL_WINDOW(curwin)) + qi = GET_LOC_LIST(curwin); + +! if (qf_list_empty(qi, qi->qf_curlist)) + { + EMSG(_(e_quickfix)); + return; +*************** +*** 4349,4355 **** + if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) + qi->qf_curlist = qf_id2nr(qi, save_qfid); + +! if (qi->qf_lists[qi->qf_curlist].qf_count > 0) + qf_jump(qi, 0, 0, forceit); + } + +--- 4348,4355 ---- + if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) + qi->qf_curlist = qf_id2nr(qi, save_qfid); + +! // Autocommands might have cleared the list, check for it +! if (!qf_list_empty(qi, qi->qf_curlist)) + qf_jump(qi, 0, 0, forceit); + } + +*************** +*** 4873,4882 **** + // free the list. + if (res > 0 && (eap->cmdidx == CMD_cfile || eap->cmdidx == CMD_lfile) + && qflist_valid(wp, save_qfid)) +- { + // display the first error + qf_jump_first(qi, save_qfid, eap->forceit); +- } + } + + /* +--- 4873,4880 ---- +*************** +*** 6581,6590 **** + if (res > 0 && (eap->cmdidx == CMD_cbuffer || + eap->cmdidx == CMD_lbuffer) + && qflist_valid(wp, save_qfid)) +- { + // display the first error + qf_jump_first(qi, save_qfid, eap->forceit); +- } + } + } + } +--- 6579,6586 ---- +*************** +*** 6661,6670 **** + if (res > 0 && (eap->cmdidx == CMD_cexpr + || eap->cmdidx == CMD_lexpr) + && qflist_valid(wp, save_qfid)) +- { + // display the first error + qf_jump_first(qi, save_qfid, eap->forceit); +- } + } + else + EMSG(_("E777: String or List expected")); +--- 6657,6664 ---- +*** ../vim-8.1.0258/src/testdir/test_quickfix.vim 2018-07-25 22:36:48.991518559 +0200 +--- src/testdir/test_quickfix.vim 2018-08-09 21:14:43.248703692 +0200 +*************** +*** 3478,3483 **** +--- 3478,3507 ---- + call assert_equal(5, line('.')) + autocmd! QuickFixCmdPost + ++ " Test for autocommands clearing the quickfix list before jumping to the ++ " first error. This should not result in an error ++ autocmd QuickFixCmdPost * call g:Xsetlist([], 'r') ++ let v:errmsg = '' ++ " Test for cfile/lfile ++ Xfile Xerr ++ call assert_true(v:errmsg !~# 'E42:') ++ " Test for cbuffer/lbuffer ++ edit Xerr ++ Xbuffer ++ call assert_true(v:errmsg !~# 'E42:') ++ " Test for cexpr/lexpr ++ Xexpr 'Xtestfile2:4:Line4' ++ call assert_true(v:errmsg !~# 'E42:') ++ " Test for grep/lgrep ++ " The grepprg may not be set on non-Unix systems ++ if has('unix') ++ silent Xgrep Line5 Xtestfile2 ++ call assert_true(v:errmsg !~# 'E42:') ++ endif ++ " Test for vimgrep/lvimgrep ++ call assert_fails('silent Xvimgrep Line5 Xtestfile2', 'E480:') ++ autocmd! QuickFixCmdPost ++ + call delete('Xerr') + call delete('Xtestfile1') + call delete('Xtestfile2') +*** ../vim-8.1.0258/src/version.c 2018-08-08 22:55:38.034420872 +0200 +--- src/version.c 2018-08-09 21:17:42.991183590 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 259, + /**/ + +-- +BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One. +ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O + Lord bless this thy hand grenade that with it thou mayest + blow thine enemies to tiny bits, in thy mercy. "and the Lord + did grin and people did feast upon the lambs and sloths and + carp and anchovies and orang-utans and breakfast cereals and + fruit bats and... +BROTHER MAYNARD: Skip a bit brother ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0260 b/data/vim/patches/8.1.0260 new file mode 100644 index 000000000..6dbc9d1b1 --- /dev/null +++ b/data/vim/patches/8.1.0260 @@ -0,0 +1,44 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0260 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0260 +Problem: No LGTM logo in README file. +Solution: Add one. (Bas van Schaik, closes #3305) +Files: README.md + + +*** ../vim-8.1.0259/README.md 2018-06-18 22:31:07.858573774 +0200 +--- README.md 2018-08-09 21:32:10.016728368 +0200 +*************** +*** 5,10 **** +--- 5,11 ---- + [![Coverage Status](https://coveralls.io/repos/vim/vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/vim/vim?branch=master) + [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) + [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) ++ [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) + [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) + + +*** ../vim-8.1.0259/src/version.c 2018-08-09 21:19:15.778436046 +0200 +--- src/version.c 2018-08-09 21:33:01.336368524 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 260, + /**/ + +-- +I wonder, do vegetarians eat fruit bats? + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0261 b/data/vim/patches/8.1.0261 new file mode 100644 index 000000000..161598204 --- /dev/null +++ b/data/vim/patches/8.1.0261 @@ -0,0 +1,177 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0261 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0261 +Problem: Coverity complains about a negative array index. +Solution: When qf_id2nr() cannot find the list then don't set qf_curlist. +Files: src/quickfix.c + + +*** ../vim-8.1.0260/src/quickfix.c 2018-08-09 21:19:15.774436077 +0200 +--- src/quickfix.c 2018-08-09 21:49:36.929501416 +0200 +*************** +*** 2011,2023 **** + { + qf_info_T *qi; + +! qi = (qf_info_T *)alloc((unsigned)sizeof(qf_info_T)); + if (qi != NULL) +- { +- vim_memset(qi, 0, (size_t)(sizeof(qf_info_T))); + qi->qf_refcount++; +- } +- + return qi; + } + +--- 2011,2019 ---- + { + qf_info_T *qi; + +! qi = (qf_info_T *)alloc_clear((unsigned)sizeof(qf_info_T)); + if (qi != NULL) + qi->qf_refcount++; + return qi; + } + +*************** +*** 4339,4352 **** + } + + /* + * Jump to the first entry if there is one. + */ + static void + qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit) + { +! // If autocommands changed the current list, then restore it +! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) +! qi->qf_curlist = qf_id2nr(qi, save_qfid); + + // Autocommands might have cleared the list, check for it + if (!qf_list_empty(qi, qi->qf_curlist)) +--- 4335,4365 ---- + } + + /* ++ * If the current list is not "save_qfid" and we can find the list with that ID ++ * then make it the current list. ++ * This is used when autocommands may have changed the current list. ++ */ ++ static void ++ qf_restore_list(qf_info_T *qi, int_u save_qfid) ++ { ++ int curlist; ++ ++ if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) ++ { ++ curlist = qf_id2nr(qi, save_qfid); ++ if (curlist >= 0) ++ qi->qf_curlist = curlist; ++ // else: what if the list can't be found? ++ } ++ } ++ ++ /* + * Jump to the first entry if there is one. + */ + static void + qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit) + { +! qf_restore_list(qi, save_qfid); + + // Autocommands might have cleared the list, check for it + if (!qf_list_empty(qi, qi->qf_curlist)) +*************** +*** 5012,5021 **** + } + } + +! if (qi->qf_lists[qi->qf_curlist].qf_id != qfid) +! /* Autocommands changed the quickfix list. Find the one we were +! * using and restore it. */ +! qi->qf_curlist = qf_id2nr(qi, qfid); + + return TRUE; + } +--- 5025,5031 ---- + } + } + +! qf_restore_list(qi, qfid); + + return TRUE; + } +*************** +*** 5361,5369 **** + if (!qflist_valid(wp, save_qfid)) + goto theend; + +! // If autocommands changed the current list, then restore it +! if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) +! qi->qf_curlist = qf_id2nr(qi, save_qfid); + + /* Jump to first match. */ + if (!qf_list_empty(qi, qi->qf_curlist)) +--- 5371,5377 ---- + if (!qflist_valid(wp, save_qfid)) + goto theend; + +! qf_restore_list(qi, save_qfid); + + /* Jump to first match. */ + if (!qf_list_empty(qi, qi->qf_curlist)) +*************** +*** 5684,5695 **** + if (l == NULL) + return FAIL; + +! qi = (qf_info_T *)alloc((unsigned)sizeof(qf_info_T)); + if (qi != NULL) + { +- vim_memset(qi, 0, (size_t)(sizeof(qf_info_T))); +- qi->qf_refcount++; +- + if (qf_init_ext(qi, 0, NULL, NULL, &di->di_tv, errorformat, + TRUE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0) + { +--- 5692,5700 ---- + if (l == NULL) + return FAIL; + +! qi = ll_new_list(); + if (qi != NULL) + { + if (qf_init_ext(qi, 0, NULL, NULL, &di->di_tv, errorformat, + TRUE, (linenr_T)0, (linenr_T)0, NULL, NULL) > 0) + { +*** ../vim-8.1.0260/src/version.c 2018-08-09 21:33:34.800134541 +0200 +--- src/version.c 2018-08-09 21:50:45.609022776 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 261, + /**/ + +-- +MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin, + then shalt thou count to three, no more, no less. Three shalt be the + number thou shalt count, and the number of the counting shalt be three. + Four shalt thou not count, neither count thou two, excepting that thou + then proceed to three. Five is right out. Once the number three, being + the third number, be reached, then lobbest thou thy Holy Hand Grenade of + Antioch towards thou foe, who being naughty in my sight, shall snuff it. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0262 b/data/vim/patches/8.1.0262 new file mode 100644 index 000000000..f24c5fffe --- /dev/null +++ b/data/vim/patches/8.1.0262 @@ -0,0 +1,100 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0262 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0262 +Problem: Not enough testing for getftype(). +Solution: Add a test. (Dominique Pelle, closes #3300) +Files: src/evalfunc.c, src/testdir/test_stat.vim + + +*** ../vim-8.1.0261/src/evalfunc.c 2018-07-29 16:09:14.632945629 +0200 +--- src/evalfunc.c 2018-08-09 22:00:49.920858612 +0200 +*************** +*** 5111,5117 **** + # endif + # ifdef S_ISSOCK + else if (S_ISSOCK(st.st_mode)) +! t = "fifo"; + # endif + else + t = "other"; +--- 5111,5117 ---- + # endif + # ifdef S_ISSOCK + else if (S_ISSOCK(st.st_mode)) +! t = "socket"; + # endif + else + t = "other"; +*** ../vim-8.1.0261/src/testdir/test_stat.vim 2018-07-07 18:34:08.430551330 +0200 +--- src/testdir/test_stat.vim 2018-08-09 22:00:49.924858584 +0200 +*************** +*** 122,127 **** +--- 122,162 ---- + call assert_equal('', getfperm(fname)) + endfunc + ++ func Test_getftype() ++ call assert_equal('file', getftype(v:progpath)) ++ call assert_equal('dir', getftype('.')) ++ ++ if !has('unix') ++ return ++ endif ++ ++ silent !ln -s Xfile Xlink ++ call assert_equal('link', getftype('Xlink')) ++ call delete('Xlink') ++ ++ if executable('mkfifo') ++ silent !mkfifo Xfifo ++ call assert_equal('fifo', getftype('Xfifo')) ++ call delete('Xfifo') ++ endif ++ ++ for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null') ++ call assert_equal('cdev', getftype(cdevfile)) ++ endfor ++ ++ for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null') ++ call assert_equal('bdev', getftype(bdevfile)) ++ endfor ++ ++ " The /run/ directory typically contains socket files. ++ " If it does not, test won't fail but will not test socket files. ++ for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null') ++ call assert_equal('socket', getftype(socketfile)) ++ endfor ++ ++ " TODO: file type 'other' is not tested. How can we test it? ++ endfunc ++ + func Test_win32_symlink_dir() + " On Windows, non-admin users cannot create symlinks. + " So we use an existing symlink for this test. +*** ../vim-8.1.0261/src/version.c 2018-08-09 21:52:20.716362389 +0200 +--- src/version.c 2018-08-09 22:08:41.385639374 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 262, + /**/ + +-- +User: I'm having problems with my text editor. +Help desk: Which editor are you using? +User: I don't know, but it's version VI (pronounced: 6). +Help desk: Oh, then you should upgrade to version VIM (pronounced: 994). + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0263 b/data/vim/patches/8.1.0263 new file mode 100644 index 000000000..0fd56af88 --- /dev/null +++ b/data/vim/patches/8.1.0263 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0263 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0263 +Problem: Channel log doesn't show part of channel. +Solution: Add "sock", "out", "err" or "in". (Ozaki Kiichi, closes #3303) +Files: src/channel.c + + +*** ../vim-8.1.0262/src/channel.c 2018-07-08 17:18:58.416462371 +0200 +--- src/channel.c 2018-08-09 22:13:36.575628935 +0200 +*************** +*** 138,144 **** + } + + static void +! ch_log_lead(const char *what, channel_T *ch) + { + if (log_fd != NULL) + { +--- 138,144 ---- + } + + static void +! ch_log_lead(const char *what, channel_T *ch, ch_part_T part) + { + if (log_fd != NULL) + { +*************** +*** 150,156 **** + fprintf(log_fd, "%s ", profile_msg(&log_now)); + #endif + if (ch != NULL) +! fprintf(log_fd, "%son %d: ", what, ch->ch_id); + else + fprintf(log_fd, "%s: ", what); + } +--- 150,162 ---- + fprintf(log_fd, "%s ", profile_msg(&log_now)); + #endif + if (ch != NULL) +! { +! if (part < PART_COUNT) +! fprintf(log_fd, "%son %d(%s): ", +! what, ch->ch_id, part_names[part]); +! else +! fprintf(log_fd, "%son %d: ", what, ch->ch_id); +! } + else + fprintf(log_fd, "%s: ", what); + } +*************** +*** 166,172 **** + { + va_list ap; + +! ch_log_lead("", ch); + va_start(ap, fmt); + vfprintf(log_fd, fmt, ap); + va_end(ap); +--- 172,178 ---- + { + va_list ap; + +! ch_log_lead("", ch, PART_COUNT); + va_start(ap, fmt); + vfprintf(log_fd, fmt, ap); + va_end(ap); +*************** +*** 191,197 **** + { + va_list ap; + +! ch_log_lead("ERR ", ch); + va_start(ap, fmt); + vfprintf(log_fd, fmt, ap); + va_end(ap); +--- 197,203 ---- + { + va_list ap; + +! ch_log_lead("ERR ", ch, PART_COUNT); + va_start(ap, fmt); + vfprintf(log_fd, fmt, ap); + va_end(ap); +*************** +*** 1849,1855 **** + + if (ch_log_active() && lead != NULL) + { +! ch_log_lead(lead, channel); + fprintf(log_fd, "'"); + ignored = (int)fwrite(buf, len, 1, log_fd); + fprintf(log_fd, "'\n"); +--- 1855,1861 ---- + + if (ch_log_active() && lead != NULL) + { +! ch_log_lead(lead, channel, part); + fprintf(log_fd, "'"); + ignored = (int)fwrite(buf, len, 1, log_fd); + fprintf(log_fd, "'\n"); +*************** +*** 3718,3724 **** + + if (ch_log_active()) + { +! ch_log_lead("SEND ", channel); + fprintf(log_fd, "'"); + ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd); + fprintf(log_fd, "'\n"); +--- 3724,3730 ---- + + if (ch_log_active()) + { +! ch_log_lead("SEND ", channel, part); + fprintf(log_fd, "'"); + ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd); + fprintf(log_fd, "'\n"); +*** ../vim-8.1.0262/src/version.c 2018-08-09 22:08:53.017560100 +0200 +--- src/version.c 2018-08-09 22:14:51.103121696 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 263, + /**/ + +-- +Veni, Vidi, VW -- I came, I saw, I drove around in a little car. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0264 b/data/vim/patches/8.1.0264 new file mode 100644 index 000000000..4c9dc214c --- /dev/null +++ b/data/vim/patches/8.1.0264 @@ -0,0 +1,121 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0264 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0264 +Problem: Backup tests fail when CWD is in /tmp. +Solution: Make 'backupskip' empty. (Christian Brabandt, closes #3301) +Files: src/testdir/test_backup.vim + + +*** ../vim-8.1.0263/src/testdir/test_backup.vim 2018-08-08 11:02:26.855415573 +0200 +--- src/testdir/test_backup.vim 2018-08-09 22:24:06.808025958 +0200 +*************** +*** 1,7 **** + " Tests for the backup function + + func Test_backup() +! set backup backupdir=. + new + call setline(1, ['line1', 'line2']) + :f Xbackup.txt +--- 1,7 ---- + " Tests for the backup function + + func Test_backup() +! set backup backupdir=. backupskip= + new + call setline(1, ['line1', 'line2']) + :f Xbackup.txt +*************** +*** 12,24 **** + let l = readfile('Xbackup.txt~') + call assert_equal(['line1', 'line2'], l) + bw! +! set backup&vim backupdir&vim + call delete('Xbackup.txt') + call delete('Xbackup.txt~') + endfunc + + func Test_backup2() +! set backup backupdir=.// + new + call setline(1, ['line1', 'line2', 'line3']) + :f Xbackup.txt +--- 12,24 ---- + let l = readfile('Xbackup.txt~') + call assert_equal(['line1', 'line2'], l) + bw! +! set backup&vim backupdir&vim backupskip&vim + call delete('Xbackup.txt') + call delete('Xbackup.txt~') + endfunc + + func Test_backup2() +! set backup backupdir=.// backupskip= + new + call setline(1, ['line1', 'line2', 'line3']) + :f Xbackup.txt +*************** +*** 34,44 **** + bw! + call delete('Xbackup.txt') + call delete(f) +! set backup&vim backupdir&vim + endfunc + + func Test_backup2_backupcopy() +! set backup backupdir=.// backupcopy=yes + new + call setline(1, ['line1', 'line2', 'line3']) + :f Xbackup.txt +--- 34,44 ---- + bw! + call delete('Xbackup.txt') + call delete(f) +! set backup&vim backupdir&vim backupskip&vim + endfunc + + func Test_backup2_backupcopy() +! set backup backupdir=.// backupcopy=yes backupskip= + new + call setline(1, ['line1', 'line2', 'line3']) + :f Xbackup.txt +*************** +*** 54,58 **** + bw! + call delete('Xbackup.txt') + call delete(f) +! set backup&vim backupdir&vim backupcopy&vim + endfunc +--- 54,58 ---- + bw! + call delete('Xbackup.txt') + call delete(f) +! set backup&vim backupdir&vim backupcopy&vim backupskip&vim + endfunc +*** ../vim-8.1.0263/src/version.c 2018-08-09 22:15:30.042856715 +0200 +--- src/version.c 2018-08-09 22:25:20.839776785 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 264, + /**/ + +-- +BEDEVERE: Oooooh! +LAUNCELOT: No "Aaaaarrrrrrggghhh ... " at the back of the throat. +BEDEVERE: No! "Oooooh!" in surprise and alarm! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0265 b/data/vim/patches/8.1.0265 new file mode 100644 index 000000000..bd59897ea --- /dev/null +++ b/data/vim/patches/8.1.0265 @@ -0,0 +1,875 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0265 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0265 +Problem: The getcmdline() function is way too big. +Solution: Factor out the incremental search highlighting. +Files: src/ex_getln.c + + +*** ../vim-8.1.0264/src/ex_getln.c 2018-08-01 19:05:59.286223185 +0200 +--- src/ex_getln.c 2018-08-10 22:05:38.646652603 +0200 +*************** +*** 141,149 **** + #endif + sort_func_compare(const void *s1, const void *s2); + #endif +- #ifdef FEAT_SEARCH_EXTRA +- static void set_search_match(pos_T *t); +- #endif + + + static void +--- 141,146 ---- +*************** +*** 185,193 **** + n -= 2; + return n == 0 || (n >= 2 && p[n - 2] == '\\' && p[n - 1] == '|'); + } +- #endif + +! #ifdef FEAT_SEARCH_EXTRA + typedef struct { + colnr_T vs_curswant; + colnr_T vs_leftcol; +--- 182,189 ---- + n -= 2; + return n == 0 || (n >= 2 && p[n - 2] == '\\' && p[n - 1] == '|'); + } + +! // Struct to store the viewstate during 'incsearch' highlighting. + typedef struct { + colnr_T vs_curswant; + colnr_T vs_leftcol; +*************** +*** 224,229 **** +--- 220,553 ---- + curwin->w_botline = vs->vs_botline; + curwin->w_empty_rows = vs->vs_empty_rows; + } ++ ++ // Struct to store the state of 'incsearch' highlighting. ++ typedef struct { ++ pos_T search_start; // where 'incsearch' starts searching ++ pos_T save_cursor; ++ viewstate_T init_viewstate; ++ viewstate_T old_viewstate; ++ pos_T match_start; ++ pos_T match_end; ++ int did_incsearch; ++ int incsearch_postponed; ++ } incsearch_state_T; ++ ++ static void ++ init_incsearch_state(incsearch_state_T *is_state) ++ { ++ is_state->match_start = curwin->w_cursor; ++ is_state->did_incsearch = FALSE; ++ is_state->incsearch_postponed = FALSE; ++ CLEAR_POS(&is_state->match_end); ++ is_state->save_cursor = curwin->w_cursor; // may be restored later ++ is_state->search_start = curwin->w_cursor; ++ save_viewstate(&is_state->init_viewstate); ++ save_viewstate(&is_state->old_viewstate); ++ } ++ ++ /* ++ * First move cursor to end of match, then to the start. This ++ * moves the whole match onto the screen when 'nowrap' is set. ++ */ ++ static void ++ set_search_match(pos_T *t) ++ { ++ t->lnum += search_match_lines; ++ t->col = search_match_endcol; ++ if (t->lnum > curbuf->b_ml.ml_line_count) ++ { ++ t->lnum = curbuf->b_ml.ml_line_count; ++ coladvance((colnr_T)MAXCOL); ++ } ++ } ++ ++ /* ++ * Return TRUE when 'incsearch' highlighting is to be done. ++ */ ++ static int ++ do_incsearch_highlighting(int firstc) ++ { ++ return p_is && !cmd_silent && (firstc == '/' || firstc == '?'); ++ } ++ ++ /* ++ * Do 'incsearch' highlighting if desired. ++ */ ++ static void ++ may_do_incsearch_highlighting( ++ int firstc, ++ long count, ++ incsearch_state_T *is_state) ++ { ++ int i; ++ pos_T end_pos; ++ struct cmdline_info save_ccline; ++ #ifdef FEAT_RELTIME ++ proftime_T tm; ++ #endif ++ ++ if (!do_incsearch_highlighting(firstc)) ++ return; ++ ++ // If there is a character waiting, search and redraw later. ++ if (char_avail()) ++ { ++ is_state->incsearch_postponed = TRUE; ++ return; ++ } ++ is_state->incsearch_postponed = FALSE; ++ ++ // start at old position ++ curwin->w_cursor = is_state->search_start; ++ save_last_search_pattern(); ++ ++ // If there is no command line, don't do anything. ++ if (ccline.cmdlen == 0) ++ { ++ i = 0; ++ set_no_hlsearch(TRUE); // turn off previous highlight ++ redraw_all_later(SOME_VALID); ++ } ++ else ++ { ++ int search_flags = SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK; ++ ++ cursor_off(); // so the user knows we're busy ++ out_flush(); ++ ++emsg_off; // so it doesn't beep if bad expr ++ #ifdef FEAT_RELTIME ++ // Set the time limit to half a second. ++ profile_setlimit(500L, &tm); ++ #endif ++ if (!p_hls) ++ search_flags += SEARCH_KEEP; ++ i = do_search(NULL, firstc, ccline.cmdbuff, count, search_flags, ++ #ifdef FEAT_RELTIME ++ &tm, NULL ++ #else ++ NULL, NULL ++ #endif ++ ); ++ --emsg_off; ++ ++ // if interrupted while searching, behave like it failed ++ if (got_int) ++ { ++ (void)vpeekc(); // remove from input stream ++ got_int = FALSE; // don't abandon the command line ++ i = 0; ++ } ++ else if (char_avail()) ++ // cancelled searching because a char was typed ++ is_state->incsearch_postponed = TRUE; ++ } ++ if (i != 0) ++ highlight_match = TRUE; // highlight position ++ else ++ highlight_match = FALSE; // remove highlight ++ ++ // First restore the old curwin values, so the screen is positioned in the ++ // same way as the actual search command. ++ restore_viewstate(&is_state->old_viewstate); ++ changed_cline_bef_curs(); ++ update_topline(); ++ ++ if (i != 0) ++ { ++ pos_T save_pos = curwin->w_cursor; ++ ++ is_state->match_start = curwin->w_cursor; ++ set_search_match(&curwin->w_cursor); ++ validate_cursor(); ++ end_pos = curwin->w_cursor; ++ is_state->match_end = end_pos; ++ curwin->w_cursor = save_pos; ++ } ++ else ++ end_pos = curwin->w_cursor; // shutup gcc 4 ++ ++ // Disable 'hlsearch' highlighting if the pattern matches everything. ++ // Avoids a flash when typing "foo\|". ++ if (empty_pattern(ccline.cmdbuff)) ++ set_no_hlsearch(TRUE); ++ ++ validate_cursor(); ++ // May redraw the status line to show the cursor position. ++ if (p_ru && curwin->w_status_height > 0) ++ curwin->w_redr_status = TRUE; ++ ++ save_cmdline(&save_ccline); ++ update_screen(SOME_VALID); ++ restore_cmdline(&save_ccline); ++ restore_last_search_pattern(); ++ ++ // Leave it at the end to make CTRL-R CTRL-W work. ++ if (i != 0) ++ curwin->w_cursor = end_pos; ++ ++ msg_starthere(); ++ redrawcmdline(); ++ is_state->did_incsearch = TRUE; ++ } ++ ++ /* ++ * May adjust 'incsearch' highlighting for typing CTRL-G and CTRL-T, go to next ++ * or previous match. ++ * Returns FAIL when jumping to cmdline_not_changed; ++ */ ++ static int ++ may_adjust_incsearch_highlighting( ++ int firstc, ++ long count, ++ incsearch_state_T *is_state, ++ int c) ++ { ++ pos_T t; ++ char_u *pat; ++ int search_flags = SEARCH_NOOF; ++ int i; ++ ++ if (!do_incsearch_highlighting(firstc)) ++ return OK; ++ if (ccline.cmdlen == 0) ++ return FAIL; ++ ++ if (firstc == ccline.cmdbuff[0]) ++ pat = last_search_pattern(); ++ else ++ pat = ccline.cmdbuff; ++ ++ save_last_search_pattern(); ++ cursor_off(); ++ out_flush(); ++ if (c == Ctrl_G) ++ { ++ t = is_state->match_end; ++ if (LT_POS(is_state->match_start, is_state->match_end)) ++ // Start searching at the end of the match not at the beginning of ++ // the next column. ++ (void)decl(&t); ++ search_flags += SEARCH_COL; ++ } ++ else ++ t = is_state->match_start; ++ if (!p_hls) ++ search_flags += SEARCH_KEEP; ++ ++emsg_off; ++ i = searchit(curwin, curbuf, &t, ++ c == Ctrl_G ? FORWARD : BACKWARD, ++ pat, count, search_flags, ++ RE_SEARCH, 0, NULL, NULL); ++ --emsg_off; ++ if (i) ++ { ++ is_state->search_start = is_state->match_start; ++ is_state->match_end = t; ++ is_state->match_start = t; ++ if (c == Ctrl_T && firstc == '/') ++ { ++ // Move just before the current match, so that when nv_search ++ // finishes the cursor will be put back on the match. ++ is_state->search_start = t; ++ (void)decl(&is_state->search_start); ++ } ++ else if (c == Ctrl_G && firstc == '?') ++ { ++ // Move just after the current match, so that when nv_search ++ // finishes the cursor will be put back on the match. ++ is_state->search_start = t; ++ (void)incl(&is_state->search_start); ++ } ++ if (LT_POS(t, is_state->search_start) && c == Ctrl_G) ++ { ++ // wrap around ++ is_state->search_start = t; ++ if (firstc == '?') ++ (void)incl(&is_state->search_start); ++ else ++ (void)decl(&is_state->search_start); ++ } ++ ++ set_search_match(&is_state->match_end); ++ curwin->w_cursor = is_state->match_start; ++ changed_cline_bef_curs(); ++ update_topline(); ++ validate_cursor(); ++ highlight_match = TRUE; ++ save_viewstate(&is_state->old_viewstate); ++ update_screen(NOT_VALID); ++ redrawcmdline(); ++ } ++ else ++ vim_beep(BO_ERROR); ++ restore_last_search_pattern(); ++ return FAIL; ++ } ++ ++ /* ++ * When CTRL-L typed: add character from the match to the pattern. ++ * May set "*c" to the added character. ++ * Return OK when jumping to cmdline_not_changed. ++ */ ++ static int ++ may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state) ++ { ++ if (!do_incsearch_highlighting(firstc)) ++ return FAIL; ++ ++ // Add a character from under the cursor for 'incsearch'. ++ if (is_state->did_incsearch) ++ { ++ curwin->w_cursor = is_state->match_end; ++ if (!EQUAL_POS(curwin->w_cursor, is_state->search_start)) ++ { ++ *c = gchar_cursor(); ++ ++ // If 'ignorecase' and 'smartcase' are set and the ++ // command line has no uppercase characters, convert ++ // the character to lowercase. ++ if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff)) ++ *c = MB_TOLOWER(*c); ++ if (*c != NUL) ++ { ++ if (*c == firstc || vim_strchr((char_u *)( ++ p_magic ? "\\~^$.*[" : "\\^$"), *c) != NULL) ++ { ++ // put a backslash before special characters ++ stuffcharReadbuff(*c); ++ *c = '\\'; ++ } ++ return FAIL; ++ } ++ } ++ } ++ return OK; ++ } ++ ++ static void ++ finish_incsearch_highlighting(int gotesc, incsearch_state_T *is_state) ++ { ++ if (is_state->did_incsearch) ++ { ++ if (gotesc) ++ curwin->w_cursor = is_state->save_cursor; ++ else ++ { ++ if (!EQUAL_POS(is_state->save_cursor, is_state->search_start)) ++ { ++ // put the '" mark at the original position ++ curwin->w_cursor = is_state->save_cursor; ++ setpcmark(); ++ } ++ curwin->w_cursor = is_state->search_start; ++ } ++ restore_viewstate(&is_state->old_viewstate); ++ highlight_match = FALSE; ++ validate_cursor(); /* needed for TAB */ ++ redraw_all_later(SOME_VALID); ++ } ++ } + #endif + + /* +*************** +*** 262,275 **** + int histype; /* history type to be used */ + #endif + #ifdef FEAT_SEARCH_EXTRA +! pos_T search_start; /* where 'incsearch' starts searching */ +! pos_T save_cursor; +! viewstate_T init_viewstate; +! viewstate_T old_viewstate; +! pos_T match_start = curwin->w_cursor; +! pos_T match_end; +! int did_incsearch = FALSE; +! int incsearch_postponed = FALSE; + #endif + int did_wild_list = FALSE; /* did wild_list() recently */ + int wim_index = 0; /* index in wim_flags[] */ +--- 586,592 ---- + int histype; /* history type to be used */ + #endif + #ifdef FEAT_SEARCH_EXTRA +! incsearch_state_T is_state; + #endif + int did_wild_list = FALSE; /* did wild_list() recently */ + int wim_index = 0; /* index in wim_flags[] */ +*************** +*** 287,293 **** + #endif + expand_T xpc; + long *b_im_ptr = NULL; +! #if defined(FEAT_WILDMENU) || defined(FEAT_EVAL) || defined(FEAT_SEARCH_EXTRA) + /* Everything that may work recursively should save and restore the + * current command line in save_ccline. That includes update_screen(), a + * custom status line may invoke ":normal". */ +--- 604,610 ---- + #endif + expand_T xpc; + long *b_im_ptr = NULL; +! #if defined(FEAT_WILDMENU) || defined(FEAT_EVAL) + /* Everything that may work recursively should save and restore the + * current command line in save_ccline. That includes update_screen(), a + * custom status line may invoke ":normal". */ +*************** +*** 309,320 **** + #endif + + ccline.overstrike = FALSE; /* always start in insert mode */ + #ifdef FEAT_SEARCH_EXTRA +! CLEAR_POS(&match_end); +! save_cursor = curwin->w_cursor; /* may be restored later */ +! search_start = curwin->w_cursor; +! save_viewstate(&init_viewstate); +! save_viewstate(&old_viewstate); + #endif + + /* +--- 626,634 ---- + #endif + + ccline.overstrike = FALSE; /* always start in insert mode */ ++ + #ifdef FEAT_SEARCH_EXTRA +! init_incsearch_state(&is_state); + #endif + + /* +*************** +*** 1089,1098 **** + #ifdef FEAT_SEARCH_EXTRA + if (ccline.cmdlen == 0) + { +! search_start = save_cursor; + /* save view settings, so that the screen + * won't be restored at the wrong position */ +! old_viewstate = init_viewstate; + } + #endif + redrawcmd(); +--- 1403,1412 ---- + #ifdef FEAT_SEARCH_EXTRA + if (ccline.cmdlen == 0) + { +! is_state.search_start = is_state.save_cursor; + /* save view settings, so that the screen + * won't be restored at the wrong position */ +! is_state.old_viewstate = is_state.init_viewstate; + } + #endif + redrawcmd(); +*************** +*** 1121,1127 **** + } + #ifdef FEAT_SEARCH_EXTRA + if (ccline.cmdlen == 0) +! search_start = save_cursor; + #endif + redraw_cmdline = TRUE; + goto returncmd; /* back to cmd mode */ +--- 1435,1441 ---- + } + #ifdef FEAT_SEARCH_EXTRA + if (ccline.cmdlen == 0) +! is_state.search_start = is_state.save_cursor; + #endif + redraw_cmdline = TRUE; + goto returncmd; /* back to cmd mode */ +*************** +*** 1208,1214 **** + ccline.cmdbuff[ccline.cmdlen] = NUL; + #ifdef FEAT_SEARCH_EXTRA + if (ccline.cmdlen == 0) +! search_start = save_cursor; + #endif + redrawcmd(); + goto cmdline_changed; +--- 1522,1528 ---- + ccline.cmdbuff[ccline.cmdlen] = NUL; + #ifdef FEAT_SEARCH_EXTRA + if (ccline.cmdlen == 0) +! is_state.search_start = is_state.save_cursor; + #endif + redrawcmd(); + goto cmdline_changed; +*************** +*** 1545,1582 **** + + case Ctrl_L: + #ifdef FEAT_SEARCH_EXTRA +! if (p_is && !cmd_silent && (firstc == '/' || firstc == '?')) +! { +! /* Add a character from under the cursor for 'incsearch' */ +! if (did_incsearch) +! { +! curwin->w_cursor = match_end; +! if (!EQUAL_POS(curwin->w_cursor, search_start)) +! { +! c = gchar_cursor(); +! /* If 'ignorecase' and 'smartcase' are set and the +! * command line has no uppercase characters, convert +! * the character to lowercase */ +! if (p_ic && p_scs +! && !pat_has_uppercase(ccline.cmdbuff)) +! c = MB_TOLOWER(c); +! if (c != NUL) +! { +! if (c == firstc || vim_strchr((char_u *)( +! p_magic ? "\\~^$.*[" : "\\^$"), c) +! != NULL) +! { +! /* put a backslash before special +! * characters */ +! stuffcharReadbuff(c); +! c = '\\'; +! } +! break; +! } +! } +! } + goto cmdline_not_changed; +- } + #endif + + /* completion: longest common part */ +--- 1859,1866 ---- + + case Ctrl_L: + #ifdef FEAT_SEARCH_EXTRA +! if (may_add_char_to_search(firstc, &c, &is_state) == OK) + goto cmdline_not_changed; + #endif + + /* completion: longest common part */ +*************** +*** 1742,1829 **** + #ifdef FEAT_SEARCH_EXTRA + case Ctrl_G: /* next match */ + case Ctrl_T: /* previous match */ +! if (p_is && !cmd_silent && (firstc == '/' || firstc == '?')) +! { +! pos_T t; +! char_u *pat; +! int search_flags = SEARCH_NOOF; +! +! if (ccline.cmdlen == 0) +! goto cmdline_not_changed; +! +! if (firstc == ccline.cmdbuff[0]) +! pat = last_search_pattern(); +! else +! pat = ccline.cmdbuff; +! +! save_last_search_pattern(); +! cursor_off(); +! out_flush(); +! if (c == Ctrl_G) +! { +! t = match_end; +! if (LT_POS(match_start, match_end)) +! /* start searching at the end of the match +! * not at the beginning of the next column */ +! (void)decl(&t); +! search_flags += SEARCH_COL; +! } +! else +! t = match_start; +! if (!p_hls) +! search_flags += SEARCH_KEEP; +! ++emsg_off; +! i = searchit(curwin, curbuf, &t, +! c == Ctrl_G ? FORWARD : BACKWARD, +! pat, count, search_flags, +! RE_SEARCH, 0, NULL, NULL); +! --emsg_off; +! if (i) +! { +! search_start = match_start; +! match_end = t; +! match_start = t; +! if (c == Ctrl_T && firstc == '/') +! { +! /* move just before the current match, so that +! * when nv_search finishes the cursor will be +! * put back on the match */ +! search_start = t; +! (void)decl(&search_start); +! } +! else if (c == Ctrl_G && firstc == '?') +! { +! /* move just after the current match, so that +! * when nv_search finishes the cursor will be +! * put back on the match */ +! search_start = t; +! (void)incl(&search_start); +! } +! if (LT_POS(t, search_start) && c == Ctrl_G) +! { +! /* wrap around */ +! search_start = t; +! if (firstc == '?') +! (void)incl(&search_start); +! else +! (void)decl(&search_start); +! } +! +! set_search_match(&match_end); +! curwin->w_cursor = match_start; +! changed_cline_bef_curs(); +! update_topline(); +! validate_cursor(); +! highlight_match = TRUE; +! save_viewstate(&old_viewstate); +! update_screen(NOT_VALID); +! redrawcmdline(); +! } +! else +! vim_beep(BO_ERROR); +! restore_last_search_pattern(); + goto cmdline_not_changed; +- } + break; + #endif + +--- 2026,2034 ---- + #ifdef FEAT_SEARCH_EXTRA + case Ctrl_G: /* next match */ + case Ctrl_T: /* previous match */ +! if (may_adjust_incsearch_highlighting( +! firstc, count, &is_state, c) == FAIL) + goto cmdline_not_changed; + break; + #endif + +*************** +*** 1951,1957 **** + */ + cmdline_not_changed: + #ifdef FEAT_SEARCH_EXTRA +! if (!incsearch_postponed) + continue; + #endif + +--- 2156,2162 ---- + */ + cmdline_not_changed: + #ifdef FEAT_SEARCH_EXTRA +! if (!is_state.incsearch_postponed) + continue; + #endif + +*************** +*** 1960,2074 **** + trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED); + + #ifdef FEAT_SEARCH_EXTRA +! /* +! * 'incsearch' highlighting. +! */ +! if (p_is && !cmd_silent && (firstc == '/' || firstc == '?')) +! { +! pos_T end_pos; +! #ifdef FEAT_RELTIME +! proftime_T tm; +! #endif +! +! /* if there is a character waiting, search and redraw later */ +! if (char_avail()) +! { +! incsearch_postponed = TRUE; +! continue; +! } +! incsearch_postponed = FALSE; +! curwin->w_cursor = search_start; /* start at old position */ +! save_last_search_pattern(); +! +! /* If there is no command line, don't do anything */ +! if (ccline.cmdlen == 0) +! { +! i = 0; +! set_no_hlsearch(TRUE); /* turn off previous highlight */ +! redraw_all_later(SOME_VALID); +! } +! else +! { +! int search_flags = SEARCH_OPT + SEARCH_NOOF + SEARCH_PEEK; +! cursor_off(); /* so the user knows we're busy */ +! out_flush(); +! ++emsg_off; /* So it doesn't beep if bad expr */ +! #ifdef FEAT_RELTIME +! /* Set the time limit to half a second. */ +! profile_setlimit(500L, &tm); +! #endif +! if (!p_hls) +! search_flags += SEARCH_KEEP; +! i = do_search(NULL, firstc, ccline.cmdbuff, count, +! search_flags, +! #ifdef FEAT_RELTIME +! &tm, NULL +! #else +! NULL, NULL +! #endif +! ); +! --emsg_off; +! /* if interrupted while searching, behave like it failed */ +! if (got_int) +! { +! (void)vpeekc(); /* remove from input stream */ +! got_int = FALSE; /* don't abandon the command line */ +! i = 0; +! } +! else if (char_avail()) +! /* cancelled searching because a char was typed */ +! incsearch_postponed = TRUE; +! } +! if (i != 0) +! highlight_match = TRUE; /* highlight position */ +! else +! highlight_match = FALSE; /* remove highlight */ +! +! /* first restore the old curwin values, so the screen is +! * positioned in the same way as the actual search command */ +! restore_viewstate(&old_viewstate); +! changed_cline_bef_curs(); +! update_topline(); +! +! if (i != 0) +! { +! pos_T save_pos = curwin->w_cursor; +! +! match_start = curwin->w_cursor; +! set_search_match(&curwin->w_cursor); +! validate_cursor(); +! end_pos = curwin->w_cursor; +! match_end = end_pos; +! curwin->w_cursor = save_pos; +! } +! else +! end_pos = curwin->w_cursor; /* shutup gcc 4 */ +! +! /* Disable 'hlsearch' highlighting if the pattern matches +! * everything. Avoids a flash when typing "foo\|". */ +! if (empty_pattern(ccline.cmdbuff)) +! set_no_hlsearch(TRUE); +! +! validate_cursor(); +! /* May redraw the status line to show the cursor position. */ +! if (p_ru && curwin->w_status_height > 0) +! curwin->w_redr_status = TRUE; +! +! save_cmdline(&save_ccline); +! update_screen(SOME_VALID); +! restore_cmdline(&save_ccline); +! restore_last_search_pattern(); +! +! /* Leave it at the end to make CTRL-R CTRL-W work. */ +! if (i != 0) +! curwin->w_cursor = end_pos; +! +! msg_starthere(); +! redrawcmdline(); +! did_incsearch = TRUE; +! } +! #else /* FEAT_SEARCH_EXTRA */ +! ; + #endif + + #ifdef FEAT_RIGHTLEFT +--- 2165,2171 ---- + trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED); + + #ifdef FEAT_SEARCH_EXTRA +! may_do_incsearch_highlighting(firstc, count, &is_state); + #endif + + #ifdef FEAT_RIGHTLEFT +*************** +*** 2100,2124 **** + ccline.xpc = NULL; + + #ifdef FEAT_SEARCH_EXTRA +! if (did_incsearch) +! { +! if (gotesc) +! curwin->w_cursor = save_cursor; +! else +! { +! if (!EQUAL_POS(save_cursor, search_start)) +! { +! /* put the '" mark at the original position */ +! curwin->w_cursor = save_cursor; +! setpcmark(); +! } +! curwin->w_cursor = search_start; +! } +! restore_viewstate(&old_viewstate); +! highlight_match = FALSE; +! validate_cursor(); /* needed for TAB */ +! redraw_all_later(SOME_VALID); +! } + #endif + + if (ccline.cmdbuff != NULL) +--- 2197,2203 ---- + ccline.xpc = NULL; + + #ifdef FEAT_SEARCH_EXTRA +! finish_incsearch_highlighting(gotesc, &is_state); + #endif + + if (ccline.cmdbuff != NULL) +*************** +*** 7239,7259 **** + + return (char_u *)ga.ga_data; + } +- +- #ifdef FEAT_SEARCH_EXTRA +- static void +- set_search_match(pos_T *t) +- { +- /* +- * First move cursor to end of match, then to the start. This +- * moves the whole match onto the screen when 'nowrap' is set. +- */ +- t->lnum += search_match_lines; +- t->col = search_match_endcol; +- if (t->lnum > curbuf->b_ml.ml_line_count) +- { +- t->lnum = curbuf->b_ml.ml_line_count; +- coladvance((colnr_T)MAXCOL); +- } +- } +- #endif +--- 7318,7320 ---- +*** ../vim-8.1.0264/src/version.c 2018-08-09 22:26:34.259501130 +0200 +--- src/version.c 2018-08-10 22:07:22.817944576 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 265, + /**/ + +-- +Sorry, no fortune today. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0266 b/data/vim/patches/8.1.0266 new file mode 100644 index 000000000..5ba3a1286 --- /dev/null +++ b/data/vim/patches/8.1.0266 @@ -0,0 +1,436 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0266 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0266 +Problem: Parsing Ex address range is not a separate function. +Solution: Refactor do_one_cmd() to separate address parsing. +Files: src/ex_docmd.c, src/proto/ex_docmd.pro + + +*** ../vim-8.1.0265/src/ex_docmd.c 2018-08-07 22:30:26.670240840 +0200 +--- src/ex_docmd.c 2018-08-10 23:08:38.139696671 +0200 +*************** +*** 1719,1725 **** + cmdmod_T save_cmdmod; + int ni; /* set when Not Implemented */ + char_u *cmd; +- int address_count = 1; + + vim_memset(&ea, 0, sizeof(ea)); + ea.line1 = 1; +--- 1719,1724 ---- +*************** +*** 2045,2212 **** + get_wincmd_addr_type(skipwhite(p), &ea); + } + +- /* repeat for all ',' or ';' separated addresses */ + ea.cmd = cmd; +! for (;;) +! { +! ea.line1 = ea.line2; +! switch (ea.addr_type) +! { +! case ADDR_LINES: +! /* default is current line number */ +! ea.line2 = curwin->w_cursor.lnum; +! break; +! case ADDR_WINDOWS: +! ea.line2 = CURRENT_WIN_NR; +! break; +! case ADDR_ARGUMENTS: +! ea.line2 = curwin->w_arg_idx + 1; +! if (ea.line2 > ARGCOUNT) +! ea.line2 = ARGCOUNT; +! break; +! case ADDR_LOADED_BUFFERS: +! case ADDR_BUFFERS: +! ea.line2 = curbuf->b_fnum; +! break; +! case ADDR_TABS: +! ea.line2 = CURRENT_TAB_NR; +! break; +! case ADDR_TABS_RELATIVE: +! ea.line2 = 1; +! break; +! #ifdef FEAT_QUICKFIX +! case ADDR_QUICKFIX: +! ea.line2 = qf_get_cur_valid_idx(&ea); +! break; +! #endif +! } +! ea.cmd = skipwhite(ea.cmd); +! lnum = get_address(&ea, &ea.cmd, ea.addr_type, ea.skip, +! ea.addr_count == 0, address_count++); +! if (ea.cmd == NULL) /* error detected */ +! goto doend; +! if (lnum == MAXLNUM) +! { +! if (*ea.cmd == '%') /* '%' - all lines */ +! { +! ++ea.cmd; +! switch (ea.addr_type) +! { +! case ADDR_LINES: +! ea.line1 = 1; +! ea.line2 = curbuf->b_ml.ml_line_count; +! break; +! case ADDR_LOADED_BUFFERS: +! { +! buf_T *buf = firstbuf; +! +! while (buf->b_next != NULL +! && buf->b_ml.ml_mfp == NULL) +! buf = buf->b_next; +! ea.line1 = buf->b_fnum; +! buf = lastbuf; +! while (buf->b_prev != NULL +! && buf->b_ml.ml_mfp == NULL) +! buf = buf->b_prev; +! ea.line2 = buf->b_fnum; +! break; +! } +! case ADDR_BUFFERS: +! ea.line1 = firstbuf->b_fnum; +! ea.line2 = lastbuf->b_fnum; +! break; +! case ADDR_WINDOWS: +! case ADDR_TABS: +! if (IS_USER_CMDIDX(ea.cmdidx)) +! { +! ea.line1 = 1; +! ea.line2 = ea.addr_type == ADDR_WINDOWS +! ? LAST_WIN_NR : LAST_TAB_NR; +! } +! else +! { +! /* there is no Vim command which uses '%' and +! * ADDR_WINDOWS or ADDR_TABS */ +! errormsg = (char_u *)_(e_invrange); +! goto doend; +! } +! break; +! case ADDR_TABS_RELATIVE: +! errormsg = (char_u *)_(e_invrange); +! goto doend; +! break; +! case ADDR_ARGUMENTS: +! if (ARGCOUNT == 0) +! ea.line1 = ea.line2 = 0; +! else +! { +! ea.line1 = 1; +! ea.line2 = ARGCOUNT; +! } +! break; +! #ifdef FEAT_QUICKFIX +! case ADDR_QUICKFIX: +! ea.line1 = 1; +! ea.line2 = qf_get_size(&ea); +! if (ea.line2 == 0) +! ea.line2 = 1; +! break; +! #endif +! } +! ++ea.addr_count; +! } +! /* '*' - visual area */ +! else if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL) +! { +! pos_T *fp; +! +! if (ea.addr_type != ADDR_LINES) +! { +! errormsg = (char_u *)_(e_invrange); +! goto doend; +! } +! +! ++ea.cmd; +! if (!ea.skip) +! { +! fp = getmark('<', FALSE); +! if (check_mark(fp) == FAIL) +! goto doend; +! ea.line1 = fp->lnum; +! fp = getmark('>', FALSE); +! if (check_mark(fp) == FAIL) +! goto doend; +! ea.line2 = fp->lnum; +! ++ea.addr_count; +! } +! } +! } +! else +! ea.line2 = lnum; +! ea.addr_count++; +! +! if (*ea.cmd == ';') +! { +! if (!ea.skip) +! { +! curwin->w_cursor.lnum = ea.line2; +! /* don't leave the cursor on an illegal line or column */ +! check_cursor(); +! } +! } +! else if (*ea.cmd != ',') +! break; +! ++ea.cmd; +! } +! +! /* One address given: set start and end lines */ +! if (ea.addr_count == 1) +! { +! ea.line1 = ea.line2; +! /* ... but only implicit: really no address given */ +! if (lnum == MAXLNUM) +! ea.addr_count = 0; +! } + + /* + * 5. Parse the command. +--- 2044,2052 ---- + get_wincmd_addr_type(skipwhite(p), &ea); + } + + ea.cmd = cmd; +! if (parse_cmd_address(&ea, &errormsg) == FAIL) +! goto doend; + + /* + * 5. Parse the command. +*************** +*** 2989,2994 **** +--- 2829,3007 ---- + #endif + + /* ++ * Parse the address range, if any, in "eap". ++ * Return FAIL and set "errormsg" or return OK. ++ */ ++ int ++ parse_cmd_address(exarg_T *eap, char_u **errormsg) ++ { ++ int address_count = 1; ++ linenr_T lnum; ++ ++ // Repeat for all ',' or ';' separated addresses. ++ for (;;) ++ { ++ eap->line1 = eap->line2; ++ switch (eap->addr_type) ++ { ++ case ADDR_LINES: ++ // default is current line number ++ eap->line2 = curwin->w_cursor.lnum; ++ break; ++ case ADDR_WINDOWS: ++ eap->line2 = CURRENT_WIN_NR; ++ break; ++ case ADDR_ARGUMENTS: ++ eap->line2 = curwin->w_arg_idx + 1; ++ if (eap->line2 > ARGCOUNT) ++ eap->line2 = ARGCOUNT; ++ break; ++ case ADDR_LOADED_BUFFERS: ++ case ADDR_BUFFERS: ++ eap->line2 = curbuf->b_fnum; ++ break; ++ case ADDR_TABS: ++ eap->line2 = CURRENT_TAB_NR; ++ break; ++ case ADDR_TABS_RELATIVE: ++ eap->line2 = 1; ++ break; ++ #ifdef FEAT_QUICKFIX ++ case ADDR_QUICKFIX: ++ eap->line2 = qf_get_cur_valid_idx(eap); ++ break; ++ #endif ++ } ++ eap->cmd = skipwhite(eap->cmd); ++ lnum = get_address(eap, &eap->cmd, eap->addr_type, eap->skip, ++ eap->addr_count == 0, address_count++); ++ if (eap->cmd == NULL) // error detected ++ return FAIL; ++ if (lnum == MAXLNUM) ++ { ++ if (*eap->cmd == '%') // '%' - all lines ++ { ++ ++eap->cmd; ++ switch (eap->addr_type) ++ { ++ case ADDR_LINES: ++ eap->line1 = 1; ++ eap->line2 = curbuf->b_ml.ml_line_count; ++ break; ++ case ADDR_LOADED_BUFFERS: ++ { ++ buf_T *buf = firstbuf; ++ ++ while (buf->b_next != NULL ++ && buf->b_ml.ml_mfp == NULL) ++ buf = buf->b_next; ++ eap->line1 = buf->b_fnum; ++ buf = lastbuf; ++ while (buf->b_prev != NULL ++ && buf->b_ml.ml_mfp == NULL) ++ buf = buf->b_prev; ++ eap->line2 = buf->b_fnum; ++ break; ++ } ++ case ADDR_BUFFERS: ++ eap->line1 = firstbuf->b_fnum; ++ eap->line2 = lastbuf->b_fnum; ++ break; ++ case ADDR_WINDOWS: ++ case ADDR_TABS: ++ if (IS_USER_CMDIDX(eap->cmdidx)) ++ { ++ eap->line1 = 1; ++ eap->line2 = eap->addr_type == ADDR_WINDOWS ++ ? LAST_WIN_NR : LAST_TAB_NR; ++ } ++ else ++ { ++ // there is no Vim command which uses '%' and ++ // ADDR_WINDOWS or ADDR_TABS ++ *errormsg = (char_u *)_(e_invrange); ++ return FAIL; ++ } ++ break; ++ case ADDR_TABS_RELATIVE: ++ *errormsg = (char_u *)_(e_invrange); ++ return FAIL; ++ case ADDR_ARGUMENTS: ++ if (ARGCOUNT == 0) ++ eap->line1 = eap->line2 = 0; ++ else ++ { ++ eap->line1 = 1; ++ eap->line2 = ARGCOUNT; ++ } ++ break; ++ #ifdef FEAT_QUICKFIX ++ case ADDR_QUICKFIX: ++ eap->line1 = 1; ++ eap->line2 = qf_get_size(eap); ++ if (eap->line2 == 0) ++ eap->line2 = 1; ++ break; ++ #endif ++ } ++ ++eap->addr_count; ++ } ++ else if (*eap->cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL) ++ { ++ pos_T *fp; ++ ++ // '*' - visual area ++ if (eap->addr_type != ADDR_LINES) ++ { ++ *errormsg = (char_u *)_(e_invrange); ++ return FAIL; ++ } ++ ++ ++eap->cmd; ++ if (!eap->skip) ++ { ++ fp = getmark('<', FALSE); ++ if (check_mark(fp) == FAIL) ++ return FAIL; ++ eap->line1 = fp->lnum; ++ fp = getmark('>', FALSE); ++ if (check_mark(fp) == FAIL) ++ return FAIL; ++ eap->line2 = fp->lnum; ++ ++eap->addr_count; ++ } ++ } ++ } ++ else ++ eap->line2 = lnum; ++ eap->addr_count++; ++ ++ if (*eap->cmd == ';') ++ { ++ if (!eap->skip) ++ { ++ curwin->w_cursor.lnum = eap->line2; ++ // don't leave the cursor on an illegal line or column ++ check_cursor(); ++ } ++ } ++ else if (*eap->cmd != ',') ++ break; ++ ++eap->cmd; ++ } ++ ++ // One address given: set start and end lines. ++ if (eap->addr_count == 1) ++ { ++ eap->line1 = eap->line2; ++ // ... but only implicit: really no address given ++ if (lnum == MAXLNUM) ++ eap->addr_count = 0; ++ } ++ return OK; ++ } ++ ++ /* + * Check for an Ex command with optional tail. + * If there is a match advance "pp" to the argument and return TRUE. + */ +*************** +*** 4292,4298 **** + } + + /* +! * skip a range specifier of the form: addr [,addr] [;addr] .. + * + * Backslashed delimiters after / or ? will be skipped, and commands will + * not be expanded between /'s and ?'s or after "'". +--- 4305,4311 ---- + } + + /* +! * Skip a range specifier of the form: addr [,addr] [;addr] .. + * + * Backslashed delimiters after / or ? will be skipped, and commands will + * not be expanded between /'s and ?'s or after "'". +*** ../vim-8.1.0265/src/proto/ex_docmd.pro 2018-07-29 17:35:19.493750319 +0200 +--- src/proto/ex_docmd.pro 2018-08-10 23:08:41.983672969 +0200 +*************** +*** 4,9 **** +--- 4,10 ---- + int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags); + int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int)); + void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie); ++ int parse_cmd_address(exarg_T *eap, char_u **errormsg); + int checkforcmd(char_u **pp, char *cmd, int len); + int modifier_len(char_u *cmd); + int cmd_exists(char_u *name); +*** ../vim-8.1.0265/src/version.c 2018-08-10 22:07:28.821903829 +0200 +--- src/version.c 2018-08-10 22:39:25.770183225 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 266, + /**/ + +-- +Permission is granted to read this message out aloud on Kings Cross Road, +London, under the condition that the orator is properly dressed. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0267 b/data/vim/patches/8.1.0267 new file mode 100644 index 000000000..7d332c333 --- /dev/null +++ b/data/vim/patches/8.1.0267 @@ -0,0 +1,140 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0267 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0267 +Problem: No good check if restoring quickfix list worked. +Solution: Let qf_restore_list() return OK/FAIL. (Yegappan Lakshmanan) +Files: src/quickfix.c + + +*** ../vim-8.1.0266/src/quickfix.c 2018-08-09 21:52:20.716362389 +0200 +--- src/quickfix.c 2018-08-11 13:35:15.874757811 +0200 +*************** +*** 4338,4345 **** + * If the current list is not "save_qfid" and we can find the list with that ID + * then make it the current list. + * This is used when autocommands may have changed the current list. + */ +! static void + qf_restore_list(qf_info_T *qi, int_u save_qfid) + { + int curlist; +--- 4338,4347 ---- + * If the current list is not "save_qfid" and we can find the list with that ID + * then make it the current list. + * This is used when autocommands may have changed the current list. ++ * Returns OK if successfully restored the list. Returns FAIL if the list with ++ * the specified identifier (save_qfid) is not found in the stack. + */ +! static int + qf_restore_list(qf_info_T *qi, int_u save_qfid) + { + int curlist; +*************** +*** 4347,4356 **** + if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) + { + curlist = qf_id2nr(qi, save_qfid); +! if (curlist >= 0) +! qi->qf_curlist = curlist; +! // else: what if the list can't be found? + } + } + + /* +--- 4349,4360 ---- + if (qi->qf_lists[qi->qf_curlist].qf_id != save_qfid) + { + curlist = qf_id2nr(qi, save_qfid); +! if (curlist < 0) +! // list is not present +! return FAIL; +! qi->qf_curlist = curlist; + } ++ return OK; + } + + /* +*************** +*** 4359,4367 **** + static void + qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit) + { +! qf_restore_list(qi, save_qfid); + +! // Autocommands might have cleared the list, check for it + if (!qf_list_empty(qi, qi->qf_curlist)) + qf_jump(qi, 0, 0, forceit); + } +--- 4363,4372 ---- + static void + qf_jump_first(qf_info_T *qi, int_u save_qfid, int forceit) + { +! if (qf_restore_list(qi, save_qfid) == FAIL) +! return; + +! // Autocommands might have cleared the list, check for that. + if (!qf_list_empty(qi, qi->qf_curlist)) + qf_jump(qi, 0, 0, forceit); + } +*************** +*** 5025,5031 **** + } + } + +! qf_restore_list(qi, qfid); + + return TRUE; + } +--- 5030,5037 ---- + } + } + +! if (qf_restore_list(qi, qfid) == FAIL) +! return FALSE; + + return TRUE; + } +*************** +*** 5371,5377 **** + if (!qflist_valid(wp, save_qfid)) + goto theend; + +! qf_restore_list(qi, save_qfid); + + /* Jump to first match. */ + if (!qf_list_empty(qi, qi->qf_curlist)) +--- 5377,5384 ---- + if (!qflist_valid(wp, save_qfid)) + goto theend; + +! if (qf_restore_list(qi, save_qfid) == FAIL) +! goto theend; + + /* Jump to first match. */ + if (!qf_list_empty(qi, qi->qf_curlist)) +*** ../vim-8.1.0266/src/version.c 2018-08-10 23:13:07.934024645 +0200 +--- src/version.c 2018-08-11 13:32:28.919832152 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 267, + /**/ + +-- +BRIDGEKEEPER: What is your favorite editor? +GAWAIN: Emacs ... No, Viiiiiiiiiiimmmmmmm! + "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0268 b/data/vim/patches/8.1.0268 new file mode 100644 index 000000000..5776b5d7a --- /dev/null +++ b/data/vim/patches/8.1.0268 @@ -0,0 +1,380 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0268 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0268 +Problem: File type checking has too many #ifdef. +Solution: Always define the S_IF macros. (Ken Takata, closes #3306) +Files: src/buffer.c, src/evalfunc.c, src/fileio.c, src/if_cscope.c, + src/os_unix.c, src/os_unix.h, src/vim.h + + +*** ../vim-8.1.0267/src/buffer.c 2018-08-07 22:30:26.670240840 +0200 +--- src/buffer.c 2018-08-11 13:48:31.531925854 +0200 +*************** +*** 204,216 **** + #endif + #ifdef UNIX + perm = mch_getperm(curbuf->b_ffname); +! if (perm >= 0 && (0 +! # ifdef S_ISFIFO +! || S_ISFIFO(perm) +! # endif +! # ifdef S_ISSOCK + || S_ISSOCK(perm) +- # endif + # ifdef OPEN_CHR_FILES + || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname)) + # endif +--- 204,211 ---- + #endif + #ifdef UNIX + perm = mch_getperm(curbuf->b_ffname); +! if (perm >= 0 && (S_ISFIFO(perm) + || S_ISSOCK(perm) + # ifdef OPEN_CHR_FILES + || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname)) + # endif +*** ../vim-8.1.0267/src/evalfunc.c 2018-08-09 22:08:53.017560100 +0200 +--- src/evalfunc.c 2018-08-11 13:48:31.535925823 +0200 +*************** +*** 5088,5150 **** + rettv->v_type = VAR_STRING; + if (mch_lstat((char *)fname, &st) >= 0) + { +- #ifdef S_ISREG + if (S_ISREG(st.st_mode)) + t = "file"; + else if (S_ISDIR(st.st_mode)) + t = "dir"; +- # ifdef S_ISLNK + else if (S_ISLNK(st.st_mode)) + t = "link"; +- # endif +- # ifdef S_ISBLK + else if (S_ISBLK(st.st_mode)) + t = "bdev"; +- # endif +- # ifdef S_ISCHR + else if (S_ISCHR(st.st_mode)) + t = "cdev"; +- # endif +- # ifdef S_ISFIFO + else if (S_ISFIFO(st.st_mode)) + t = "fifo"; +- # endif +- # ifdef S_ISSOCK + else if (S_ISSOCK(st.st_mode)) + t = "socket"; +- # endif + else + t = "other"; +- #else +- # ifdef S_IFMT +- switch (st.st_mode & S_IFMT) +- { +- case S_IFREG: t = "file"; break; +- case S_IFDIR: t = "dir"; break; +- # ifdef S_IFLNK +- case S_IFLNK: t = "link"; break; +- # endif +- # ifdef S_IFBLK +- case S_IFBLK: t = "bdev"; break; +- # endif +- # ifdef S_IFCHR +- case S_IFCHR: t = "cdev"; break; +- # endif +- # ifdef S_IFIFO +- case S_IFIFO: t = "fifo"; break; +- # endif +- # ifdef S_IFSOCK +- case S_IFSOCK: t = "socket"; break; +- # endif +- default: t = "other"; +- } +- # else +- if (mch_isdir(fname)) +- t = "dir"; +- else +- t = "file"; +- # endif +- #endif + type = vim_strsave((char_u *)t); + } + rettv->vval.v_string = type; +--- 5088,5109 ---- +*** ../vim-8.1.0267/src/fileio.c 2018-08-07 21:39:09.247060119 +0200 +--- src/fileio.c 2018-08-11 13:48:31.535925823 +0200 +*************** +*** 424,435 **** + */ + perm = mch_getperm(fname); + if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */ +- # ifdef S_ISFIFO + && !S_ISFIFO(perm) /* ... or fifo */ +- # endif +- # ifdef S_ISSOCK + && !S_ISSOCK(perm) /* ... or socket */ +- # endif + # ifdef OPEN_CHR_FILES + && !(S_ISCHR(perm) && is_dev_fd_file(fname)) + /* ... or a character special file named /dev/fd/ */ +--- 424,431 ---- +*************** +*** 2497,2524 **** + c = FALSE; + + #ifdef UNIX +! # ifdef S_ISFIFO +! if (S_ISFIFO(perm)) /* fifo or socket */ +! { +! STRCAT(IObuff, _("[fifo/socket]")); +! c = TRUE; +! } +! # else +! # ifdef S_IFIFO +! if ((perm & S_IFMT) == S_IFIFO) /* fifo */ + { + STRCAT(IObuff, _("[fifo]")); + c = TRUE; + } +! # endif +! # ifdef S_IFSOCK +! if ((perm & S_IFMT) == S_IFSOCK) /* or socket */ + { + STRCAT(IObuff, _("[socket]")); + c = TRUE; + } +- # endif +- # endif + # ifdef OPEN_CHR_FILES + if (S_ISCHR(perm)) /* or character special */ + { +--- 2493,2508 ---- + c = FALSE; + + #ifdef UNIX +! if (S_ISFIFO(perm)) /* fifo */ + { + STRCAT(IObuff, _("[fifo]")); + c = TRUE; + } +! if (S_ISSOCK(perm)) /* or socket */ + { + STRCAT(IObuff, _("[socket]")); + c = TRUE; + } + # ifdef OPEN_CHR_FILES + if (S_ISCHR(perm)) /* or character special */ + { +*** ../vim-8.1.0267/src/if_cscope.c 2018-07-25 21:19:09.363656976 +0200 +--- src/if_cscope.c 2018-08-11 13:48:31.539925791 +0200 +*************** +*** 550,556 **** + } + + /* if filename is a directory, append the cscope database name to it */ +! if ((statbuf.st_mode & S_IFMT) == S_IFDIR) + { + fname2 = (char *)alloc((unsigned)(strlen(CSCOPE_DBFILE) + strlen(fname) + 2)); + if (fname2 == NULL) +--- 550,556 ---- + } + + /* if filename is a directory, append the cscope database name to it */ +! if (S_ISDIR(statbuf.st_mode)) + { + fname2 = (char *)alloc((unsigned)(strlen(CSCOPE_DBFILE) + strlen(fname) + 2)); + if (fname2 == NULL) +*************** +*** 581,592 **** + + i = cs_insert_filelist(fname2, ppath, flags, &statbuf); + } +- #if defined(UNIX) + else if (S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode)) +- #else +- /* WIN32 - substitute define S_ISREG from os_unix.h */ +- else if (((statbuf.st_mode) & S_IFMT) == S_IFREG) +- #endif + { + i = cs_insert_filelist(fname, ppath, flags, &statbuf); + } +--- 581,587 ---- +*** ../vim-8.1.0267/src/os_unix.c 2018-08-07 22:30:26.666240863 +0200 +--- src/os_unix.c 2018-08-11 13:48:31.539925791 +0200 +*************** +*** 3138,3148 **** + return FALSE; + if (stat((char *)name, &statb)) + return FALSE; +- #ifdef _POSIX_SOURCE + return (S_ISDIR(statb.st_mode) ? TRUE : FALSE); +- #else +- return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE); +- #endif + } + + /* +--- 3138,3144 ---- +*************** +*** 3159,3169 **** + return FALSE; + if (mch_lstat((char *)name, &statb)) + return FALSE; +- #ifdef _POSIX_SOURCE + return (S_ISDIR(statb.st_mode) ? TRUE : FALSE); +- #else +- return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE); +- #endif + } + + static int executable_file(char_u *name); +--- 3155,3161 ---- +*** ../vim-8.1.0267/src/os_unix.h 2018-02-28 23:12:59.000000000 +0100 +--- src/os_unix.h 2018-08-11 13:48:31.539925791 +0200 +*************** +*** 458,482 **** + # endif + #endif + +- #if !defined(S_ISDIR) && defined(S_IFDIR) +- # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +- #endif +- #if !defined(S_ISREG) && defined(S_IFREG) +- # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +- #endif +- #if !defined(S_ISBLK) && defined(S_IFBLK) +- # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +- #endif +- #if !defined(S_ISSOCK) && defined(S_IFSOCK) +- # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +- #endif +- #if !defined(S_ISFIFO) && defined(S_IFIFO) +- # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +- #endif +- #if !defined(S_ISCHR) && defined(S_IFCHR) +- # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +- #endif +- + /* Note: Some systems need both string.h and strings.h (Savage). However, + * some systems can't handle both, only use string.h in that case. */ + #ifdef HAVE_STRING_H +--- 458,463 ---- +*** ../vim-8.1.0267/src/vim.h 2018-08-07 22:42:48.965416564 +0200 +--- src/vim.h 2018-08-11 13:48:31.539925791 +0200 +*************** +*** 2290,2304 **** + + #endif + +- /* ISSYMLINK(mode) tests if a file is a symbolic link. */ +- #if (defined(S_IFMT) && defined(S_IFLNK)) || defined(S_ISLNK) +- # define HAVE_ISSYMLINK +- # if defined(S_IFMT) && defined(S_IFLNK) +- # define ISSYMLINK(mode) (((mode) & S_IFMT) == S_IFLNK) +- # else +- # define ISSYMLINK(mode) S_ISLNK(mode) +- # endif +- #endif + + #define SIGN_BYTE 1 /* byte value used where sign is displayed; + attribute value is sign type */ +--- 2290,2295 ---- +*************** +*** 2517,2526 **** + + /* BSD is supposed to cover FreeBSD and similar systems. */ + #if (defined(SUN_SYSTEM) || defined(BSD) || defined(__FreeBSD_kernel__)) \ +! && defined(S_ISCHR) + # define OPEN_CHR_FILES + #endif + + #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) + # define ELAPSED_TIMEVAL + # define ELAPSED_INIT(v) gettimeofday(&v, NULL) +--- 2508,2568 ---- + + /* BSD is supposed to cover FreeBSD and similar systems. */ + #if (defined(SUN_SYSTEM) || defined(BSD) || defined(__FreeBSD_kernel__)) \ +! && (defined(S_ISCHR) || defined(S_IFCHR)) + # define OPEN_CHR_FILES + #endif + ++ /* stat macros */ ++ #ifndef S_ISDIR ++ # ifdef S_IFDIR ++ # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) ++ # else ++ # define S_ISDIR(m) 0 ++ # endif ++ #endif ++ #ifndef S_ISREG ++ # ifdef S_IFREG ++ # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) ++ # else ++ # define S_ISREG(m) 0 ++ # endif ++ #endif ++ #ifndef S_ISBLK ++ # ifdef S_IFBLK ++ # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) ++ # else ++ # define S_ISBLK(m) 0 ++ # endif ++ #endif ++ #ifndef S_ISSOCK ++ # ifdef S_IFSOCK ++ # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) ++ # else ++ # define S_ISSOCK(m) 0 ++ # endif ++ #endif ++ #ifndef S_ISFIFO ++ # ifdef S_IFIFO ++ # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) ++ # else ++ # define S_ISFIFO(m) 0 ++ # endif ++ #endif ++ #ifndef S_ISCHR ++ # ifdef S_IFCHR ++ # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) ++ # else ++ # define S_ISCHR(m) 0 ++ # endif ++ #endif ++ #ifndef S_ISLNK ++ # ifdef S_IFLNK ++ # define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) ++ # else ++ # define S_ISLNK(m) 0 ++ # endif ++ #endif ++ + #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) + # define ELAPSED_TIMEVAL + # define ELAPSED_INIT(v) gettimeofday(&v, NULL) +*** ../vim-8.1.0267/src/version.c 2018-08-11 13:36:51.806140673 +0200 +--- src/version.c 2018-08-11 13:49:48.951318065 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 268, + /**/ + +-- +Q: What kind of stuff do you do? +A: I collect hobbies. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0269 b/data/vim/patches/8.1.0269 new file mode 100644 index 000000000..d516f7c30 --- /dev/null +++ b/data/vim/patches/8.1.0269 @@ -0,0 +1,127 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0269 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0269 +Problem: Ruby Kernel.#p method always returns nil. +Solution: Copy p method implementation from Ruby code. (Masataka Pocke + Kuwabara, closes #3315) +Files: src/if_ruby.c, src/testdir/test_ruby.vim + + +*** ../vim-8.1.0268/src/if_ruby.c 2018-08-04 17:24:39.062825210 +0200 +--- src/if_ruby.c 2018-08-11 14:23:48.613860602 +0200 +*************** +*** 299,304 **** +--- 299,309 ---- + # define rb_string_value_ptr dll_rb_string_value_ptr + # define rb_float_new dll_rb_float_new + # define rb_ary_new dll_rb_ary_new ++ # ifdef rb_ary_new4 ++ # define RB_ARY_NEW4_MACRO 1 ++ # undef rb_ary_new4 ++ # endif ++ # define rb_ary_new4 dll_rb_ary_new4 + # define rb_ary_push dll_rb_ary_push + # if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK) + # ifdef __ia64 +*************** +*** 441,446 **** +--- 446,452 ---- + static char * (*dll_rb_string_value_ptr) (volatile VALUE*); + static VALUE (*dll_rb_float_new) (double); + static VALUE (*dll_rb_ary_new) (void); ++ static VALUE (*dll_rb_ary_new4) (long n, const VALUE *elts); + static VALUE (*dll_rb_ary_push) (VALUE, VALUE); + # if defined(RUBY19_OR_LATER) || defined(RUBY_INIT_STACK) + # ifdef __ia64 +*************** +*** 647,652 **** +--- 653,663 ---- + {"rb_float_new_in_heap", (RUBY_PROC*)&dll_rb_float_new}, + # endif + {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new}, ++ # ifdef RB_ARY_NEW4_MACRO ++ {"rb_ary_new_from_values", (RUBY_PROC*)&dll_rb_ary_new4}, ++ # else ++ {"rb_ary_new4", (RUBY_PROC*)&dll_rb_ary_new4}, ++ # endif + {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push}, + # endif + # ifdef RUBY19_OR_LATER +*************** +*** 1577,1582 **** +--- 1588,1594 ---- + { + int i; + VALUE str = rb_str_new("", 0); ++ VALUE ret = Qnil; + + for (i = 0; i < argc; i++) + { +*************** +*** 1584,1590 **** + rb_str_concat(str, rb_inspect(argv[i])); + } + MSG(RSTRING_PTR(str)); +! return Qnil; + } + + static void ruby_io_init(void) +--- 1596,1607 ---- + rb_str_concat(str, rb_inspect(argv[i])); + } + MSG(RSTRING_PTR(str)); +! +! if (argc == 1) +! ret = argv[0]; +! else if (argc > 1) +! ret = rb_ary_new4(argc, argv); +! return ret; + } + + static void ruby_io_init(void) +*** ../vim-8.1.0268/src/testdir/test_ruby.vim 2018-07-28 17:29:15.757096343 +0200 +--- src/testdir/test_ruby.vim 2018-08-11 14:17:07.396211894 +0200 +*************** +*** 363,366 **** +--- 363,379 ---- + ruby p 'Just a test' + let messages = split(execute('message'), "\n") + call assert_equal('"Just a test"', messages[-1]) ++ ++ " Check return values of p method ++ ++ call assert_equal('123', RubyEval('p(123)')) ++ call assert_equal('[1, 2, 3]', RubyEval('p(1, 2, 3)')) ++ ++ " Avoid the "message maintainer" line. ++ let $LANG = '' ++ messages clear ++ call assert_equal('true', RubyEval('p() == nil')) ++ ++ let messages = split(execute('message'), "\n") ++ call assert_equal(0, len(messages)) + endfunc +*** ../vim-8.1.0268/src/version.c 2018-08-11 13:57:16.215969777 +0200 +--- src/version.c 2018-08-11 14:22:56.922175770 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 269, + /**/ + +-- +SIGFUN -- signature too funny (core dumped) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0270 b/data/vim/patches/8.1.0270 new file mode 100644 index 000000000..63d9e3a86 --- /dev/null +++ b/data/vim/patches/8.1.0270 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0270 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0270 +Problem: Checking for a Tab in a line could be faster. +Solution: Use strchr() instead of strrchr(). (closes #3312) +Files: src/ex_cmds.c + + +*** ../vim-8.1.0269/src/ex_cmds.c 2018-08-02 22:23:53.342591238 +0200 +--- src/ex_cmds.c 2018-08-11 14:39:13.611943727 +0200 +*************** +*** 281,287 **** + *last = NUL; + len = linetabsize(line); /* get line length */ + if (has_tab != NULL) /* check for embedded TAB */ +! *has_tab = (vim_strrchr(first, TAB) != NULL); + *last = save; + + return len; +--- 281,287 ---- + *last = NUL; + len = linetabsize(line); /* get line length */ + if (has_tab != NULL) /* check for embedded TAB */ +! *has_tab = (vim_strchr(first, TAB) != NULL); + *last = save; + + return len; +*** ../vim-8.1.0269/src/version.c 2018-08-11 14:24:06.945748177 +0200 +--- src/version.c 2018-08-11 14:41:05.107212697 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 270, + /**/ + +-- +BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow? +ARTHUR: What do you mean? An African or European swallow? +BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh! + BRIDGEKEEPER is cast into the gorge. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0271 b/data/vim/patches/8.1.0271 new file mode 100644 index 000000000..53b7c4942 --- /dev/null +++ b/data/vim/patches/8.1.0271 @@ -0,0 +1,489 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0271 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0271 +Problem: 'incsearch' doesn't work for :s, :g or :v. +Solution: Also use 'incsearch' for other commands that use a pattern. +Files: src/ex_getln.c, src/globals.h, src/screen.c, + src/testdir/test_search.vim + + +*** ../vim-8.1.0270/src/ex_getln.c 2018-08-10 22:07:28.821903829 +0200 +--- src/ex_getln.c 2018-08-11 16:16:52.578317070 +0200 +*************** +*** 264,274 **** + + /* + * Return TRUE when 'incsearch' highlighting is to be done. + */ + static int +! do_incsearch_highlighting(int firstc) + { +! return p_is && !cmd_silent && (firstc == '/' || firstc == '?'); + } + + /* +--- 264,341 ---- + + /* + * Return TRUE when 'incsearch' highlighting is to be done. ++ * Sets search_first_line and search_last_line to the address range. + */ + static int +! do_incsearch_highlighting(int firstc, incsearch_state_T *is_state, +! int *skiplen, int *patlen) + { +! *skiplen = 0; +! *patlen = ccline.cmdlen; +! +! if (p_is && !cmd_silent) +! { +! // by default search all lines +! search_first_line = 0; +! search_last_line = MAXLNUM; +! +! if (firstc == '/' || firstc == '?') +! return TRUE; +! if (firstc == ':') +! { +! char_u *cmd = skip_range(ccline.cmdbuff, NULL); +! char_u *p; +! int delim; +! char_u *end; +! +! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v') +! { +! // Skip over "substitute" to find the pattern separator. +! for (p = cmd; ASCII_ISALPHA(*p); ++p) +! ; +! if (*p != NUL) +! { +! delim = *p++; +! end = skip_regexp(p, delim, p_magic, NULL); +! if (end > p) +! { +! char_u *dummy; +! exarg_T ea; +! pos_T save_cursor = curwin->w_cursor; +! +! // found a non-empty pattern +! *skiplen = (int)(p - ccline.cmdbuff); +! *patlen = (int)(end - p); +! +! // parse the address range +! vim_memset(&ea, 0, sizeof(ea)); +! ea.line1 = 1; +! ea.line2 = 1; +! ea.cmd = ccline.cmdbuff; +! ea.addr_type = ADDR_LINES; +! parse_cmd_address(&ea, &dummy); +! curwin->w_cursor = is_state->search_start; +! if (ea.addr_count > 0) +! { +! search_first_line = ea.line1; +! search_last_line = ea.line2; +! } +! else if (*cmd == 's') +! { +! // :s defaults to the current line +! search_first_line = curwin->w_cursor.lnum; +! search_last_line = curwin->w_cursor.lnum; +! } +! +! curwin->w_cursor = save_cursor; +! return TRUE; +! } +! } +! } +! } +! } +! +! return FALSE; + } + + /* +*************** +*** 280,293 **** + long count, + incsearch_state_T *is_state) + { + int i; + pos_T end_pos; + struct cmdline_info save_ccline; + #ifdef FEAT_RELTIME + proftime_T tm; + #endif + +! if (!do_incsearch_highlighting(firstc)) + return; + + // If there is a character waiting, search and redraw later. +--- 347,362 ---- + long count, + incsearch_state_T *is_state) + { ++ int skiplen, patlen; + int i; + pos_T end_pos; + struct cmdline_info save_ccline; + #ifdef FEAT_RELTIME + proftime_T tm; + #endif ++ int c; + +! if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) + return; + + // If there is a character waiting, search and redraw later. +*************** +*** 298,309 **** + } + is_state->incsearch_postponed = FALSE; + +! // start at old position +! curwin->w_cursor = is_state->search_start; + save_last_search_pattern(); + + // If there is no command line, don't do anything. +! if (ccline.cmdlen == 0) + { + i = 0; + set_no_hlsearch(TRUE); // turn off previous highlight +--- 367,385 ---- + } + is_state->incsearch_postponed = FALSE; + +! if (search_first_line == 0) +! // start at the original cursor position +! curwin->w_cursor = is_state->search_start; +! else +! { +! // start at the first line in the range +! curwin->w_cursor.lnum = search_first_line; +! curwin->w_cursor.col = 0; +! } + save_last_search_pattern(); + + // If there is no command line, don't do anything. +! if (patlen == 0) + { + i = 0; + set_no_hlsearch(TRUE); // turn off previous highlight +*************** +*** 322,336 **** + #endif + if (!p_hls) + search_flags += SEARCH_KEEP; +! i = do_search(NULL, firstc, ccline.cmdbuff, count, search_flags, + #ifdef FEAT_RELTIME + &tm, NULL + #else + NULL, NULL + #endif + ); + --emsg_off; + + // if interrupted while searching, behave like it failed + if (got_int) + { +--- 398,421 ---- + #endif + if (!p_hls) + search_flags += SEARCH_KEEP; +! c = ccline.cmdbuff[skiplen + patlen]; +! ccline.cmdbuff[skiplen + patlen] = NUL; +! i = do_search(NULL, firstc == ':' ? '/' : firstc, +! ccline.cmdbuff + skiplen, count, search_flags, + #ifdef FEAT_RELTIME + &tm, NULL + #else + NULL, NULL + #endif + ); ++ ccline.cmdbuff[skiplen + patlen] = c; + --emsg_off; + ++ if (curwin->w_cursor.lnum < search_first_line ++ || curwin->w_cursor.lnum > search_last_line) ++ // match outside of address range ++ i = 0; ++ + // if interrupted while searching, behave like it failed + if (got_int) + { +*************** +*** 369,376 **** +--- 454,464 ---- + + // Disable 'hlsearch' highlighting if the pattern matches everything. + // Avoids a flash when typing "foo\|". ++ c = ccline.cmdbuff[skiplen + patlen]; ++ ccline.cmdbuff[skiplen + patlen] = NUL; + if (empty_pattern(ccline.cmdbuff)) + set_no_hlsearch(TRUE); ++ ccline.cmdbuff[skiplen + patlen] = c; + + validate_cursor(); + // May redraw the status line to show the cursor position. +*************** +*** 398,422 **** + */ + static int + may_adjust_incsearch_highlighting( +! int firstc, +! long count, + incsearch_state_T *is_state, +! int c) + { + pos_T t; + char_u *pat; + int search_flags = SEARCH_NOOF; + int i; + +! if (!do_incsearch_highlighting(firstc)) + return OK; +! if (ccline.cmdlen == 0) + return FAIL; + +! if (firstc == ccline.cmdbuff[0]) + pat = last_search_pattern(); + else +! pat = ccline.cmdbuff; + + save_last_search_pattern(); + cursor_off(); +--- 486,512 ---- + */ + static int + may_adjust_incsearch_highlighting( +! int firstc, +! long count, + incsearch_state_T *is_state, +! int c) + { ++ int skiplen, patlen; + pos_T t; + char_u *pat; + int search_flags = SEARCH_NOOF; + int i; ++ int save; + +! if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) + return OK; +! if (patlen == 0 && ccline.cmdbuff[skiplen] == NUL) + return FAIL; + +! if (firstc == ccline.cmdbuff[skiplen]) + pat = last_search_pattern(); + else +! pat = ccline.cmdbuff + skiplen; + + save_last_search_pattern(); + cursor_off(); +*************** +*** 435,451 **** + if (!p_hls) + search_flags += SEARCH_KEEP; + ++emsg_off; + i = searchit(curwin, curbuf, &t, + c == Ctrl_G ? FORWARD : BACKWARD, + pat, count, search_flags, + RE_SEARCH, 0, NULL, NULL); + --emsg_off; + if (i) + { + is_state->search_start = is_state->match_start; + is_state->match_end = t; + is_state->match_start = t; +! if (c == Ctrl_T && firstc == '/') + { + // Move just before the current match, so that when nv_search + // finishes the cursor will be put back on the match. +--- 525,544 ---- + if (!p_hls) + search_flags += SEARCH_KEEP; + ++emsg_off; ++ save = pat[patlen]; ++ pat[patlen] = NUL; + i = searchit(curwin, curbuf, &t, + c == Ctrl_G ? FORWARD : BACKWARD, + pat, count, search_flags, + RE_SEARCH, 0, NULL, NULL); + --emsg_off; ++ pat[patlen] = save; + if (i) + { + is_state->search_start = is_state->match_start; + is_state->match_end = t; + is_state->match_start = t; +! if (c == Ctrl_T && firstc != '?') + { + // Move just before the current match, so that when nv_search + // finishes the cursor will be put back on the match. +*************** +*** 493,499 **** + static int + may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state) + { +! if (!do_incsearch_highlighting(firstc)) + return FAIL; + + // Add a character from under the cursor for 'incsearch'. +--- 586,594 ---- + static int + may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state) + { +! int skiplen, patlen; +! +! if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) + return FAIL; + + // Add a character from under the cursor for 'incsearch'. +*************** +*** 507,513 **** + // If 'ignorecase' and 'smartcase' are set and the + // command line has no uppercase characters, convert + // the character to lowercase. +! if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff)) + *c = MB_TOLOWER(*c); + if (*c != NUL) + { +--- 602,608 ---- + // If 'ignorecase' and 'smartcase' are set and the + // command line has no uppercase characters, convert + // the character to lowercase. +! if (p_ic && p_scs && !pat_has_uppercase(ccline.cmdbuff + skiplen)) + *c = MB_TOLOWER(*c); + if (*c != NUL) + { +*** ../vim-8.1.0270/src/globals.h 2018-07-29 16:09:14.644945560 +0200 +--- src/globals.h 2018-08-11 15:13:44.359706095 +0200 +*************** +*** 345,353 **** + * a match within one line), search_match_endcol the column number of the + * character just after the match in the last line. + */ +! EXTERN int highlight_match INIT(= FALSE); /* show search match pos */ +! EXTERN linenr_T search_match_lines; /* lines of of matched string */ +! EXTERN colnr_T search_match_endcol; /* col nr of match end */ + + EXTERN int no_smartcase INIT(= FALSE); /* don't use 'smartcase' once */ + +--- 345,357 ---- + * a match within one line), search_match_endcol the column number of the + * character just after the match in the last line. + */ +! EXTERN int highlight_match INIT(= FALSE); // show search match pos +! EXTERN linenr_T search_match_lines; // lines of of matched string +! EXTERN colnr_T search_match_endcol; // col nr of match end +! #ifdef FEAT_SEARCH_EXTRA +! EXTERN linenr_T search_first_line INIT(= 0); // for :{FIRST},{last}s/pat +! EXTERN linenr_T search_last_line INIT(= MAXLNUM); // for :{first},{LAST}s/pat +! #endif + + EXTERN int no_smartcase INIT(= FALSE); /* don't use 'smartcase' once */ + +*** ../vim-8.1.0270/src/screen.c 2018-07-29 17:35:19.493750319 +0200 +--- src/screen.c 2018-08-11 15:26:39.760558152 +0200 +*************** +*** 7892,7897 **** +--- 7892,7904 ---- + long nmatched; + int save_called_emsg = called_emsg; + ++ // for :{range}s/pat only highlight inside the range ++ if (lnum < search_first_line || lnum > search_last_line) ++ { ++ shl->lnum = 0; ++ return; ++ } ++ + if (shl->lnum != 0) + { + /* Check for three situations: +*** ../vim-8.1.0270/src/testdir/test_search.vim 2018-07-14 17:24:57.681329029 +0200 +--- src/testdir/test_search.vim 2018-08-11 16:27:47.757683001 +0200 +*************** +*** 362,367 **** +--- 362,419 ---- + bw! + endfunc + ++ func Cmdline3_prep() ++ " need to disable char_avail, ++ " so that expansion of commandline works ++ call test_override("char_avail", 1) ++ new ++ call setline(1, [' 1', ' 2 the~e', ' 3 the theother']) ++ set incsearch ++ endfunc ++ ++ func Cmdline3_cleanup() ++ set noincsearch ++ call test_override("char_avail", 0) ++ bw! ++ endfunc ++ ++ func Test_search_cmdline3s() ++ if !exists('+incsearch') ++ return ++ endif ++ call Cmdline3_prep() ++ 1 ++ call feedkeys(":%s/the\/xxx\", 'tx') ++ call assert_equal(' 2 xxxe', getline('.')) ++ ++ call Cmdline3_cleanup() ++ endfunc ++ ++ func Test_search_cmdline3g() ++ if !exists('+incsearch') ++ return ++ endif ++ call Cmdline3_prep() ++ 1 ++ call feedkeys(":g/the\/d\", 'tx') ++ call assert_equal(' 3 the theother', getline(2)) ++ ++ call Cmdline3_cleanup() ++ endfunc ++ ++ func Test_search_cmdline3v() ++ if !exists('+incsearch') ++ return ++ endif ++ call Cmdline3_prep() ++ 1 ++ call feedkeys(":v/the\/d\", 'tx') ++ call assert_equal(1, line('$')) ++ call assert_equal(' 2 the~e', getline(1)) ++ ++ call Cmdline3_cleanup() ++ endfunc ++ + func Test_search_cmdline4() + if !exists('+incsearch') + return +*** ../vim-8.1.0270/src/version.c 2018-08-11 14:41:48.326928864 +0200 +--- src/version.c 2018-08-11 16:29:55.060807807 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 271, + /**/ + +-- +Every exit is an entrance into something else. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0272 b/data/vim/patches/8.1.0272 new file mode 100644 index 000000000..3269f6134 --- /dev/null +++ b/data/vim/patches/8.1.0272 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0272 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0272 +Problem: Options test fails if temp var ends in slash. (Tom Briden) +Solution: Check for optional slash. (closes #3308) +Files: src/testdir/test_options.vim + + +*** ../vim-8.1.0271/src/testdir/test_options.vim 2018-06-24 16:53:31.649909925 +0200 +--- src/testdir/test_options.vim 2018-08-11 17:50:19.189469171 +0200 +*************** +*** 344,350 **** + for var in ['$TEMPDIR', '$TMP', '$TEMP'] + if exists(var) + let varvalue = substitute(expand(var), '\\', '/', 'g') +! call assert_match(varvalue . '.\*', bskvalue) + endif + endfor + endfunc +--- 344,350 ---- + for var in ['$TEMPDIR', '$TMP', '$TEMP'] + if exists(var) + let varvalue = substitute(expand(var), '\\', '/', 'g') +! call assert_match(varvalue . '/\=\*', bskvalue) + endif + endfor + endfunc +*** ../vim-8.1.0271/src/version.c 2018-08-11 16:40:39.068311966 +0200 +--- src/version.c 2018-08-11 17:51:47.096827991 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 272, + /**/ + +-- +It is illegal for a driver to be blindfolded while operating a vehicle. + [real standing law in Alabama, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0273 b/data/vim/patches/8.1.0273 new file mode 100644 index 000000000..afaf1822b --- /dev/null +++ b/data/vim/patches/8.1.0273 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0273 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0273 +Problem: Invalid memory access when using 'incsearch'. +Solution: Reset "patlen" when using previous search pattern. +Files: src/ex_getln.c + + +*** ../vim-8.1.0272/src/ex_getln.c 2018-08-11 16:40:39.064311995 +0200 +--- src/ex_getln.c 2018-08-11 18:56:30.997198115 +0200 +*************** +*** 504,510 **** +--- 504,514 ---- + return FAIL; + + if (firstc == ccline.cmdbuff[skiplen]) ++ { + pat = last_search_pattern(); ++ skiplen = 0; ++ patlen = STRLEN(pat); ++ } + else + pat = ccline.cmdbuff + skiplen; + +*** ../vim-8.1.0272/src/version.c 2018-08-11 17:52:57.848311971 +0200 +--- src/version.c 2018-08-11 19:01:58.394713331 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 273, + /**/ + +-- +It is illegal for anyone to try and stop a child from playfully jumping over +puddles of water. + [real standing law in California, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0274 b/data/vim/patches/8.1.0274 new file mode 100644 index 000000000..d63003f4d --- /dev/null +++ b/data/vim/patches/8.1.0274 @@ -0,0 +1,166 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0274 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0274 +Problem: 'incsearch' triggers on ":source". +Solution: Check for the whole command name. +Files: src/ex_getln.c, src/testdir/test_search.vim + + +*** ../vim-8.1.0273/src/ex_getln.c 2018-08-11 19:02:18.038566056 +0200 +--- src/ex_getln.c 2018-08-11 19:08:55.639612407 +0200 +*************** +*** 293,299 **** + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*p != NUL) + { + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +--- 293,302 ---- + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*p != NUL +! && (STRNCMP(cmd, "substitute", p - cmd) == 0 +! || STRNCMP(cmd, "global", p - cmd) == 0 +! || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +*** ../vim-8.1.0273/src/testdir/test_search.vim 2018-08-11 16:40:39.068311966 +0200 +--- src/testdir/test_search.vim 2018-08-11 19:11:57.066276471 +0200 +*************** +*** 342,367 **** + bw! + endfunc + +- func Test_search_cmdline3() +- if !exists('+incsearch') +- return +- endif +- " need to disable char_avail, +- " so that expansion of commandline works +- call test_override("char_avail", 1) +- new +- call setline(1, [' 1', ' 2 the~e', ' 3 the theother']) +- set incsearch +- 1 +- " first match +- call feedkeys("/the\\", 'tx') +- call assert_equal(' 2 the~e', getline('.')) +- " clean up +- set noincsearch +- call test_override("char_avail", 0) +- bw! +- endfunc +- + func Cmdline3_prep() + " need to disable char_avail, + " so that expansion of commandline works +--- 342,347 ---- +*************** +*** 377,382 **** +--- 357,375 ---- + bw! + endfunc + ++ func Test_search_cmdline3() ++ if !exists('+incsearch') ++ return ++ endif ++ call Cmdline3_prep() ++ 1 ++ " first match ++ call feedkeys("/the\\", 'tx') ++ call assert_equal(' 2 the~e', getline('.')) ++ ++ call Cmdline3_cleanup() ++ endfunc ++ + func Test_search_cmdline3s() + if !exists('+incsearch') + return +*************** +*** 385,390 **** +--- 378,389 ---- + 1 + call feedkeys(":%s/the\/xxx\", 'tx') + call assert_equal(' 2 xxxe', getline('.')) ++ undo ++ call feedkeys(":%subs/the\/xxx\", 'tx') ++ call assert_equal(' 2 xxxe', getline('.')) ++ undo ++ call feedkeys(":%substitute/the\/xxx\", 'tx') ++ call assert_equal(' 2 xxxe', getline('.')) + + call Cmdline3_cleanup() + endfunc +*************** +*** 397,402 **** +--- 396,404 ---- + 1 + call feedkeys(":g/the\/d\", 'tx') + call assert_equal(' 3 the theother', getline(2)) ++ undo ++ call feedkeys(":global/the\/d\", 'tx') ++ call assert_equal(' 3 the theother', getline(2)) + + call Cmdline3_cleanup() + endfunc +*************** +*** 410,415 **** +--- 412,421 ---- + call feedkeys(":v/the\/d\", 'tx') + call assert_equal(1, line('$')) + call assert_equal(' 2 the~e', getline(1)) ++ undo ++ call feedkeys(":vglobal/the\/d\", 'tx') ++ call assert_equal(1, line('$')) ++ call assert_equal(' 2 the~e', getline(1)) + + call Cmdline3_cleanup() + endfunc +*************** +*** 518,524 **** + " so that expansion of commandline works + call test_override("char_avail", 1) + new +! let @/='b' + call setline(1, [' bbvimb', '']) + set incsearch + " first match +--- 524,530 ---- + " so that expansion of commandline works + call test_override("char_avail", 1) + new +! let @/ = 'b' + call setline(1, [' bbvimb', '']) + set incsearch + " first match +*** ../vim-8.1.0273/src/version.c 2018-08-11 19:02:18.038566056 +0200 +--- src/version.c 2018-08-11 19:11:29.546478790 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 274, + /**/ + +-- +You can be stopped by the police for biking over 65 miles per hour. +You are not allowed to walk across a street on your hands. + [real standing laws in Connecticut, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0275 b/data/vim/patches/8.1.0275 new file mode 100644 index 000000000..6617c72f0 --- /dev/null +++ b/data/vim/patches/8.1.0275 @@ -0,0 +1,185 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0275 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0275 +Problem: 'incsearch' with :s doesn't start at cursor line. +Solution: Set cursor before parsing address. (closes #3318) + Also accept a match at the start of the first line. +Files: src/ex_getln.c, src/testdir/test_search.vim + + +*** ../vim-8.1.0274/src/ex_getln.c 2018-08-11 19:20:45.042561404 +0200 +--- src/ex_getln.c 2018-08-12 15:48:20.176044564 +0200 +*************** +*** 316,323 **** + ea.line2 = 1; + ea.cmd = ccline.cmdbuff; + ea.addr_type = ADDR_LINES; +- parse_cmd_address(&ea, &dummy); + curwin->w_cursor = is_state->search_start; + if (ea.addr_count > 0) + { + search_first_line = ea.line1; +--- 316,323 ---- + ea.line2 = 1; + ea.cmd = ccline.cmdbuff; + ea.addr_type = ADDR_LINES; + curwin->w_cursor = is_state->search_start; ++ parse_cmd_address(&ea, &dummy); + if (ea.addr_count > 0) + { + search_first_line = ea.line1; +*************** +*** 401,406 **** +--- 401,408 ---- + #endif + if (!p_hls) + search_flags += SEARCH_KEEP; ++ if (search_first_line != 0) ++ search_flags += SEARCH_START; + c = ccline.cmdbuff[skiplen + patlen]; + ccline.cmdbuff[skiplen + patlen] = NUL; + i = do_search(NULL, firstc == ':' ? '/' : firstc, +*** ../vim-8.1.0274/src/testdir/test_search.vim 2018-08-11 19:20:45.042561404 +0200 +--- src/testdir/test_search.vim 2018-08-12 15:24:06.430745257 +0200 +*************** +*** 351,357 **** + set incsearch + endfunc + +! func Cmdline3_cleanup() + set noincsearch + call test_override("char_avail", 0) + bw! +--- 351,357 ---- + set incsearch + endfunc + +! func Incsearch_cleanup() + set noincsearch + call test_override("char_avail", 0) + bw! +*************** +*** 367,373 **** + call feedkeys("/the\\", 'tx') + call assert_equal(' 2 the~e', getline('.')) + +! call Cmdline3_cleanup() + endfunc + + func Test_search_cmdline3s() +--- 367,373 ---- + call feedkeys("/the\\", 'tx') + call assert_equal(' 2 the~e', getline('.')) + +! call Incsearch_cleanup() + endfunc + + func Test_search_cmdline3s() +*************** +*** 385,391 **** + call feedkeys(":%substitute/the\/xxx\", 'tx') + call assert_equal(' 2 xxxe', getline('.')) + +! call Cmdline3_cleanup() + endfunc + + func Test_search_cmdline3g() +--- 385,391 ---- + call feedkeys(":%substitute/the\/xxx\", 'tx') + call assert_equal(' 2 xxxe', getline('.')) + +! call Incsearch_cleanup() + endfunc + + func Test_search_cmdline3g() +*************** +*** 400,406 **** + call feedkeys(":global/the\/d\", 'tx') + call assert_equal(' 3 the theother', getline(2)) + +! call Cmdline3_cleanup() + endfunc + + func Test_search_cmdline3v() +--- 400,406 ---- + call feedkeys(":global/the\/d\", 'tx') + call assert_equal(' 3 the theother', getline(2)) + +! call Incsearch_cleanup() + endfunc + + func Test_search_cmdline3v() +*************** +*** 417,423 **** + call assert_equal(1, line('$')) + call assert_equal(' 2 the~e', getline(1)) + +! call Cmdline3_cleanup() + endfunc + + func Test_search_cmdline4() +--- 417,423 ---- + call assert_equal(1, line('$')) + call assert_equal(' 2 the~e', getline(1)) + +! call Incsearch_cleanup() + endfunc + + func Test_search_cmdline4() +*************** +*** 797,802 **** +--- 797,823 ---- + call delete('Xscript') + endfunc + ++ func Test_incsearch_substitute() ++ if !exists('+incsearch') ++ return ++ endif ++ call test_override("char_avail", 1) ++ new ++ set incsearch ++ for n in range(1, 10) ++ call setline(n, 'foo ' . n) ++ endfor ++ 4 ++ call feedkeys(":.,.+2s/foo\o\o/xxx\", 'tx') ++ call assert_equal('foo 3', getline(3)) ++ call assert_equal('xxx 4', getline(4)) ++ call assert_equal('xxx 5', getline(5)) ++ call assert_equal('xxx 6', getline(6)) ++ call assert_equal('foo 7', getline(7)) ++ ++ call Incsearch_cleanup() ++ endfunc ++ + func Test_search_undefined_behaviour() + if !has("terminal") + return +*** ../vim-8.1.0274/src/version.c 2018-08-11 19:20:45.042561404 +0200 +--- src/version.c 2018-08-12 15:29:30.772309260 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 275, + /**/ + +-- +Any sufficiently advanced technology is indistinguishable from magic. + Arthur C. Clarke +Any sufficiently advanced bug is indistinguishable from a feature. + Rich Kulawiec + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0276 b/data/vim/patches/8.1.0276 new file mode 100644 index 000000000..469907c7a --- /dev/null +++ b/data/vim/patches/8.1.0276 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0276 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0276 +Problem: No test for 'incsearch' highlighting with :s. +Solution: Add a screendump test. +Files: src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_substitute_01.dump + + +*** ../vim-8.1.0275/src/testdir/test_search.vim 2018-08-12 15:49:33.555438382 +0200 +--- src/testdir/test_search.vim 2018-08-12 16:25:27.296040799 +0200 +*************** +*** 818,823 **** +--- 818,858 ---- + call Incsearch_cleanup() + endfunc + ++ " Similar to Test_incsearch_substitute() but with a screendump halfway. ++ func Test_incsearch_substitute_dump() ++ if !exists('+incsearch') ++ return ++ endif ++ if !CanRunVimInTerminal() ++ return ++ endif ++ call writefile([ ++ \ 'set incsearch hlsearch scrolloff=0', ++ \ 'for n in range(1, 10)', ++ \ ' call setline(n, "foo " . n)', ++ \ 'endfor', ++ \ '3', ++ \ ], 'Xis_subst_script') ++ let buf = RunVimInTerminal('-S Xis_subst_script', {'rows': 9, 'cols': 70}) ++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by ++ " the 'ambiwidth' check. ++ sleep 100m ++ ++ " Need to send one key at a time to force a redraw. ++ call term_sendkeys(buf, ':.,.+2s/') ++ sleep 100m ++ call term_sendkeys(buf, 'f') ++ sleep 100m ++ call term_sendkeys(buf, 'o') ++ sleep 100m ++ call term_sendkeys(buf, 'o') ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {}) ++ ++ call term_sendkeys(buf, "\") ++ call StopVimInTerminal(buf) ++ call delete('Xis_subst_script') ++ endfunc ++ + func Test_search_undefined_behaviour() + if !has("terminal") + return +*** ../vim-8.1.0275/src/testdir/dumps/Test_incsearch_substitute_01.dump 2018-08-12 16:26:20.299815699 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_01.dump 2018-08-12 16:14:00.068277624 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |1| @64 ++ |f|o@1| |2| @64 ++ |f+1&&|o@1| +0&&|3| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |:|.|,|.|+|2|s|/|f|o@1> @58 +*** ../vim-8.1.0275/src/version.c 2018-08-12 15:49:33.555438382 +0200 +--- src/version.c 2018-08-12 16:25:53.031933127 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 276, + /**/ + +-- +It is illegal for anyone to give lighted cigars to dogs, cats, and other +domesticated animal kept as pets. + [real standing law in Illinois, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0277 b/data/vim/patches/8.1.0277 new file mode 100644 index 000000000..a084393e4 --- /dev/null +++ b/data/vim/patches/8.1.0277 @@ -0,0 +1,316 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0277 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0277 +Problem: 'incsearch' highlighting wrong in a few cases. +Solution: Fix using last search pattern. Restore highlighting when changing + command. (issue #3321) +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_substitute_02.dump, + src/testdir/dumps/Test_incsearch_substitute_03.dump + + +*** ../vim-8.1.0276/src/ex_getln.c 2018-08-12 15:49:33.551438415 +0200 +--- src/ex_getln.c 2018-08-12 17:27:32.113306665 +0200 +*************** +*** 300,306 **** + { + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +! if (end > p) + { + char_u *dummy; + exarg_T ea; +--- 300,306 ---- + { + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +! if (end > p || *end == delim) + { + char_u *dummy; + exarg_T ea; +*************** +*** 341,346 **** +--- 341,377 ---- + return FALSE; + } + ++ static void ++ finish_incsearch_highlighting( ++ int gotesc, ++ incsearch_state_T *is_state, ++ int call_update_screen) ++ { ++ if (is_state->did_incsearch) ++ { ++ is_state->did_incsearch = FALSE; ++ if (gotesc) ++ curwin->w_cursor = is_state->save_cursor; ++ else ++ { ++ if (!EQUAL_POS(is_state->save_cursor, is_state->search_start)) ++ { ++ // put the '" mark at the original position ++ curwin->w_cursor = is_state->save_cursor; ++ setpcmark(); ++ } ++ curwin->w_cursor = is_state->search_start; ++ } ++ restore_viewstate(&is_state->old_viewstate); ++ highlight_match = FALSE; ++ validate_cursor(); /* needed for TAB */ ++ if (call_update_screen) ++ update_screen(SOME_VALID); ++ else ++ redraw_all_later(SOME_VALID); ++ } ++ } ++ + /* + * Do 'incsearch' highlighting if desired. + */ +*************** +*** 357,366 **** + #ifdef FEAT_RELTIME + proftime_T tm; + #endif +! int c; + + if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) + return; + + // If there is a character waiting, search and redraw later. + if (char_avail()) +--- 388,401 ---- + #ifdef FEAT_RELTIME + proftime_T tm; + #endif +! int next_char; +! int use_last_pat; + + if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) ++ { ++ finish_incsearch_highlighting(FALSE, is_state, TRUE); + return; ++ } + + // If there is a character waiting, search and redraw later. + if (char_avail()) +*************** +*** 381,388 **** + } + save_last_search_pattern(); + +! // If there is no command line, don't do anything. +! if (patlen == 0) + { + i = 0; + set_no_hlsearch(TRUE); // turn off previous highlight +--- 416,428 ---- + } + save_last_search_pattern(); + +! // Use the previous pattern for ":s//". +! next_char = ccline.cmdbuff[skiplen + patlen]; +! use_last_pat = patlen == 0 && skiplen > 0 +! && ccline.cmdbuff[skiplen - 1] == next_char; +! +! // If there is no pattern, don't do anything. +! if (patlen == 0 && !use_last_pat) + { + i = 0; + set_no_hlsearch(TRUE); // turn off previous highlight +*************** +*** 403,409 **** + search_flags += SEARCH_KEEP; + if (search_first_line != 0) + search_flags += SEARCH_START; +- c = ccline.cmdbuff[skiplen + patlen]; + ccline.cmdbuff[skiplen + patlen] = NUL; + i = do_search(NULL, firstc == ':' ? '/' : firstc, + ccline.cmdbuff + skiplen, count, search_flags, +--- 443,448 ---- +*************** +*** 413,419 **** + NULL, NULL + #endif + ); +! ccline.cmdbuff[skiplen + patlen] = c; + --emsg_off; + + if (curwin->w_cursor.lnum < search_first_line +--- 452,458 ---- + NULL, NULL + #endif + ); +! ccline.cmdbuff[skiplen + patlen] = next_char; + --emsg_off; + + if (curwin->w_cursor.lnum < search_first_line +*************** +*** 459,469 **** + + // Disable 'hlsearch' highlighting if the pattern matches everything. + // Avoids a flash when typing "foo\|". +! c = ccline.cmdbuff[skiplen + patlen]; +! ccline.cmdbuff[skiplen + patlen] = NUL; +! if (empty_pattern(ccline.cmdbuff)) +! set_no_hlsearch(TRUE); +! ccline.cmdbuff[skiplen + patlen] = c; + + validate_cursor(); + // May redraw the status line to show the cursor position. +--- 498,511 ---- + + // Disable 'hlsearch' highlighting if the pattern matches everything. + // Avoids a flash when typing "foo\|". +! if (!use_last_pat) +! { +! next_char = ccline.cmdbuff[skiplen + patlen]; +! ccline.cmdbuff[skiplen + patlen] = NUL; +! if (empty_pattern(ccline.cmdbuff)) +! set_no_hlsearch(TRUE); +! ccline.cmdbuff[skiplen + patlen] = next_char; +! } + + validate_cursor(); + // May redraw the status line to show the cursor position. +*************** +*** 628,657 **** + } + return OK; + } +- +- static void +- finish_incsearch_highlighting(int gotesc, incsearch_state_T *is_state) +- { +- if (is_state->did_incsearch) +- { +- if (gotesc) +- curwin->w_cursor = is_state->save_cursor; +- else +- { +- if (!EQUAL_POS(is_state->save_cursor, is_state->search_start)) +- { +- // put the '" mark at the original position +- curwin->w_cursor = is_state->save_cursor; +- setpcmark(); +- } +- curwin->w_cursor = is_state->search_start; +- } +- restore_viewstate(&is_state->old_viewstate); +- highlight_match = FALSE; +- validate_cursor(); /* needed for TAB */ +- redraw_all_later(SOME_VALID); +- } +- } + #endif + + /* +--- 670,675 ---- +*************** +*** 2301,2307 **** + ccline.xpc = NULL; + + #ifdef FEAT_SEARCH_EXTRA +! finish_incsearch_highlighting(gotesc, &is_state); + #endif + + if (ccline.cmdbuff != NULL) +--- 2319,2325 ---- + ccline.xpc = NULL; + + #ifdef FEAT_SEARCH_EXTRA +! finish_incsearch_highlighting(gotesc, &is_state, FALSE); + #endif + + if (ccline.cmdbuff != NULL) +*** ../vim-8.1.0276/src/testdir/test_search.vim 2018-08-12 16:26:43.427713531 +0200 +--- src/testdir/test_search.vim 2018-08-12 17:33:19.978924077 +0200 +*************** +*** 839,844 **** +--- 839,845 ---- + sleep 100m + + " Need to send one key at a time to force a redraw. ++ " Select three lines at the cursor with typed pattern. + call term_sendkeys(buf, ':.,.+2s/') + sleep 100m + call term_sendkeys(buf, 'f') +*************** +*** 846,852 **** +--- 847,867 ---- + call term_sendkeys(buf, 'o') + sleep 100m + call term_sendkeys(buf, 'o') ++ sleep 100m + call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {}) ++ call term_sendkeys(buf, "\") ++ ++ " Select three lines at the cursor using previous pattern. ++ call term_sendkeys(buf, "/foo\") ++ sleep 100m ++ call term_sendkeys(buf, ':.,.+2s//') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_02', {}) ++ ++ " Deleting last slash should remove the match. ++ call term_sendkeys(buf, "\") ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {}) + + call term_sendkeys(buf, "\") + call StopVimInTerminal(buf) +*** ../vim-8.1.0276/src/testdir/dumps/Test_incsearch_substitute_02.dump 2018-08-12 17:37:49.457116653 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_02.dump 2018-08-12 17:02:58.756857477 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |1| @64 ++ |f|o@1| |2| @64 ++ |f|o@1| |3| @64 ++ |f+1&&|o@1| +0&&|4| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |:|.|,|.|+|2|s|/@1> @60 +*** ../vim-8.1.0276/src/testdir/dumps/Test_incsearch_substitute_03.dump 2018-08-12 17:37:49.465116598 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_03.dump 2018-08-12 17:33:35.062824462 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffff4012|o@1| +0&#ffffff0|1| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|2| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|3| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|6| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|7| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|8| @64 ++ |:|.|,|.|+|2|s|/> @61 +*** ../vim-8.1.0276/src/version.c 2018-08-12 16:26:43.427713531 +0200 +--- src/version.c 2018-08-12 16:57:04.292430111 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 277, + /**/ + +-- +Citizens are not allowed to attend a movie house or theater nor ride in a +public streetcar within at least four hours after eating garlic. + [real standing law in Indiana, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0278 b/data/vim/patches/8.1.0278 new file mode 100644 index 000000000..e11c7ee2e --- /dev/null +++ b/data/vim/patches/8.1.0278 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0278 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0278 +Problem: 'incsearch' highlighting does not accept reverse range. +Solution: Swap the range when needed. (issue #3321) +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_substitute_04.dump + + +*** ../vim-8.1.0277/src/ex_getln.c 2018-08-12 17:38:50.544700253 +0200 +--- src/ex_getln.c 2018-08-12 21:46:02.876827779 +0200 +*************** +*** 320,327 **** + parse_cmd_address(&ea, &dummy); + if (ea.addr_count > 0) + { +! search_first_line = ea.line1; +! search_last_line = ea.line2; + } + else if (*cmd == 's') + { +--- 320,336 ---- + parse_cmd_address(&ea, &dummy); + if (ea.addr_count > 0) + { +! // Allow for reverse match. +! if (ea.line2 < ea.line1) +! { +! search_first_line = ea.line2; +! search_last_line = ea.line1; +! } +! else +! { +! search_first_line = ea.line1; +! search_last_line = ea.line2; +! } + } + else if (*cmd == 's') + { +*** ../vim-8.1.0277/src/testdir/test_search.vim 2018-08-12 17:38:50.544700253 +0200 +--- src/testdir/test_search.vim 2018-08-12 21:47:42.928159249 +0200 +*************** +*** 862,867 **** +--- 862,873 ---- + call term_sendkeys(buf, "\") + sleep 100m + call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {}) ++ call term_sendkeys(buf, "\") ++ ++ " Reverse range is accepted ++ call term_sendkeys(buf, ':5,2s/foo') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {}) + + call term_sendkeys(buf, "\") + call StopVimInTerminal(buf) +*** ../vim-8.1.0277/src/testdir/dumps/Test_incsearch_substitute_04.dump 2018-08-12 21:51:53.814482196 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_04.dump 2018-08-12 21:48:10.107977608 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |1| @64 ++ |f+1&&|o@1| +0&&|2| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|3| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |:|5|,|2|s|/|f|o@1> @60 +*** ../vim-8.1.0277/src/version.c 2018-08-12 17:38:50.544700253 +0200 +--- src/version.c 2018-08-12 21:50:56.598864724 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 278, + /**/ + +-- +Kisses may last for as much as, but no more than, five minutes. + [real standing law in Iowa, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0279 b/data/vim/patches/8.1.0279 new file mode 100644 index 000000000..f34949ad1 --- /dev/null +++ b/data/vim/patches/8.1.0279 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0279 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0279 +Problem: 'incsearch' highlighting does not skip white space. +Solution: Skip white space after the command. (issue #3321) +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_substitute_05.dump + + +*** ../vim-8.1.0278/src/ex_getln.c 2018-08-12 21:52:56.078065882 +0200 +--- src/ex_getln.c 2018-08-12 21:56:40.340566130 +0200 +*************** +*** 293,303 **** + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*p != NUL + && (STRNCMP(cmd, "substitute", p - cmd) == 0 + || STRNCMP(cmd, "global", p - cmd) == 0 + || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); + if (end > p || *end == delim) +--- 293,304 ---- + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*skipwhite(p) != NUL + && (STRNCMP(cmd, "substitute", p - cmd) == 0 + || STRNCMP(cmd, "global", p - cmd) == 0 + || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { ++ p = skipwhite(p); + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); + if (end > p || *end == delim) +*** ../vim-8.1.0278/src/testdir/test_search.vim 2018-08-12 21:52:56.078065882 +0200 +--- src/testdir/test_search.vim 2018-08-12 22:00:15.759125243 +0200 +*************** +*** 868,875 **** +--- 868,881 ---- + call term_sendkeys(buf, ':5,2s/foo') + sleep 100m + call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {}) ++ call term_sendkeys(buf, "\") + ++ " White space after the command is skipped ++ call term_sendkeys(buf, ':2,3sub /fo') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {}) + call term_sendkeys(buf, "\") ++ + call StopVimInTerminal(buf) + call delete('Xis_subst_script') + endfunc +*** ../vim-8.1.0278/src/testdir/dumps/Test_incsearch_substitute_05.dump 2018-08-12 22:02:46.162119119 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_05.dump 2018-08-12 22:00:31.507019900 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |1| @64 ++ |f+1&&|o|o+0&&| |2| @64 ++ |f+0&#ffff4012|o|o+0&#ffffff0| |3| @64 ++ |f|o@1| |4| @64 ++ |f|o@1| |5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |:|2|,|3|s|u|b| @1|/|f|o> @57 +*** ../vim-8.1.0278/src/version.c 2018-08-12 21:52:56.078065882 +0200 +--- src/version.c 2018-08-12 21:58:09.031972919 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 279, + /**/ + +-- +It is illegal to rob a bank and then shoot at the bank teller with a water +pistol. + [real standing law in Louisana, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0280 b/data/vim/patches/8.1.0280 new file mode 100644 index 000000000..0203c3b8f --- /dev/null +++ b/data/vim/patches/8.1.0280 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0280 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0280 +Problem: 'incsearch' highlighting does not work for ":g!/". +Solution: Skip the exclamation mark. (Hirohito Higashi) +Files: src/ex_getln.c, src/testdir/test_search.vim + + +*** ../vim-8.1.0279/src/ex_getln.c 2018-08-12 22:02:55.494056691 +0200 +--- src/ex_getln.c 2018-08-13 22:53:06.873250045 +0200 +*************** +*** 298,303 **** +--- 298,310 ---- + || STRNCMP(cmd, "global", p - cmd) == 0 + || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { ++ // Check for "global!/". ++ if (*cmd == 'g' && *p == '!') ++ { ++ p++; ++ if (*skipwhite(p) == NUL) ++ return FALSE; ++ } + p = skipwhite(p); + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +*** ../vim-8.1.0279/src/testdir/test_search.vim 2018-08-12 22:02:55.494056691 +0200 +--- src/testdir/test_search.vim 2018-08-13 22:50:49.374202563 +0200 +*************** +*** 399,404 **** +--- 399,412 ---- + undo + call feedkeys(":global/the\/d\", 'tx') + call assert_equal(' 3 the theother', getline(2)) ++ undo ++ call feedkeys(":g!/the\/d\", 'tx') ++ call assert_equal(1, line('$')) ++ call assert_equal(' 2 the~e', getline(1)) ++ undo ++ call feedkeys(":global!/the\/d\", 'tx') ++ call assert_equal(1, line('$')) ++ call assert_equal(' 2 the~e', getline(1)) + + call Incsearch_cleanup() + endfunc +*** ../vim-8.1.0279/src/version.c 2018-08-12 22:02:55.494056691 +0200 +--- src/version.c 2018-08-13 22:51:49.437786199 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 280, + /**/ + +-- +A parent can be arrested if his child cannot hold back a burp during a church +service. + [real standing law in Nebraska, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0281 b/data/vim/patches/8.1.0281 new file mode 100644 index 000000000..9efb07608 --- /dev/null +++ b/data/vim/patches/8.1.0281 @@ -0,0 +1,738 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0281 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0281 +Problem: Parsing command modifiers is not separated. +Solution: Move command modifier parsing to a separate function. +Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/ex_cmds.h, + src/globals.h, src/feature.h + + +*** ../vim-8.1.0280/src/ex_docmd.c 2018-08-10 23:13:07.934024645 +0200 +--- src/ex_docmd.c 2018-08-13 23:27:03.980298529 +0200 +*************** +*** 1709,1721 **** + char_u *errormsg = NULL; /* error message */ + char_u *after_modifier = NULL; + exarg_T ea; /* Ex command arguments */ +- long verbose_save = -1; + int save_msg_scroll = msg_scroll; +- int save_msg_silent = -1; +- int did_esilent = 0; +- #ifdef HAVE_SANDBOX +- int did_sandbox = FALSE; +- #endif + cmdmod_T save_cmdmod; + int ni; /* set when Not Implemented */ + char_u *cmd; +--- 1709,1715 ---- +*************** +*** 1742,1748 **** + * recursive calls. + */ + save_cmdmod = cmdmod; +- vim_memset(&cmdmod, 0, sizeof(cmdmod)); + + /* "#!anything" is handled like a comment. */ + if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!') +--- 1736,1741 ---- +*************** +*** 1750,1977 **** + + /* + * Repeat until no more command modifiers are found. + */ + ea.cmd = *cmdlinep; +! for (;;) +! { +! /* +! * 1. Skip comment lines and leading white space and colons. +! */ +! while (*ea.cmd == ' ' || *ea.cmd == '\t' || *ea.cmd == ':') +! ++ea.cmd; +! +! /* in ex mode, an empty line works like :+ */ +! if (*ea.cmd == NUL && exmode_active +! && (getline_equal(fgetline, cookie, getexmodeline) +! || getline_equal(fgetline, cookie, getexline)) +! && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! { +! ea.cmd = (char_u *)"+"; +! ex_pressedreturn = TRUE; +! } +! +! /* ignore comment and empty lines */ +! if (*ea.cmd == '"') +! goto doend; +! if (*ea.cmd == NUL) +! { +! ex_pressedreturn = TRUE; +! goto doend; +! } +! +! /* +! * 2. Handle command modifiers. +! */ +! p = skip_range(ea.cmd, NULL); +! switch (*p) +! { +! /* When adding an entry, also modify cmd_exists(). */ +! case 'a': if (!checkforcmd(&ea.cmd, "aboveleft", 3)) +! break; +! cmdmod.split |= WSP_ABOVE; +! continue; +! +! case 'b': if (checkforcmd(&ea.cmd, "belowright", 3)) +! { +! cmdmod.split |= WSP_BELOW; +! continue; +! } +! if (checkforcmd(&ea.cmd, "browse", 3)) +! { +! #ifdef FEAT_BROWSE_CMD +! cmdmod.browse = TRUE; +! #endif +! continue; +! } +! if (!checkforcmd(&ea.cmd, "botright", 2)) +! break; +! cmdmod.split |= WSP_BOT; +! continue; +! +! case 'c': if (!checkforcmd(&ea.cmd, "confirm", 4)) +! break; +! #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) +! cmdmod.confirm = TRUE; +! #endif +! continue; +! +! case 'k': if (checkforcmd(&ea.cmd, "keepmarks", 3)) +! { +! cmdmod.keepmarks = TRUE; +! continue; +! } +! if (checkforcmd(&ea.cmd, "keepalt", 5)) +! { +! cmdmod.keepalt = TRUE; +! continue; +! } +! if (checkforcmd(&ea.cmd, "keeppatterns", 5)) +! { +! cmdmod.keeppatterns = TRUE; +! continue; +! } +! if (!checkforcmd(&ea.cmd, "keepjumps", 5)) +! break; +! cmdmod.keepjumps = TRUE; +! continue; +! +! case 'f': /* only accept ":filter {pat} cmd" */ +! { +! char_u *reg_pat; +! +! if (!checkforcmd(&p, "filter", 4) +! || *p == NUL || ends_excmd(*p)) +! break; +! if (*p == '!') +! { +! cmdmod.filter_force = TRUE; +! p = skipwhite(p + 1); +! if (*p == NUL || ends_excmd(*p)) +! break; +! } +! p = skip_vimgrep_pat(p, ®_pat, NULL); +! if (p == NULL || *p == NUL) +! break; +! cmdmod.filter_regmatch.regprog = +! vim_regcomp(reg_pat, RE_MAGIC); +! if (cmdmod.filter_regmatch.regprog == NULL) +! break; +! ea.cmd = p; +! continue; +! } +! +! /* ":hide" and ":hide | cmd" are not modifiers */ +! case 'h': if (p != ea.cmd || !checkforcmd(&p, "hide", 3) +! || *p == NUL || ends_excmd(*p)) +! break; +! ea.cmd = p; +! cmdmod.hide = TRUE; +! continue; +! +! case 'l': if (checkforcmd(&ea.cmd, "lockmarks", 3)) +! { +! cmdmod.lockmarks = TRUE; +! continue; +! } +! +! if (!checkforcmd(&ea.cmd, "leftabove", 5)) +! break; +! cmdmod.split |= WSP_ABOVE; +! continue; +! +! case 'n': if (checkforcmd(&ea.cmd, "noautocmd", 3)) +! { +! if (cmdmod.save_ei == NULL) +! { +! /* Set 'eventignore' to "all". Restore the +! * existing option value later. */ +! cmdmod.save_ei = vim_strsave(p_ei); +! set_string_option_direct((char_u *)"ei", -1, +! (char_u *)"all", OPT_FREE, SID_NONE); +! } +! continue; +! } +! if (!checkforcmd(&ea.cmd, "noswapfile", 3)) +! break; +! cmdmod.noswapfile = TRUE; +! continue; +! +! case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6)) +! break; +! cmdmod.split |= WSP_BELOW; +! continue; +! +! case 's': if (checkforcmd(&ea.cmd, "sandbox", 3)) +! { +! #ifdef HAVE_SANDBOX +! if (!did_sandbox) +! ++sandbox; +! did_sandbox = TRUE; + #endif +! continue; +! } +! if (!checkforcmd(&ea.cmd, "silent", 3)) +! break; +! if (save_msg_silent == -1) +! save_msg_silent = msg_silent; +! ++msg_silent; +! if (*ea.cmd == '!' && !VIM_ISWHITE(ea.cmd[-1])) +! { +! /* ":silent!", but not "silent !cmd" */ +! ea.cmd = skipwhite(ea.cmd + 1); +! ++emsg_silent; +! ++did_esilent; +! } +! continue; +! +! case 't': if (checkforcmd(&p, "tab", 3)) +! { +! long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS, +! ea.skip, FALSE, 1); +! if (tabnr == MAXLNUM) +! cmdmod.tab = tabpage_index(curtab) + 1; +! else +! { +! if (tabnr < 0 || tabnr > LAST_TAB_NR) +! { +! errormsg = (char_u *)_(e_invrange); +! goto doend; +! } +! cmdmod.tab = tabnr + 1; +! } +! ea.cmd = p; +! continue; +! } +! if (!checkforcmd(&ea.cmd, "topleft", 2)) +! break; +! cmdmod.split |= WSP_TOP; +! continue; +! +! case 'u': if (!checkforcmd(&ea.cmd, "unsilent", 3)) +! break; +! if (save_msg_silent == -1) +! save_msg_silent = msg_silent; +! msg_silent = 0; +! continue; + +- case 'v': if (checkforcmd(&ea.cmd, "vertical", 4)) +- { +- cmdmod.split |= WSP_VERT; +- continue; +- } +- if (!checkforcmd(&p, "verbose", 4)) +- break; +- if (verbose_save < 0) +- verbose_save = p_verbose; +- if (vim_isdigit(*ea.cmd)) +- p_verbose = atoi((char *)ea.cmd); +- else +- p_verbose = 1; +- ea.cmd = p; +- continue; +- } +- break; +- } + after_modifier = ea.cmd; + + #ifdef FEAT_EVAL +--- 1743,1760 ---- + + /* + * Repeat until no more command modifiers are found. ++ * The "ea" structure holds the arguments that can be used. + */ + ea.cmd = *cmdlinep; +! ea.cmdlinep = cmdlinep; +! ea.getline = fgetline; +! ea.cookie = cookie; +! #ifdef FEAT_EVAL +! ea.cstack = cstack; + #endif +! if (parse_command_modifiers(&ea, &errormsg) == FAIL) +! goto doend; + + after_modifier = ea.cmd; + + #ifdef FEAT_EVAL +*************** +*** 2688,2712 **** + + /* The :try command saves the emsg_silent flag, reset it here when + * ":silent! try" was used, it should only apply to :try itself. */ +! if (ea.cmdidx == CMD_try && did_esilent > 0) + { +! emsg_silent -= did_esilent; + if (emsg_silent < 0) + emsg_silent = 0; +! did_esilent = 0; + } + + /* + * 7. Execute the command. +- * +- * The "ea" structure holds the arguments that can be used. + */ +- ea.cmdlinep = cmdlinep; +- ea.getline = fgetline; +- ea.cookie = cookie; +- #ifdef FEAT_EVAL +- ea.cstack = cstack; +- #endif + + #ifdef FEAT_USR_CMDS + if (IS_USER_CMDIDX(ea.cmdidx)) +--- 2471,2487 ---- + + /* The :try command saves the emsg_silent flag, reset it here when + * ":silent! try" was used, it should only apply to :try itself. */ +! if (ea.cmdidx == CMD_try && ea.did_esilent > 0) + { +! emsg_silent -= ea.did_esilent; + if (emsg_silent < 0) + emsg_silent = 0; +! ea.did_esilent = 0; + } + + /* + * 7. Execute the command. + */ + + #ifdef FEAT_USR_CMDS + if (IS_USER_CMDIDX(ea.cmdidx)) +*************** +*** 2775,2782 **** + ? cmdnames[(int)ea.cmdidx].cmd_name : (char_u *)NULL); + #endif + +! if (verbose_save >= 0) +! p_verbose = verbose_save; + + if (cmdmod.save_ei != NULL) + { +--- 2550,2557 ---- + ? cmdnames[(int)ea.cmdidx].cmd_name : (char_u *)NULL); + #endif + +! if (ea.verbose_save >= 0) +! p_verbose = ea.verbose_save; + + if (cmdmod.save_ei != NULL) + { +*************** +*** 2791,2803 **** + + cmdmod = save_cmdmod; + +! if (save_msg_silent != -1) + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! if (!did_emsg || msg_silent > save_msg_silent) +! msg_silent = save_msg_silent; +! emsg_silent -= did_esilent; + if (emsg_silent < 0) + emsg_silent = 0; + /* Restore msg_scroll, it's set by file I/O commands, even when no +--- 2566,2578 ---- + + cmdmod = save_cmdmod; + +! if (ea.save_msg_silent != -1) + { + /* messages could be enabled for a serious error, need to check if the + * counters don't become negative */ +! if (!did_emsg || msg_silent > ea.save_msg_silent) +! msg_silent = ea.save_msg_silent; +! emsg_silent -= ea.did_esilent; + if (emsg_silent < 0) + emsg_silent = 0; + /* Restore msg_scroll, it's set by file I/O commands, even when no +*************** +*** 2811,2817 **** + } + + #ifdef HAVE_SANDBOX +! if (did_sandbox) + --sandbox; + #endif + +--- 2586,2592 ---- + } + + #ifdef HAVE_SANDBOX +! if (ea.did_sandbox) + --sandbox; + #endif + +*************** +*** 2829,2834 **** +--- 2604,2853 ---- + #endif + + /* ++ * Parse and skip over command modifiers: ++ * - update eap->cmd ++ * - store flags in "cmdmod". ++ * - Set ex_pressedreturn for an empty command line. ++ * - set msg_silent for ":silent" ++ * - set p_verbose for ":verbose" ++ * - Increment "sandbox" for ":sandbox" ++ * Return FAIL when the command is not to be executed. ++ * May set "errormsg" to an error message. ++ */ ++ int ++ parse_command_modifiers(exarg_T *eap, char_u **errormsg) ++ { ++ char_u *p; ++ ++ vim_memset(&cmdmod, 0, sizeof(cmdmod)); ++ eap->verbose_save = -1; ++ eap->save_msg_silent = -1; ++ ++ for (;;) ++ { ++ /* ++ * 1. Skip comment lines and leading white space and colons. ++ */ ++ while (*eap->cmd == ' ' || *eap->cmd == '\t' || *eap->cmd == ':') ++ ++eap->cmd; ++ ++ /* in ex mode, an empty line works like :+ */ ++ if (*eap->cmd == NUL && exmode_active ++ && (getline_equal(eap->getline, eap->cookie, getexmodeline) ++ || getline_equal(eap->getline, eap->cookie, getexline)) ++ && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) ++ { ++ eap->cmd = (char_u *)"+"; ++ ex_pressedreturn = TRUE; ++ } ++ ++ /* ignore comment and empty lines */ ++ if (*eap->cmd == '"') ++ return FAIL; ++ if (*eap->cmd == NUL) ++ { ++ ex_pressedreturn = TRUE; ++ return FAIL; ++ } ++ ++ /* ++ * 2. Handle command modifiers. ++ */ ++ p = skip_range(eap->cmd, NULL); ++ switch (*p) ++ { ++ /* When adding an entry, also modify cmd_exists(). */ ++ case 'a': if (!checkforcmd(&eap->cmd, "aboveleft", 3)) ++ break; ++ cmdmod.split |= WSP_ABOVE; ++ continue; ++ ++ case 'b': if (checkforcmd(&eap->cmd, "belowright", 3)) ++ { ++ cmdmod.split |= WSP_BELOW; ++ continue; ++ } ++ if (checkforcmd(&eap->cmd, "browse", 3)) ++ { ++ #ifdef FEAT_BROWSE_CMD ++ cmdmod.browse = TRUE; ++ #endif ++ continue; ++ } ++ if (!checkforcmd(&eap->cmd, "botright", 2)) ++ break; ++ cmdmod.split |= WSP_BOT; ++ continue; ++ ++ case 'c': if (!checkforcmd(&eap->cmd, "confirm", 4)) ++ break; ++ #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) ++ cmdmod.confirm = TRUE; ++ #endif ++ continue; ++ ++ case 'k': if (checkforcmd(&eap->cmd, "keepmarks", 3)) ++ { ++ cmdmod.keepmarks = TRUE; ++ continue; ++ } ++ if (checkforcmd(&eap->cmd, "keepalt", 5)) ++ { ++ cmdmod.keepalt = TRUE; ++ continue; ++ } ++ if (checkforcmd(&eap->cmd, "keeppatterns", 5)) ++ { ++ cmdmod.keeppatterns = TRUE; ++ continue; ++ } ++ if (!checkforcmd(&eap->cmd, "keepjumps", 5)) ++ break; ++ cmdmod.keepjumps = TRUE; ++ continue; ++ ++ case 'f': /* only accept ":filter {pat} cmd" */ ++ { ++ char_u *reg_pat; ++ ++ if (!checkforcmd(&p, "filter", 4) ++ || *p == NUL || ends_excmd(*p)) ++ break; ++ if (*p == '!') ++ { ++ cmdmod.filter_force = TRUE; ++ p = skipwhite(p + 1); ++ if (*p == NUL || ends_excmd(*p)) ++ break; ++ } ++ p = skip_vimgrep_pat(p, ®_pat, NULL); ++ if (p == NULL || *p == NUL) ++ break; ++ cmdmod.filter_regmatch.regprog = ++ vim_regcomp(reg_pat, RE_MAGIC); ++ if (cmdmod.filter_regmatch.regprog == NULL) ++ break; ++ eap->cmd = p; ++ continue; ++ } ++ ++ /* ":hide" and ":hide | cmd" are not modifiers */ ++ case 'h': if (p != eap->cmd || !checkforcmd(&p, "hide", 3) ++ || *p == NUL || ends_excmd(*p)) ++ break; ++ eap->cmd = p; ++ cmdmod.hide = TRUE; ++ continue; ++ ++ case 'l': if (checkforcmd(&eap->cmd, "lockmarks", 3)) ++ { ++ cmdmod.lockmarks = TRUE; ++ continue; ++ } ++ ++ if (!checkforcmd(&eap->cmd, "leftabove", 5)) ++ break; ++ cmdmod.split |= WSP_ABOVE; ++ continue; ++ ++ case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3)) ++ { ++ if (cmdmod.save_ei == NULL) ++ { ++ /* Set 'eventignore' to "all". Restore the ++ * existing option value later. */ ++ cmdmod.save_ei = vim_strsave(p_ei); ++ set_string_option_direct((char_u *)"ei", -1, ++ (char_u *)"all", OPT_FREE, SID_NONE); ++ } ++ continue; ++ } ++ if (!checkforcmd(&eap->cmd, "noswapfile", 3)) ++ break; ++ cmdmod.noswapfile = TRUE; ++ continue; ++ ++ case 'r': if (!checkforcmd(&eap->cmd, "rightbelow", 6)) ++ break; ++ cmdmod.split |= WSP_BELOW; ++ continue; ++ ++ case 's': if (checkforcmd(&eap->cmd, "sandbox", 3)) ++ { ++ #ifdef HAVE_SANDBOX ++ if (!eap->did_sandbox) ++ ++sandbox; ++ eap->did_sandbox = TRUE; ++ #endif ++ continue; ++ } ++ if (!checkforcmd(&eap->cmd, "silent", 3)) ++ break; ++ if (eap->save_msg_silent == -1) ++ eap->save_msg_silent = msg_silent; ++ ++msg_silent; ++ if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1])) ++ { ++ /* ":silent!", but not "silent !cmd" */ ++ eap->cmd = skipwhite(eap->cmd + 1); ++ ++emsg_silent; ++ ++eap->did_esilent; ++ } ++ continue; ++ ++ case 't': if (checkforcmd(&p, "tab", 3)) ++ { ++ long tabnr = get_address(eap, &eap->cmd, ADDR_TABS, ++ eap->skip, FALSE, 1); ++ if (tabnr == MAXLNUM) ++ cmdmod.tab = tabpage_index(curtab) + 1; ++ else ++ { ++ if (tabnr < 0 || tabnr > LAST_TAB_NR) ++ { ++ *errormsg = (char_u *)_(e_invrange); ++ return FAIL; ++ } ++ cmdmod.tab = tabnr + 1; ++ } ++ eap->cmd = p; ++ continue; ++ } ++ if (!checkforcmd(&eap->cmd, "topleft", 2)) ++ break; ++ cmdmod.split |= WSP_TOP; ++ continue; ++ ++ case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3)) ++ break; ++ if (eap->save_msg_silent == -1) ++ eap->save_msg_silent = msg_silent; ++ msg_silent = 0; ++ continue; ++ ++ case 'v': if (checkforcmd(&eap->cmd, "vertical", 4)) ++ { ++ cmdmod.split |= WSP_VERT; ++ continue; ++ } ++ if (!checkforcmd(&p, "verbose", 4)) ++ break; ++ if (eap->verbose_save < 0) ++ eap->verbose_save = p_verbose; ++ if (vim_isdigit(*eap->cmd)) ++ p_verbose = atoi((char *)eap->cmd); ++ else ++ p_verbose = 1; ++ eap->cmd = p; ++ continue; ++ } ++ break; ++ } ++ ++ return OK; ++ } ++ ++ /* + * Parse the address range, if any, in "eap". + * Return FAIL and set "errormsg" or return OK. + */ +*** ../vim-8.1.0280/src/proto/ex_docmd.pro 2018-08-10 23:13:07.934024645 +0200 +--- src/proto/ex_docmd.pro 2018-08-13 23:24:18.797373050 +0200 +*************** +*** 4,9 **** +--- 4,10 ---- + int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags); + int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int)); + void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie); ++ int parse_command_modifiers(exarg_T *eap, char_u **errormsg); + int parse_cmd_address(exarg_T *eap, char_u **errormsg); + int checkforcmd(char_u **pp, char *cmd, int len); + int modifier_len(char_u *cmd); +*** ../vim-8.1.0280/src/ex_cmds.h 2018-07-10 19:39:14.994973018 +0200 +--- src/ex_cmds.h 2018-08-13 23:25:36.236870329 +0200 +*************** +*** 1792,1797 **** +--- 1792,1803 ---- + #ifdef FEAT_EVAL + struct condstack *cstack; /* condition stack for ":if" etc. */ + #endif ++ long verbose_save; // saved value of p_verbose ++ int save_msg_silent; // saved value of msg_silent ++ int did_esilent; // how many times emsg_silent was incremented ++ #ifdef HAVE_SANDBOX ++ int did_sandbox; // when TRUE did ++sandbox ++ #endif + }; + + #define FORCE_BIN 1 /* ":edit ++bin file" */ +*** ../vim-8.1.0280/src/globals.h 2018-08-11 16:40:39.064311995 +0200 +--- src/globals.h 2018-08-13 23:18:14.323704509 +0200 +*************** +*** 678,685 **** + * changed, no buffer can be deleted and + * current directory can't be changed. + * Used for SwapExists et al. */ +! #ifdef FEAT_EVAL +! # define HAVE_SANDBOX + EXTERN int sandbox INIT(= 0); + /* Non-zero when evaluating an expression in a + * "sandbox". Several things are not allowed +--- 678,684 ---- + * changed, no buffer can be deleted and + * current directory can't be changed. + * Used for SwapExists et al. */ +! #ifdef HAVE_SANDBOX + EXTERN int sandbox INIT(= 0); + /* Non-zero when evaluating an expression in a + * "sandbox". Several things are not allowed +*** ../vim-8.1.0280/src/feature.h 2018-07-29 16:09:14.644945560 +0200 +--- src/feature.h 2018-08-13 23:19:07.623368124 +0200 +*************** +*** 355,360 **** +--- 355,364 ---- + # endif + #endif + ++ #ifdef FEAT_EVAL ++ # define HAVE_SANDBOX ++ #endif ++ + /* + * +profile Profiling for functions and scripts. + */ +*** ../vim-8.1.0280/src/version.c 2018-08-13 22:54:31.456665135 +0200 +--- src/version.c 2018-08-13 23:04:38.032484283 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 281, + /**/ + +-- +Violators can be fined, arrested or jailed for making ugly faces at a dog. + [real standing law in Oklahoma, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0282 b/data/vim/patches/8.1.0282 new file mode 100644 index 000000000..7b827f49f --- /dev/null +++ b/data/vim/patches/8.1.0282 @@ -0,0 +1,507 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0282 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0282 +Problem: 'incsearch' does not work with command modifiers. +Solution: Skip command modifiers. +Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/ex_getln.c, + src/testdir/test_search.vim + + +*** ../vim-8.1.0281/src/ex_docmd.c 2018-08-14 13:38:12.744559267 +0200 +--- src/ex_docmd.c 2018-08-14 16:00:53.341893598 +0200 +*************** +*** 68,73 **** +--- 68,74 ---- + static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie); + static int if_level = 0; /* depth in :if */ + #endif ++ static void free_cmdmod(void); + static void append_command(char_u *cmd); + static char_u *find_command(exarg_T *eap, int *full); + +*************** +*** 1741,1750 **** + if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!') + goto doend; + +! /* +! * Repeat until no more command modifiers are found. +! * The "ea" structure holds the arguments that can be used. +! */ + ea.cmd = *cmdlinep; + ea.cmdlinep = cmdlinep; + ea.getline = fgetline; +--- 1742,1752 ---- + if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!') + goto doend; + +! /* +! * 1. Skip comment lines and leading white space and colons. +! * 2. Handle command modifiers. +! */ +! // The "ea" structure holds the arguments that can be used. + ea.cmd = *cmdlinep; + ea.cmdlinep = cmdlinep; + ea.getline = fgetline; +*************** +*** 1752,1758 **** + #ifdef FEAT_EVAL + ea.cstack = cstack; + #endif +! if (parse_command_modifiers(&ea, &errormsg) == FAIL) + goto doend; + + after_modifier = ea.cmd; +--- 1754,1760 ---- + #ifdef FEAT_EVAL + ea.cstack = cstack; + #endif +! if (parse_command_modifiers(&ea, &errormsg, FALSE) == FAIL) + goto doend; + + after_modifier = ea.cmd; +*************** +*** 2553,2569 **** + if (ea.verbose_save >= 0) + p_verbose = ea.verbose_save; + +! if (cmdmod.save_ei != NULL) +! { +! /* Restore 'eventignore' to the value before ":noautocmd". */ +! set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei, +! OPT_FREE, SID_NONE); +! free_string_option(cmdmod.save_ei); +! } +! +! if (cmdmod.filter_regmatch.regprog != NULL) +! vim_regfree(cmdmod.filter_regmatch.regprog); +! + cmdmod = save_cmdmod; + + if (ea.save_msg_silent != -1) +--- 2555,2561 ---- + if (ea.verbose_save >= 0) + p_verbose = ea.verbose_save; + +! free_cmdmod(); + cmdmod = save_cmdmod; + + if (ea.save_msg_silent != -1) +*************** +*** 2609,2621 **** + * - store flags in "cmdmod". + * - Set ex_pressedreturn for an empty command line. + * - set msg_silent for ":silent" + * - set p_verbose for ":verbose" + * - Increment "sandbox" for ":sandbox" + * Return FAIL when the command is not to be executed. + * May set "errormsg" to an error message. + */ + int +! parse_command_modifiers(exarg_T *eap, char_u **errormsg) + { + char_u *p; + +--- 2601,2616 ---- + * - store flags in "cmdmod". + * - Set ex_pressedreturn for an empty command line. + * - set msg_silent for ":silent" ++ * - set 'eventignore' to "all" for ":noautocmd" + * - set p_verbose for ":verbose" + * - Increment "sandbox" for ":sandbox" ++ * When "skip_only" is TRUE the global variables are not changed, except for ++ * "cmdmod". + * Return FAIL when the command is not to be executed. + * May set "errormsg" to an error message. + */ + int +! parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only) + { + char_u *p; + +*************** +*** 2623,2633 **** + eap->verbose_save = -1; + eap->save_msg_silent = -1; + + for (;;) + { +- /* +- * 1. Skip comment lines and leading white space and colons. +- */ + while (*eap->cmd == ' ' || *eap->cmd == '\t' || *eap->cmd == ':') + ++eap->cmd; + +--- 2618,2626 ---- + eap->verbose_save = -1; + eap->save_msg_silent = -1; + ++ // Repeat until no more command modifiers are found. + for (;;) + { + while (*eap->cmd == ' ' || *eap->cmd == '\t' || *eap->cmd == ':') + ++eap->cmd; + +*************** +*** 2638,2644 **** + && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) + { + eap->cmd = (char_u *)"+"; +! ex_pressedreturn = TRUE; + } + + /* ignore comment and empty lines */ +--- 2631,2638 ---- + && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) + { + eap->cmd = (char_u *)"+"; +! if (!skip_only) +! ex_pressedreturn = TRUE; + } + + /* ignore comment and empty lines */ +*************** +*** 2646,2658 **** + return FAIL; + if (*eap->cmd == NUL) + { +! ex_pressedreturn = TRUE; + return FAIL; + } + +- /* +- * 2. Handle command modifiers. +- */ + p = skip_range(eap->cmd, NULL); + switch (*p) + { +--- 2640,2650 ---- + return FAIL; + if (*eap->cmd == NUL) + { +! if (!skip_only) +! ex_pressedreturn = TRUE; + return FAIL; + } + + p = skip_range(eap->cmd, NULL); + switch (*p) + { +*************** +*** 2720,2732 **** + if (*p == NUL || ends_excmd(*p)) + break; + } +! p = skip_vimgrep_pat(p, ®_pat, NULL); + if (p == NULL || *p == NUL) + break; +! cmdmod.filter_regmatch.regprog = + vim_regcomp(reg_pat, RE_MAGIC); +! if (cmdmod.filter_regmatch.regprog == NULL) +! break; + eap->cmd = p; + continue; + } +--- 2712,2731 ---- + if (*p == NUL || ends_excmd(*p)) + break; + } +! if (skip_only) +! p = skip_vimgrep_pat(p, NULL, NULL); +! else +! // NOTE: This puts a NUL after the pattern. +! p = skip_vimgrep_pat(p, ®_pat, NULL); + if (p == NULL || *p == NUL) + break; +! if (!skip_only) +! { +! cmdmod.filter_regmatch.regprog = + vim_regcomp(reg_pat, RE_MAGIC); +! if (cmdmod.filter_regmatch.regprog == NULL) +! break; +! } + eap->cmd = p; + continue; + } +*************** +*** 2752,2758 **** + + case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3)) + { +! if (cmdmod.save_ei == NULL) + { + /* Set 'eventignore' to "all". Restore the + * existing option value later. */ +--- 2751,2757 ---- + + case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3)) + { +! if (cmdmod.save_ei == NULL && !skip_only) + { + /* Set 'eventignore' to "all". Restore the + * existing option value later. */ +*************** +*** 2775,2797 **** + case 's': if (checkforcmd(&eap->cmd, "sandbox", 3)) + { + #ifdef HAVE_SANDBOX +! if (!eap->did_sandbox) +! ++sandbox; +! eap->did_sandbox = TRUE; + #endif + continue; + } + if (!checkforcmd(&eap->cmd, "silent", 3)) + break; +! if (eap->save_msg_silent == -1) +! eap->save_msg_silent = msg_silent; +! ++msg_silent; + if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1])) + { + /* ":silent!", but not "silent !cmd" */ + eap->cmd = skipwhite(eap->cmd + 1); +! ++emsg_silent; +! ++eap->did_esilent; + } + continue; + +--- 2774,2805 ---- + case 's': if (checkforcmd(&eap->cmd, "sandbox", 3)) + { + #ifdef HAVE_SANDBOX +! if (!skip_only) +! { +! if (!eap->did_sandbox) +! ++sandbox; +! eap->did_sandbox = TRUE; +! } + #endif + continue; + } + if (!checkforcmd(&eap->cmd, "silent", 3)) + break; +! if (!skip_only) +! { +! if (eap->save_msg_silent == -1) +! eap->save_msg_silent = msg_silent; +! ++msg_silent; +! } + if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1])) + { + /* ":silent!", but not "silent !cmd" */ + eap->cmd = skipwhite(eap->cmd + 1); +! if (!skip_only) +! { +! ++emsg_silent; +! ++eap->did_esilent; +! } + } + continue; + +*************** +*** 2820,2828 **** + + case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3)) + break; +! if (eap->save_msg_silent == -1) +! eap->save_msg_silent = msg_silent; +! msg_silent = 0; + continue; + + case 'v': if (checkforcmd(&eap->cmd, "vertical", 4)) +--- 2828,2839 ---- + + case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3)) + break; +! if (!skip_only) +! { +! if (eap->save_msg_silent == -1) +! eap->save_msg_silent = msg_silent; +! msg_silent = 0; +! } + continue; + + case 'v': if (checkforcmd(&eap->cmd, "vertical", 4)) +*************** +*** 2832,2843 **** + } + if (!checkforcmd(&p, "verbose", 4)) + break; +! if (eap->verbose_save < 0) +! eap->verbose_save = p_verbose; +! if (vim_isdigit(*eap->cmd)) +! p_verbose = atoi((char *)eap->cmd); +! else +! p_verbose = 1; + eap->cmd = p; + continue; + } +--- 2843,2857 ---- + } + if (!checkforcmd(&p, "verbose", 4)) + break; +! if (!skip_only) +! { +! if (eap->verbose_save < 0) +! eap->verbose_save = p_verbose; +! if (vim_isdigit(*eap->cmd)) +! p_verbose = atoi((char *)eap->cmd); +! else +! p_verbose = 1; +! } + eap->cmd = p; + continue; + } +*************** +*** 2848,2853 **** +--- 2862,2885 ---- + } + + /* ++ * Free contents of "cmdmod". ++ */ ++ static void ++ free_cmdmod(void) ++ { ++ if (cmdmod.save_ei != NULL) ++ { ++ /* Restore 'eventignore' to the value before ":noautocmd". */ ++ set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei, ++ OPT_FREE, SID_NONE); ++ free_string_option(cmdmod.save_ei); ++ } ++ ++ if (cmdmod.filter_regmatch.regprog != NULL) ++ vim_regfree(cmdmod.filter_regmatch.regprog); ++ } ++ ++ /* + * Parse the address range, if any, in "eap". + * Return FAIL and set "errormsg" or return OK. + */ +*** ../vim-8.1.0281/src/proto/ex_docmd.pro 2018-08-14 13:38:12.744559267 +0200 +--- src/proto/ex_docmd.pro 2018-08-14 15:27:07.371906192 +0200 +*************** +*** 4,10 **** + int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags); + int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int)); + void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie); +! int parse_command_modifiers(exarg_T *eap, char_u **errormsg); + int parse_cmd_address(exarg_T *eap, char_u **errormsg); + int checkforcmd(char_u **pp, char *cmd, int len); + int modifier_len(char_u *cmd); +--- 4,10 ---- + int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags); + int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int)); + void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie); +! int parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only); + int parse_cmd_address(exarg_T *eap, char_u **errormsg); + int checkforcmd(char_u **pp, char *cmd, int len); + int modifier_len(char_u *cmd); +*** ../vim-8.1.0281/src/ex_getln.c 2018-08-13 22:54:31.456665135 +0200 +--- src/ex_getln.c 2018-08-14 15:27:03.303934870 +0200 +*************** +*** 283,293 **** + return TRUE; + if (firstc == ':') + { +! char_u *cmd = skip_range(ccline.cmdbuff, NULL); +! char_u *p; +! int delim; +! char_u *end; + + if (*cmd == 's' || *cmd == 'g' || *cmd == 'v') + { + // Skip over "substitute" to find the pattern separator. +--- 283,306 ---- + return TRUE; + if (firstc == ':') + { +! char_u *cmd; +! cmdmod_T save_cmdmod = cmdmod; +! char_u *p; +! int delim; +! char_u *end; +! char_u *dummy; +! exarg_T ea; + ++ vim_memset(&ea, 0, sizeof(ea)); ++ ea.line1 = 1; ++ ea.line2 = 1; ++ ea.cmd = ccline.cmdbuff; ++ ea.addr_type = ADDR_LINES; ++ ++ parse_command_modifiers(&ea, &dummy, TRUE); ++ cmdmod = save_cmdmod; ++ ++ cmd = skip_range(ea.cmd, NULL); + if (*cmd == 's' || *cmd == 'g' || *cmd == 'v') + { + // Skip over "substitute" to find the pattern separator. +*************** +*** 310,317 **** + end = skip_regexp(p, delim, p_magic, NULL); + if (end > p || *end == delim) + { +- char_u *dummy; +- exarg_T ea; + pos_T save_cursor = curwin->w_cursor; + + // found a non-empty pattern +--- 323,328 ---- +*************** +*** 319,329 **** + *patlen = (int)(end - p); + + // parse the address range +- vim_memset(&ea, 0, sizeof(ea)); +- ea.line1 = 1; +- ea.line2 = 1; +- ea.cmd = ccline.cmdbuff; +- ea.addr_type = ADDR_LINES; + curwin->w_cursor = is_state->search_start; + parse_cmd_address(&ea, &dummy); + if (ea.addr_count > 0) +--- 330,335 ---- +*** ../vim-8.1.0281/src/testdir/test_search.vim 2018-08-13 22:54:31.456665135 +0200 +--- src/testdir/test_search.vim 2018-08-14 16:01:44.561537663 +0200 +*************** +*** 884,889 **** +--- 884,895 ---- + call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {}) + call term_sendkeys(buf, "\") + ++ " Command modifiers are skipped ++ call term_sendkeys(buf, ':above below browse botr confirm keepmar keepalt keeppat keepjum filter xxx hide lockm leftabove noau noswap rightbel sandbox silent silent! $tab top unsil vert verbose 4,5s/fo.') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_06', {}) ++ call term_sendkeys(buf, "\") ++ + call StopVimInTerminal(buf) + call delete('Xis_subst_script') + endfunc +*** ../vim-8.1.0281/src/version.c 2018-08-14 13:38:12.748559237 +0200 +--- src/version.c 2018-08-14 16:02:48.537093003 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 282, + /**/ + +-- +It is illegal to take more than three sips of beer at a time while standing. + [real standing law in Texas, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0283 b/data/vim/patches/8.1.0283 new file mode 100644 index 000000000..ce5c1081e --- /dev/null +++ b/data/vim/patches/8.1.0283 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0283 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0283 (after 8.1.0282) +Problem: Missing test dump. +Solution: Add the dump file +Files: src/testdir/dumps/Test_incsearch_substitute_06.dump + + +*** ../vim-8.1.0282/src/testdir/dumps/Test_incsearch_substitute_06.dump 2018-08-14 17:28:14.092380326 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_06.dump 2018-08-14 16:01:48.877507668 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |3| @64 ++ |f+1&&|o@1| +0&&|4| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |:|a|b|o|v|e| |b|e|l|o|w| |b|r|o|w|s|e| |b|o|t|r| |c|o|n|f|i|r|m| |k|e@1|p|m|a|r| |k|e@1|p|a|l|t| |k|e@1|p@1|a|t| |k|e@1|p|j|u|m| |f|i|l|t|e ++ |r| |x@2| |h|i|d|e| |l|o|c|k|m| |l|e|f|t|a|b|o|v|e| |n|o|a|u| |n|o|s|w|a|p| |r|i|g|h|t|b|e|l| |s|a|n|d|b|o|x| |s|i|l|e|n|t| |s|i|l|e|n|t|! ++ | |$|t|a|b| |t|o|p| |u|n|s|i|l| |v|e|r|t| |v|e|r|b|o|s|e| |4|,|5|s|/|f|o|.> @32 +*** ../vim-8.1.0282/src/version.c 2018-08-14 16:06:09.455696035 +0200 +--- src/version.c 2018-08-14 17:27:02.916917347 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 283, + /**/ + +-- +Lawmakers made it obligatory for everybody to take at least one bath +each week -- on Saturday night. + [real standing law in Vermont, United States of America] + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0284 b/data/vim/patches/8.1.0284 new file mode 100644 index 000000000..a9e230594 --- /dev/null +++ b/data/vim/patches/8.1.0284 @@ -0,0 +1,115 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0284 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0284 +Problem: 'cursorline' highlighting wrong with 'incsearch'. +Solution: Move the cursor back if the match is outside the range. +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_substitute_07.dump + src/testdir/dumps/Test_incsearch_substitute_08.dump + + +*** ../vim-8.1.0283/src/ex_getln.c 2018-08-14 16:06:09.455696035 +0200 +--- src/ex_getln.c 2018-08-14 18:14:34.864316635 +0200 +*************** +*** 480,487 **** +--- 480,490 ---- + + if (curwin->w_cursor.lnum < search_first_line + || curwin->w_cursor.lnum > search_last_line) ++ { + // match outside of address range + i = 0; ++ curwin->w_cursor = is_state->search_start; ++ } + + // if interrupted while searching, behave like it failed + if (got_int) +*** ../vim-8.1.0283/src/testdir/test_search.vim 2018-08-14 16:06:09.455696035 +0200 +--- src/testdir/test_search.vim 2018-08-14 18:10:01.346273292 +0200 +*************** +*** 839,844 **** +--- 839,845 ---- + \ 'for n in range(1, 10)', + \ ' call setline(n, "foo " . n)', + \ 'endfor', ++ \ 'call setline(11, "bar 11")', + \ '3', + \ ], 'Xis_subst_script') + let buf = RunVimInTerminal('-S Xis_subst_script', {'rows': 9, 'cols': 70}) +*************** +*** 890,895 **** +--- 891,910 ---- + call VerifyScreenDump(buf, 'Test_incsearch_substitute_06', {}) + call term_sendkeys(buf, "\") + ++ " Cursorline highlighting at match ++ call term_sendkeys(buf, ":set cursorline\") ++ call term_sendkeys(buf, 'G9G') ++ call term_sendkeys(buf, ':9,11s/bar') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_07', {}) ++ call term_sendkeys(buf, "\") ++ ++ " Cursorline highlighting at cursor when no match ++ call term_sendkeys(buf, ':9,10s/bar') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {}) ++ call term_sendkeys(buf, "\") ++ + call StopVimInTerminal(buf) + call delete('Xis_subst_script') + endfunc +*** ../vim-8.1.0283/src/testdir/dumps/Test_incsearch_substitute_07.dump 2018-08-14 18:16:06.747659260 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_07.dump 2018-08-14 18:12:01.497413817 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |4| @64 ++ |f|o@1| |5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |f|o@1| |9| @64 ++ |f|o@1| |1|0| @63 ++ |b+9&&|a|r| +8&&|1@1| @63 ++ |:+0&&|9|,|1@1|s|/|b|a|r> @59 +*** ../vim-8.1.0283/src/testdir/dumps/Test_incsearch_substitute_08.dump 2018-08-14 18:16:06.755659202 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_08.dump 2018-08-14 18:14:43.136257456 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |4| @64 ++ |f|o@1| |5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |f+8&&|o@1| |9| @64 ++ |f+0&&|o@1| |1|0| @63 ++ |b|a|r| |1@1| @63 ++ |:|9|,|1|0|s|/|b|a|r> @59 +*** ../vim-8.1.0283/src/version.c 2018-08-14 17:28:42.408167699 +0200 +--- src/version.c 2018-08-14 18:11:55.033460059 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 284, + /**/ + + +-- +If you only have a hammer, you tend to see every problem as a nail. +If you only have MS-Windows, you tend to solve every problem by rebooting. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0285 b/data/vim/patches/8.1.0285 new file mode 100644 index 000000000..c0eff3b5f --- /dev/null +++ b/data/vim/patches/8.1.0285 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0285 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0285 +Problem: Compiler warning for conversion. +Solution: Add a type cast. (Mike Williams) +Files: src/ex_getln.c + + +*** ../vim-8.1.0284/src/ex_getln.c 2018-08-14 18:16:30.683488007 +0200 +--- src/ex_getln.c 2018-08-14 20:12:43.682942699 +0200 +*************** +*** 580,586 **** + { + pat = last_search_pattern(); + skiplen = 0; +! patlen = STRLEN(pat); + } + else + pat = ccline.cmdbuff + skiplen; +--- 580,586 ---- + { + pat = last_search_pattern(); + skiplen = 0; +! patlen = (int)STRLEN(pat); + } + else + pat = ccline.cmdbuff + skiplen; +*** ../vim-8.1.0284/src/version.c 2018-08-14 18:16:30.683488007 +0200 +--- src/version.c 2018-08-14 20:13:26.694695333 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 285, + /**/ + +-- +Living on Earth includes an annual free trip around the Sun. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0286 b/data/vim/patches/8.1.0286 new file mode 100644 index 000000000..d6507bdf9 --- /dev/null +++ b/data/vim/patches/8.1.0286 @@ -0,0 +1,104 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0286 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0286 +Problem: 'incsearch' does not apply to :smagic and :snomagic. +Solution: Add support. (Hirohito Higashi) +Files: src/ex_getln.c, src/testdir/test_search.vim + + +*** ../vim-8.1.0285/src/ex_getln.c 2018-08-14 20:18:22.680907439 +0200 +--- src/ex_getln.c 2018-08-14 21:10:45.311635658 +0200 +*************** +*** 231,236 **** +--- 231,237 ---- + pos_T match_end; + int did_incsearch; + int incsearch_postponed; ++ int magic_save; + } incsearch_state_T; + + static void +*************** +*** 239,244 **** +--- 240,246 ---- + is_state->match_start = curwin->w_cursor; + is_state->did_incsearch = FALSE; + is_state->incsearch_postponed = FALSE; ++ is_state->magic_save = p_magic; + CLEAR_POS(&is_state->match_end); + is_state->save_cursor = curwin->w_cursor; // may be restored later + is_state->search_start = curwin->w_cursor; +*************** +*** 308,316 **** +--- 310,325 ---- + ; + if (*skipwhite(p) != NUL + && (STRNCMP(cmd, "substitute", p - cmd) == 0 ++ || STRNCMP(cmd, "smagic", p - cmd) == 0 ++ || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0 + || STRNCMP(cmd, "global", p - cmd) == 0 + || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { ++ if (*cmd == 's' && cmd[1] == 'm') ++ p_magic = TRUE; ++ else if (*cmd == 's' && cmd[1] == 'n') ++ p_magic = FALSE; ++ + // Check for "global!/". + if (*cmd == 'g' && *p == '!') + { +*************** +*** 392,397 **** +--- 401,407 ---- + update_screen(SOME_VALID); + else + redraw_all_later(SOME_VALID); ++ p_magic = is_state->magic_save; + } + } + +*** ../vim-8.1.0285/src/testdir/test_search.vim 2018-08-14 18:16:30.683488007 +0200 +--- src/testdir/test_search.vim 2018-08-14 21:10:45.315635631 +0200 +*************** +*** 384,389 **** +--- 384,397 ---- + undo + call feedkeys(":%substitute/the\/xxx\", 'tx') + call assert_equal(' 2 xxxe', getline('.')) ++ undo ++ call feedkeys(":%smagic/the.e/xxx\", 'tx') ++ call assert_equal(' 2 xxx', getline('.')) ++ undo ++ call assert_fails(":%snomagic/the.e/xxx\", 'E486') ++ " ++ call feedkeys(":%snomagic/the\\.e/xxx\", 'tx') ++ call assert_equal(' 2 xxx', getline('.')) + + call Incsearch_cleanup() + endfunc +*** ../vim-8.1.0285/src/version.c 2018-08-14 20:18:22.680907439 +0200 +--- src/version.c 2018-08-14 21:11:49.531195730 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 286, + /**/ + +-- +ARTHUR: If you do not open these doors, we will take this castle by force ... + [A bucket of slops land on ARTHUR. He tries to retain his dignity.] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0287 b/data/vim/patches/8.1.0287 new file mode 100644 index 000000000..39b473cf5 --- /dev/null +++ b/data/vim/patches/8.1.0287 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0287 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0287 +Problem: MAX is not defined everywhere. +Solution: Define MAX where needed. +Files: src/ex_getln.c + + +*** ../vim-8.1.0286/src/ex_getln.c 2018-08-14 21:32:17.618865046 +0200 +--- src/ex_getln.c 2018-08-14 22:06:55.372214929 +0200 +*************** +*** 13,18 **** +--- 13,22 ---- + + #include "vim.h" + ++ #ifndef MAX ++ # define MAX(x,y) ((x) > (y) ? (x) : (y)) ++ #endif ++ + /* + * Variables shared between getcmdline(), redrawcmdline() and others. + * These need to be saved when using CTRL-R |, that's why they are in a +*** ../vim-8.1.0286/src/version.c 2018-08-14 21:32:17.622865020 +0200 +--- src/version.c 2018-08-14 22:07:40.275897998 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 287, + /**/ + +-- +BEDEVERE: Stand by for attack!! + [CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege + towers, pennants flying, shouts of "Stand by for attack!" Traditional + army build-up shots. The shouts echo across the ranks of the army. + We see various groups reacting, and stirring themselves in readiness.] +ARTHUR: Who are they? +BEDEVERE: Oh, just some friends! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0288 b/data/vim/patches/8.1.0288 new file mode 100644 index 000000000..60c71cca8 --- /dev/null +++ b/data/vim/patches/8.1.0288 @@ -0,0 +1,498 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0288 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0288 +Problem: Quickfix code uses cmdidx too often. +Solution: Add is_loclist_cmd(). (Yegappan Lakshmanan) +Files: src/ex_docmd.c, src/proto/ex_docmd.pro, src/quickfix.c + + +*** ../vim-8.1.0287/src/ex_docmd.c 2018-08-14 16:06:09.451696062 +0200 +--- src/ex_docmd.c 2018-08-15 20:53:22.429089025 +0200 +*************** +*** 12529,12534 **** +--- 12529,12548 ---- + } + #endif + ++ #ifdef FEAT_QUICKFIX ++ /* ++ * Returns TRUE if the supplied Ex cmdidx is for a location list command ++ * instead of a quickfix command. ++ */ ++ int ++ is_loclist_cmd(int cmdidx) ++ { ++ if (cmdidx < 0 || cmdidx > CMD_SIZE) ++ return FALSE; ++ return cmdnames[cmdidx].cmd_name[0] == 'l'; ++ } ++ #endif ++ + # if defined(FEAT_TIMERS) || defined(PROTO) + int + get_pressedreturn(void) +*** ../vim-8.1.0287/src/proto/ex_docmd.pro 2018-08-14 16:06:09.451696062 +0200 +--- src/proto/ex_docmd.pro 2018-08-15 20:50:10.242164053 +0200 +*************** +*** 70,75 **** +--- 70,76 ---- + char_u *get_messages_arg(expand_T *xp, int idx); + char_u *get_mapclear_arg(expand_T *xp, int idx); + void set_no_hlsearch(int flag); ++ int is_loclist_cmd(int cmdidx); + int get_pressedreturn(void); + void set_pressedreturn(int val); + /* vim: set ft=c : */ +*** ../vim-8.1.0287/src/quickfix.c 2018-08-11 13:36:51.806140673 +0200 +--- src/quickfix.c 2018-08-15 20:50:10.242164053 +0200 +*************** +*** 3330,3336 **** + recognised errors */ + qf_info_T *qi = &ql_info; + +! if (eap->cmdidx == CMD_llist) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 3330,3336 ---- + recognised errors */ + qf_info_T *qi = &ql_info; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 3478,3484 **** + qf_info_T *qi = &ql_info; + int count; + +! if (eap->cmdidx == CMD_lolder || eap->cmdidx == CMD_lnewer) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 3478,3484 ---- + qf_info_T *qi = &ql_info; + int count; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 3526,3532 **** + qf_info_T *qi = &ql_info; + int i; + +! if (eap->cmdidx == CMD_lhistory) + qi = GET_LOC_LIST(curwin); + if (qi == NULL || (qi->qf_listcount == 0 + && qf_list_empty(qi, qi->qf_curlist))) +--- 3526,3532 ---- + qf_info_T *qi = &ql_info; + int i; + +! if (is_loclist_cmd(eap->cmdidx)) + qi = GET_LOC_LIST(curwin); + if (qi == NULL || (qi->qf_listcount == 0 + && qf_list_empty(qi, qi->qf_curlist))) +*************** +*** 3745,3751 **** + qf_info_T *qi = &ql_info; + win_T *win; + +! if (eap->cmdidx == CMD_lwindow) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 3745,3751 ---- + qf_info_T *qi = &ql_info; + win_T *win; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 3781,3787 **** + win_T *win = NULL; + qf_info_T *qi = &ql_info; + +! if (eap->cmdidx == CMD_lclose || eap->cmdidx == CMD_lwindow) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 3781,3787 ---- + win_T *win = NULL; + qf_info_T *qi = &ql_info; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 3808,3814 **** + buf_T *qf_buf; + win_T *oldwin = curwin; + +! if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 3808,3814 ---- + buf_T *qf_buf; + win_T *oldwin = curwin; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 3953,3964 **** + * :cbottom/:lbottom commands. + */ + void +! ex_cbottom(exarg_T *eap UNUSED) + { + qf_info_T *qi = &ql_info; + win_T *win; + +! if (eap->cmdidx == CMD_lbottom) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 3953,3964 ---- + * :cbottom/:lbottom commands. + */ + void +! ex_cbottom(exarg_T *eap) + { + qf_info_T *qi = &ql_info; + win_T *win; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 4430,4437 **** + enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc; + #endif + +! if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep +! || eap->cmdidx == CMD_lgrepadd) + wp = curwin; + + autowrite_all(); +--- 4430,4436 ---- + enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc; + #endif + +! if (is_loclist_cmd(eap->cmdidx)) + wp = curwin; + + autowrite_all(); +*************** +*** 4570,4576 **** + int i, sz = 0; + int prev_fnum = 0; + +! if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo) + { + /* Location list */ + qi = GET_LOC_LIST(curwin); +--- 4569,4575 ---- + int i, sz = 0; + int prev_fnum = 0; + +! if (is_loclist_cmd(eap->cmdidx)) + { + /* Location list */ + qi = GET_LOC_LIST(curwin); +*************** +*** 4607,4613 **** + { + qf_info_T *qi = &ql_info; + +! if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo) + { + /* Location list */ + qi = GET_LOC_LIST(curwin); +--- 4606,4612 ---- + { + qf_info_T *qi = &ql_info; + +! if (is_loclist_cmd(eap->cmdidx)) + { + /* Location list */ + qi = GET_LOC_LIST(curwin); +*************** +*** 4631,4637 **** + int i, eidx = 0; + int prev_fnum = 0; + +! if (eap->cmdidx == CMD_ldo || eap->cmdidx == CMD_lfdo) + { + /* Location list */ + qi = GET_LOC_LIST(curwin); +--- 4630,4636 ---- + int i, eidx = 0; + int prev_fnum = 0; + +! if (is_loclist_cmd(eap->cmdidx)) + { + /* Location list */ + qi = GET_LOC_LIST(curwin); +*************** +*** 4724,4735 **** + qf_info_T *qi = &ql_info; + int errornr; + +! if (eap->cmdidx == CMD_ll +! || eap->cmdidx == CMD_lrewind +! || eap->cmdidx == CMD_lfirst +! || eap->cmdidx == CMD_llast +! || eap->cmdidx == CMD_ldo +! || eap->cmdidx == CMD_lfdo) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 4723,4729 ---- + qf_info_T *qi = &ql_info; + int errornr; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 4743,4755 **** + errornr = (int)eap->line2; + else + { +! if (eap->cmdidx == CMD_cc || eap->cmdidx == CMD_ll) +! errornr = 0; +! else if (eap->cmdidx == CMD_crewind || eap->cmdidx == CMD_lrewind +! || eap->cmdidx == CMD_cfirst || eap->cmdidx == CMD_lfirst) +! errornr = 1; +! else +! errornr = 32767; + } + + /* For cdo and ldo commands, jump to the nth valid error. +--- 4737,4754 ---- + errornr = (int)eap->line2; + else + { +! switch (eap->cmdidx) +! { +! case CMD_cc: case CMD_ll: +! errornr = 0; +! break; +! case CMD_crewind: case CMD_lrewind: case CMD_cfirst: +! case CMD_lfirst: +! errornr = 1; +! break; +! default: +! errornr = 32767; +! } + } + + /* For cdo and ldo commands, jump to the nth valid error. +*************** +*** 4774,4788 **** + { + qf_info_T *qi = &ql_info; + int errornr; + +! if (eap->cmdidx == CMD_lnext +! || eap->cmdidx == CMD_lNext +! || eap->cmdidx == CMD_lprevious +! || eap->cmdidx == CMD_lnfile +! || eap->cmdidx == CMD_lNfile +! || eap->cmdidx == CMD_lpfile +! || eap->cmdidx == CMD_ldo +! || eap->cmdidx == CMD_lfdo) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +--- 4773,4781 ---- + { + qf_info_T *qi = &ql_info; + int errornr; ++ int dir; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = GET_LOC_LIST(curwin); + if (qi == NULL) +*************** +*** 4799,4815 **** + else + errornr = 1; + +! qf_jump(qi, (eap->cmdidx == CMD_cnext || eap->cmdidx == CMD_lnext +! || eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo) +! ? FORWARD +! : (eap->cmdidx == CMD_cnfile || eap->cmdidx == CMD_lnfile +! || eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo) +! ? FORWARD_FILE +! : (eap->cmdidx == CMD_cpfile || eap->cmdidx == CMD_lpfile +! || eap->cmdidx == CMD_cNfile || eap->cmdidx == CMD_lNfile) +! ? BACKWARD_FILE +! : BACKWARD, +! errornr, eap->forceit); + } + + /* +--- 4792,4819 ---- + else + errornr = 1; + +! // Depending on the command jump to either next or previous entry/file. +! switch (eap->cmdidx) +! { +! case CMD_cnext: case CMD_lnext: case CMD_cdo: case CMD_ldo: +! dir = FORWARD; +! break; +! case CMD_cprevious: case CMD_lprevious: case CMD_cNext: +! case CMD_lNext: +! dir = BACKWARD; +! break; +! case CMD_cnfile: case CMD_lnfile: case CMD_cfdo: case CMD_lfdo: +! dir = FORWARD_FILE; +! break; +! case CMD_cpfile: case CMD_lpfile: case CMD_cNfile: case CMD_lNfile: +! dir = BACKWARD_FILE; +! break; +! default: +! dir = FORWARD; +! break; +! } +! +! qf_jump(qi, dir, errornr, eap->forceit); + } + + /* +*************** +*** 4857,4865 **** + if (*eap->arg != NUL) + set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0); + +! if (eap->cmdidx == CMD_lfile +! || eap->cmdidx == CMD_lgetfile +! || eap->cmdidx == CMD_laddfile) + wp = curwin; + + /* +--- 4861,4867 ---- + if (*eap->arg != NUL) + set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0); + +! if (is_loclist_cmd(eap->cmdidx)) + wp = curwin; + + /* +*************** +*** 5178,5187 **** + #endif + } + +! if (eap->cmdidx == CMD_lgrep +! || eap->cmdidx == CMD_lvimgrep +! || eap->cmdidx == CMD_lgrepadd +! || eap->cmdidx == CMD_lvimgrepadd) + { + qi = ll_get_or_alloc_list(curwin); + if (qi == NULL) +--- 5180,5186 ---- + #endif + } + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = ll_get_or_alloc_list(curwin); + if (qi == NULL) +*************** +*** 6525,6533 **** + } + + /* Must come after autocommands. */ +! if (eap->cmdidx == CMD_lbuffer +! || eap->cmdidx == CMD_lgetbuffer +! || eap->cmdidx == CMD_laddbuffer) + { + qi = ll_get_or_alloc_list(curwin); + if (qi == NULL) +--- 6524,6530 ---- + } + + /* Must come after autocommands. */ +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = ll_get_or_alloc_list(curwin); + if (qi == NULL) +*************** +*** 6631,6639 **** + #endif + } + +! if (eap->cmdidx == CMD_lexpr +! || eap->cmdidx == CMD_lgetexpr +! || eap->cmdidx == CMD_laddexpr) + { + qi = ll_get_or_alloc_list(curwin); + if (qi == NULL) +--- 6628,6634 ---- + #endif + } + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = ll_get_or_alloc_list(curwin); + if (qi == NULL) +*************** +*** 6922,6928 **** + save_cpo = p_cpo; + p_cpo = empty_option; + +! if (eap->cmdidx == CMD_lhelpgrep) + { + qi = hgr_get_ll(&new_qi); + if (qi == NULL) +--- 6917,6923 ---- + save_cpo = p_cpo; + p_cpo = empty_option; + +! if (is_loclist_cmd(eap->cmdidx)) + { + qi = hgr_get_ll(&new_qi); + if (qi == NULL) +*** ../vim-8.1.0287/src/version.c 2018-08-14 22:08:20.211616525 +0200 +--- src/version.c 2018-08-15 20:51:09.609828450 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 288, + /**/ + +-- +INSPECTOR END OF FILM: Move along. There's nothing to see! Keep moving! + [Suddenly he notices the cameras.] +INSPECTOR END OF FILM: (to Camera) All right, put that away sonny. + [He walks over to it and puts his hand over the lens.] + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0289 b/data/vim/patches/8.1.0289 new file mode 100644 index 000000000..0a3133a45 --- /dev/null +++ b/data/vim/patches/8.1.0289 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0289 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0289 +Problem: Cursor moves to wrong column after quickfix jump. +Solution: Set the curswant flag. (Andy Massimino, closes #3331) +Files: src/quickfix.c, src/testdir/test_quickfix.vim + + +*** ../vim-8.1.0288/src/quickfix.c 2018-08-15 20:59:44.227025009 +0200 +--- src/quickfix.c 2018-08-15 22:24:24.487511768 +0200 +*************** +*** 3010,3015 **** +--- 3010,3016 ---- + ++screen_col; + } + } ++ curwin->w_set_curswant = TRUE; + check_cursor(); + } + else +*** ../vim-8.1.0288/src/testdir/test_quickfix.vim 2018-08-09 21:19:15.778436046 +0200 +--- src/testdir/test_quickfix.vim 2018-08-15 22:24:24.487511768 +0200 +*************** +*** 3546,3548 **** +--- 3546,3557 ---- + call Xview_result_split_tests('c') + call Xview_result_split_tests('l') + endfunc ++ ++ " Test that :cc sets curswant ++ func Test_curswant() ++ helpgrep quickfix ++ normal! llll ++ 1cc ++ call assert_equal(getcurpos()[4], virtcol('.')) ++ cclose | helpclose ++ endfunc +*** ../vim-8.1.0288/src/version.c 2018-08-15 20:59:44.227025009 +0200 +--- src/version.c 2018-08-15 22:26:32.450753305 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 289, + /**/ + +-- +TERRY GILLIAM PLAYED: PATSY (ARTHUR'S TRUSTY STEED), THE GREEN KNIGHT + SOOTHSAYER, BRIDGEKEEPER, SIR GAWAIN (THE FIRST TO BE + KILLED BY THE RABBIT) + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0290 b/data/vim/patches/8.1.0290 new file mode 100644 index 000000000..75aea620e --- /dev/null +++ b/data/vim/patches/8.1.0290 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0290 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0290 +Problem: "cit" on an empty HTML tag changes the whole tag. +Solution: Only adjust the area in Visual mode. (Andy Massimino, + closes #3332) +Files: src/search.c, src/testdir/test_textobjects.vim + + +*** ../vim-8.1.0289/src/search.c 2018-06-19 18:27:38.271694008 +0200 +--- src/search.c 2018-08-16 21:29:39.554118770 +0200 +*************** +*** 4106,4114 **** + } + curwin->w_cursor = end_pos; + +! /* If we now have the same text as before reset "do_include" and try +! * again. */ +! if (EQUAL_POS(start_pos, old_start) && EQUAL_POS(end_pos, old_end)) + { + do_include = TRUE; + curwin->w_cursor = old_start; +--- 4106,4115 ---- + } + curwin->w_cursor = end_pos; + +! // If we are in Visual mode and now have the same text as before set +! // "do_include" and try again. +! if (VIsual_active && EQUAL_POS(start_pos, old_start) +! && EQUAL_POS(end_pos, old_end)) + { + do_include = TRUE; + curwin->w_cursor = old_start; +*** ../vim-8.1.0289/src/testdir/test_textobjects.vim 2018-06-19 18:27:38.271694008 +0200 +--- src/testdir/test_textobjects.vim 2018-08-16 21:33:07.376701569 +0200 +*************** +*** 121,126 **** +--- 121,143 ---- + enew! + endfunc + ++ func Test_empty_html_tag() ++ new ++ call setline(1, '
') ++ normal 0citxxx ++ call assert_equal('
xxx
', getline(1)) ++ ++ call setline(1, '
') ++ normal 0fyyy', getline(1)) ++ ++ call setline(1, '
') ++ normal 0f +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0291 +Problem: 'incsearch' highlighting not used for :sort. +Solution: Handle pattern in :sort command. +Files: src/ex_getln.c, src/testdir/test_search.vim + src/testdir/dumps/Test_incsearch_sort_01.dump + + +*** ../vim-8.1.0290/src/ex_getln.c 2018-08-14 22:08:20.211616525 +0200 +--- src/ex_getln.c 2018-08-18 16:02:12.989443789 +0200 +*************** +*** 316,321 **** +--- 316,322 ---- + && (STRNCMP(cmd, "substitute", p - cmd) == 0 + || STRNCMP(cmd, "smagic", p - cmd) == 0 + || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0 ++ || STRNCMP(cmd, "sort", p - cmd) == 0 + || STRNCMP(cmd, "global", p - cmd) == 0 + || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { +*************** +*** 331,336 **** +--- 332,347 ---- + if (*skipwhite(p) == NUL) + return FALSE; + } ++ ++ // For ":sort" skip over flags. ++ if (cmd[0] == 's' && cmd[1] == 'o') ++ { ++ while (ASCII_ISALPHA(*(p = skipwhite(p)))) ++ ++p; ++ if (*p == NUL) ++ return FALSE; ++ } ++ + p = skipwhite(p); + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +*************** +*** 359,365 **** + search_last_line = ea.line2; + } + } +! else if (*cmd == 's') + { + // :s defaults to the current line + search_first_line = curwin->w_cursor.lnum; +--- 370,376 ---- + search_last_line = ea.line2; + } + } +! else if (cmd[0] == 's' && cmd[1] != 'o') + { + // :s defaults to the current line + search_first_line = curwin->w_cursor.lnum; +*** ../vim-8.1.0290/src/testdir/test_search.vim 2018-08-14 21:32:17.618865046 +0200 +--- src/testdir/test_search.vim 2018-08-18 16:03:40.248302161 +0200 +*************** +*** 917,922 **** +--- 917,949 ---- + call delete('Xis_subst_script') + endfunc + ++ " Similar to Test_incsearch_substitute_dump() for :sort ++ func Test_incsearch_ssort_dump() ++ if !exists('+incsearch') ++ return ++ endif ++ if !CanRunVimInTerminal() ++ return ++ endif ++ call writefile([ ++ \ 'set incsearch hlsearch scrolloff=0', ++ \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', ++ \ ], 'Xis_sort_script') ++ let buf = RunVimInTerminal('-S Xis_sort_script', {'rows': 9, 'cols': 70}) ++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by ++ " the 'ambiwidth' check. ++ sleep 100m ++ ++ " Need to send one key at a time to force a redraw. ++ call term_sendkeys(buf, ':sort ni u /on') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_sort_01', {}) ++ call term_sendkeys(buf, "\") ++ ++ call StopVimInTerminal(buf) ++ call delete('Xis_sort_script') ++ endfunc ++ + func Test_search_undefined_behaviour() + if !has("terminal") + return +*** ../vim-8.1.0290/src/testdir/dumps/Test_incsearch_sort_01.dump 2018-08-18 16:10:12.014816068 +0200 +--- src/testdir/dumps/Test_incsearch_sort_01.dump 2018-08-18 16:03:45.812228115 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56 ++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59 ++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60 ++ |~+0#4040ff13&| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |:+0#0000000&|s|o|r|t| |n|i| |u| |/|o|n> @55 +*** ../vim-8.1.0290/src/version.c 2018-08-16 21:37:46.389318767 +0200 +--- src/version.c 2018-08-18 16:09:14.599647949 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 291, + /**/ + +-- +The MS-Windows registry is no more hostile than any other bunch of state +information... that is held in a binary format... a format that nobody +understands... and is replicated and cached in a complex and largely +undocumented way... and contains large amounts of duplicate and obfuscated +information... (Ben Peterson) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0292 b/data/vim/patches/8.1.0292 new file mode 100644 index 000000000..12c55dbfa --- /dev/null +++ b/data/vim/patches/8.1.0292 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0292 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0292 +Problem: MS-Windows: the text "self-installing" confuses some users. +Solution: Remove the text from the uninstall entry. (closes #3337) +Files: src/dosinst.c + + +*** ../vim-8.1.0291/src/dosinst.c 2018-06-26 23:18:40.593167147 +0200 +--- src/dosinst.c 2018-08-18 18:39:00.554972683 +0200 +*************** +*** 1575,1592 **** + } + + printf("Creating an uninstall entry\n"); + + /* For the NSIS installer use the generated uninstaller. */ + if (interactive) +- { +- sprintf(display_name, "Vim " VIM_VERSION_SHORT); + sprintf(uninstall_string, "%s\\uninstal.exe", installdir); +- } + else +- { +- sprintf(display_name, "Vim " VIM_VERSION_SHORT " (self-installing)"); + sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir); +- } + + lRet = register_uninstall( + HKEY_LOCAL_MACHINE, +--- 1575,1587 ---- + } + + printf("Creating an uninstall entry\n"); ++ sprintf(display_name, "Vim " VIM_VERSION_SHORT); + + /* For the NSIS installer use the generated uninstaller. */ + if (interactive) + sprintf(uninstall_string, "%s\\uninstal.exe", installdir); + else + sprintf(uninstall_string, "%s\\uninstall-gui.exe", installdir); + + lRet = register_uninstall( + HKEY_LOCAL_MACHINE, +*** ../vim-8.1.0291/src/version.c 2018-08-18 16:10:57.086158061 +0200 +--- src/version.c 2018-08-18 18:40:09.909908817 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 292, + /**/ + +-- +A year spent in artificial intelligence is enough to make one +believe in God. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0293 b/data/vim/patches/8.1.0293 new file mode 100644 index 000000000..f3a45c01e --- /dev/null +++ b/data/vim/patches/8.1.0293 @@ -0,0 +1,186 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0293 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0293 +Problem: Checks for type of stack is cryptic. +Solution: Define IS_QF_STACK() and IS_LL_STACK(). (Yegappan Lakshmanan) +Files: src/quickfix.c + + +*** ../vim-8.1.0292/src/quickfix.c 2018-08-15 22:29:46.977604162 +0200 +--- src/quickfix.c 2018-08-18 19:51:21.810177230 +0200 +*************** +*** 159,164 **** +--- 159,169 ---- + #define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL) + /* Location list window check helper macro */ + #define IS_LL_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref != NULL) ++ ++ // Quickfix and location list stack check helper macros ++ #define IS_QF_STACK(qi) (qi == &ql_info) ++ #define IS_LL_STACK(qi) (qi != &ql_info) ++ + /* + * Return location list for window 'wp' + * For location list window, return the referenced location list +*************** +*** 1940,1946 **** + qfp->qf_fnum = bufnum; + if (buf != NULL) + buf->b_has_qf_entry |= +! (qi == &ql_info) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY; + } + else + qfp->qf_fnum = qf_get_fnum(qi, qf_idx, dir, fname); +--- 1945,1951 ---- + qfp->qf_fnum = bufnum; + if (buf != NULL) + buf->b_has_qf_entry |= +! IS_QF_STACK(qi) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY; + } + else + qfp->qf_fnum = qf_get_fnum(qi, qf_idx, dir, fname); +*************** +*** 2224,2230 **** + return 0; + + buf->b_has_qf_entry = +! (qi == &ql_info) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY; + return buf->b_fnum; + } + +--- 2229,2235 ---- + return 0; + + buf->b_has_qf_entry = +! IS_QF_STACK(qi) ? BUF_HAS_QF_ENTRY : BUF_HAS_LL_ENTRY; + return buf->b_fnum; + } + +*************** +*** 2631,2637 **** + if (cmdmod.split == 0 && curwin->w_width != Columns + && curwin->w_width < 80) + flags |= WSP_TOP; +! if (qi != &ql_info) + flags |= WSP_NEWLOC; /* don't copy the location list */ + + if (win_split(0, flags) == FAIL) +--- 2636,2642 ---- + if (cmdmod.split == 0 && curwin->w_width != Columns + && curwin->w_width < 80) + flags |= WSP_TOP; +! if (IS_LL_STACK(qi)) + flags |= WSP_NEWLOC; /* don't copy the location list */ + + if (win_split(0, flags) == FAIL) +*************** +*** 2642,2648 **** + if (curwin->w_height < p_hh) + win_setheight((int)p_hh); + +! if (qi != &ql_info) /* not a quickfix list */ + { + /* The new window should use the supplied location list */ + curwin->w_llist = qi; +--- 2647,2653 ---- + if (curwin->w_height < p_hh) + win_setheight((int)p_hh); + +! if (IS_LL_STACK(qi)) // not a quickfix list + { + /* The new window should use the supplied location list */ + curwin->w_llist = qi; +*************** +*** 2918,2924 **** + retval = buflist_getfile(qf_ptr->qf_fnum, + (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit); + +! if (qi != &ql_info) + { + /* + * Location list. Check whether the associated window is still +--- 2923,2929 ---- + retval = buflist_getfile(qf_ptr->qf_fnum, + (linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit); + +! if (IS_LL_STACK(qi)) + { + /* + * Location list. Check whether the associated window is still +*************** +*** 2939,2945 **** + else if (old_qf_curlist != qi->qf_curlist + || !is_qf_entry_present(qi, qf_ptr)) + { +! if (qi == &ql_info) + EMSG(_("E925: Current quickfix was changed")); + else + EMSG(_(e_loc_list_changed)); +--- 2944,2950 ---- + else if (old_qf_curlist != qi->qf_curlist + || !is_qf_entry_present(qi, qf_ptr)) + { +! if (IS_QF_STACK(qi)) + EMSG(_("E925: Current quickfix was changed")); + else + EMSG(_(e_loc_list_changed)); +*************** +*** 4040,4047 **** + * pointing to the location list. + */ + if (bt_quickfix(win->w_buffer)) +! if ((qi == &ql_info && win->w_llist_ref == NULL) +! || (qi != &ql_info && win->w_llist_ref == qi)) + return TRUE; + + return FALSE; +--- 4045,4052 ---- + * pointing to the location list. + */ + if (bt_quickfix(win->w_buffer)) +! if ((IS_QF_STACK(qi) && win->w_llist_ref == NULL) +! || (IS_LL_STACK(qi) && win->w_llist_ref == qi)) + return TRUE; + + return FALSE; +*************** +*** 6955,6961 **** + { + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); +! if (!new_qi && qi != &ql_info && qf_find_buf(qi) == NULL) + /* autocommands made "qi" invalid */ + return; + } +--- 6960,6966 ---- + { + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); +! if (!new_qi && IS_LL_STACK(qi) && qf_find_buf(qi) == NULL) + /* autocommands made "qi" invalid */ + return; + } +*** ../vim-8.1.0292/src/version.c 2018-08-18 19:04:32.462231841 +0200 +--- src/version.c 2018-08-18 19:58:34.263431696 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 293, + /**/ + +-- +FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0294 b/data/vim/patches/8.1.0294 new file mode 100644 index 000000000..bcd97946c --- /dev/null +++ b/data/vim/patches/8.1.0294 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0294 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0294 +Problem: MS-Windows: sometimes uses short directory name. +Solution: Expand to long file name with correct caps. (Nobuhiro Takasaki, + closes #3334) +Files: src/os_win32.c + + +*** ../vim-8.1.0293/src/os_win32.c 2018-08-07 22:30:26.674240818 +0200 +--- src/os_win32.c 2018-08-18 20:17:32.174060746 +0200 +*************** +*** 3108,3113 **** +--- 3108,3115 ---- + char_u *buf, + int len) + { ++ char_u abuf[_MAX_PATH + 1]; ++ + /* + * Originally this was: + * return (getcwd(buf, len) != NULL ? OK : FAIL); +*************** +*** 3121,3127 **** + + if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0) + { +! char_u *p = utf16_to_enc(wbuf, NULL); + + if (p != NULL) + { +--- 3123,3135 ---- + + if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0) + { +! WCHAR wcbuf[_MAX_PATH + 1]; +! char_u *p; +! +! if (GetLongPathNameW(wbuf, wcbuf, _MAX_PATH) != 0) +! p = utf16_to_enc(wcbuf, NULL); +! else +! p = utf16_to_enc(wbuf, NULL); + + if (p != NULL) + { +*************** +*** 3133,3139 **** + return FAIL; + } + #endif +! return (GetCurrentDirectory(len, (LPSTR)buf) != 0 ? OK : FAIL); + } + + /* +--- 3141,3154 ---- + return FAIL; + } + #endif +! if (GetCurrentDirectory(len, (LPSTR)buf) == 0) +! return FAIL; +! if (GetLongPathNameA((LPSTR)buf, (LPSTR)abuf, _MAX_PATH) == 0) +! // return the short path name +! return OK; +! +! vim_strncpy(abuf, buf, len - 1); +! return OK; + } + + /* +*** ../vim-8.1.0293/src/version.c 2018-08-18 19:59:48.418322409 +0200 +--- src/version.c 2018-08-18 20:19:26.912289008 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 294, + /**/ + +-- +A fool must search for a greater fool to find admiration. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0295 b/data/vim/patches/8.1.0295 new file mode 100644 index 000000000..52a56b81e --- /dev/null +++ b/data/vim/patches/8.1.0295 @@ -0,0 +1,294 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0295 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0295 +Problem: No 'incsearch' highlighting for :vimgrep and similar commands. +Solution: Parse the :vimgrep command and similar ones to locate the search + pattern. (Hirohito Higashi, closes #3344) +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_vimgrep_01.dump, + src/testdir/dumps/Test_incsearch_vimgrep_02.dump, + src/testdir/dumps/Test_incsearch_vimgrep_03.dump, + src/testdir/dumps/Test_incsearch_vimgrep_04.dump, + src/testdir/dumps/Test_incsearch_vimgrep_05.dump + + +*** ../vim-8.1.0294/src/ex_getln.c 2018-08-18 16:10:57.086158061 +0200 +--- src/ex_getln.c 2018-08-18 20:54:23.233372360 +0200 +*************** +*** 307,355 **** + cmdmod = save_cmdmod; + + cmd = skip_range(ea.cmd, NULL); +! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v') + { + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*skipwhite(p) != NUL +! && (STRNCMP(cmd, "substitute", p - cmd) == 0 +! || STRNCMP(cmd, "smagic", p - cmd) == 0 +! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "sort", p - cmd) == 0 +! || STRNCMP(cmd, "global", p - cmd) == 0 +! || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { +! if (*cmd == 's' && cmd[1] == 'm') +! p_magic = TRUE; +! else if (*cmd == 's' && cmd[1] == 'n') +! p_magic = FALSE; +! +! // Check for "global!/". +! if (*cmd == 'g' && *p == '!') + { +! p++; +! if (*skipwhite(p) == NUL) +! return FALSE; + } +! +! // For ":sort" skip over flags. +! if (cmd[0] == 's' && cmd[1] == 'o') + { +! while (ASCII_ISALPHA(*(p = skipwhite(p)))) +! ++p; +! if (*p == NUL) +! return FALSE; + } + +- p = skipwhite(p); +- delim = *p++; +- end = skip_regexp(p, delim, p_magic, NULL); + if (end > p || *end == delim) + { + pos_T save_cursor = curwin->w_cursor; + +! // found a non-empty pattern + *skiplen = (int)(p - ccline.cmdbuff); + *patlen = (int)(end - p); + +--- 307,379 ---- + cmdmod = save_cmdmod; + + cmd = skip_range(ea.cmd, NULL); +! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v' || *cmd == 'l') + { + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*skipwhite(p) != NUL) + { +! if (STRNCMP(cmd, "substitute", p - cmd) == 0 +! || STRNCMP(cmd, "smagic", p - cmd) == 0 +! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "global", p - cmd) == 0 +! || STRNCMP(cmd, "vglobal", p - cmd) == 0) + { +! if (*cmd == 's' && cmd[1] == 'm') +! p_magic = TRUE; +! else if (*cmd == 's' && cmd[1] == 'n') +! p_magic = FALSE; +! +! // Check for "global!/". +! if (*cmd == 'g' && *p == '!') +! { +! p++; +! if (*skipwhite(p) == NUL) +! return FALSE; +! } +! +! // For ":sort" skip over flags. +! if (cmd[0] == 's' && cmd[1] == 'o') +! { +! while (ASCII_ISALPHA(*(p = skipwhite(p)))) +! ++p; +! if (*p == NUL) +! return FALSE; +! } +! +! p = skipwhite(p); +! delim = *p++; +! end = skip_regexp(p, delim, p_magic, NULL); + } +! else if (STRNCMP(cmd, "vimgrep", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "vimgrepadd", MAX(p - cmd, 8)) == 0 +! || STRNCMP(cmd, "lvimgrep", MAX(p - cmd, 2)) == 0 +! || STRNCMP(cmd, "lvimgrepadd", MAX(p - cmd, 9)) == 0) +! { +! // Check for "!/". +! if (*p == '!') +! { +! p++; +! if (*skipwhite(p) == NUL) +! return FALSE; +! } +! p = skipwhite(p); +! delim = (vim_isIDc(*p)) ? ' ' : *p++; +! end = skip_regexp(p, delim, p_magic, NULL); +! } +! else + { +! end = p; +! delim = -1; + } + + if (end > p || *end == delim) + { + pos_T save_cursor = curwin->w_cursor; + +! // found a non-empty pattern or // + *skiplen = (int)(p - ccline.cmdbuff); + *patlen = (int)(end - p); + +*** ../vim-8.1.0294/src/testdir/test_search.vim 2018-08-18 16:10:57.086158061 +0200 +--- src/testdir/test_search.vim 2018-08-18 20:41:36.648615963 +0200 +*************** +*** 944,949 **** +--- 944,996 ---- + call delete('Xis_sort_script') + endfunc + ++ " Similar to Test_incsearch_substitute_dump() for :vimgrep famiry ++ func Test_incsearch_vimgrep_dump() ++ if !exists('+incsearch') ++ return ++ endif ++ if !CanRunVimInTerminal() ++ return ++ endif ++ call writefile([ ++ \ 'set incsearch hlsearch scrolloff=0', ++ \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', ++ \ ], 'Xis_vimgrep_script') ++ let buf = RunVimInTerminal('-S Xis_vimgrep_script', {'rows': 9, 'cols': 70}) ++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by ++ " the 'ambiwidth' check. ++ sleep 100m ++ ++ " Need to send one key at a time to force a redraw. ++ call term_sendkeys(buf, ':vimgrep on') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_01', {}) ++ call term_sendkeys(buf, "\") ++ ++ call term_sendkeys(buf, ':vimg /on/ *.txt') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_02', {}) ++ call term_sendkeys(buf, "\") ++ ++ call term_sendkeys(buf, ':vimgrepadd "\") ++ ++ call term_sendkeys(buf, ':lv "tha') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_04', {}) ++ call term_sendkeys(buf, "\") ++ ++ call term_sendkeys(buf, ':lvimgrepa "the" **/*.txt') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_vimgrep_05', {}) ++ call term_sendkeys(buf, "\") ++ ++ call StopVimInTerminal(buf) ++ call delete('Xis_vimgrep_script') ++ endfunc ++ + func Test_search_undefined_behaviour() + if !has("terminal") + return +*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_01.dump 2018-08-18 21:04:47.792014166 +0200 +--- src/testdir/dumps/Test_incsearch_vimgrep_01.dump 2018-08-18 20:41:36.648615963 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56 ++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59 ++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60 ++ |~+0#4040ff13&| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |:+0#0000000&|v|i|m|g|r|e|p| |o|n> @58 +*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_02.dump 2018-08-18 21:04:47.796014105 +0200 +--- src/testdir/dumps/Test_incsearch_vimgrep_02.dump 2018-08-18 20:41:36.648615963 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56 ++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59 ++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60 ++ |~+0#4040ff13&| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |:+0#0000000&|v|i|m|g| |/|o|n|/| |*|.|t|x|t> @53 +*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_03.dump 2018-08-18 21:04:47.804013985 +0200 +--- src/testdir/dumps/Test_incsearch_vimgrep_03.dump 2018-08-18 20:41:36.648615963 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |a+0&#ffffff0|n|o|t|h|e|r| |o+1&&|n|e+0&&| |2| @56 ++ |t|h|a|t| |o+0&#ffff4012|n|e+0&#ffffff0| |3| @59 ++ |t|h|e| |o+0&#ffff4012|n|e+0&#ffffff0| |1| @60 ++ |~+0#4040ff13&| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |:+0#0000000&|v|i|m|g|r|e|p|a|d@1| |"|\|<|o|n> @52 +*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_04.dump 2018-08-18 21:04:47.808013925 +0200 +--- src/testdir/dumps/Test_incsearch_vimgrep_04.dump 2018-08-18 20:41:36.648615963 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |a+0&#ffffff0|n|o|t|h|e|r| |o|n|e| |2| @56 ++ |t+1&&|h|a|t+0&&| |o|n|e| |3| @59 ++ |t|h|e| |o|n|e| |1| @60 ++ |~+0#4040ff13&| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |:+0#0000000&|l|v| |"|t|h|a> @61 +*** ../vim-8.1.0294/src/testdir/dumps/Test_incsearch_vimgrep_05.dump 2018-08-18 21:04:47.816013804 +0200 +--- src/testdir/dumps/Test_incsearch_vimgrep_05.dump 2018-08-18 20:41:36.648615963 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |a+0&#ffffff0|n|o|t+1&&|h|e|r+0&&| |o|n|e| |2| @56 ++ |t|h|a|t| |o|n|e| |3| @59 ++ |t+0&#ffff4012|h|e| +0&#ffffff0|o|n|e| |1| @60 ++ |~+0#4040ff13&| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |~| @68 ++ |:+0#0000000&|l|v|i|m|g|r|e|p|a| |"|t|h|e|"| |*@1|/|*|.|t|x|t> @44 +*** ../vim-8.1.0294/src/version.c 2018-08-18 20:20:23.335417254 +0200 +--- src/version.c 2018-08-18 21:01:32.666945603 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 295, + /**/ + +-- +Wi n0t trei a h0liday in Sweden thi yer? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0296 b/data/vim/patches/8.1.0296 new file mode 100644 index 000000000..26acf8115 --- /dev/null +++ b/data/vim/patches/8.1.0296 @@ -0,0 +1,306 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0296 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0296 +Problem: Command parsing for 'incsearch' is a bit ugly. +Solution: Return when there is no pattern. Put common checks together. +Files: src/ex_getln.c + + +*** ../vim-8.1.0295/src/ex_getln.c 2018-08-18 21:04:57.743864534 +0200 +--- src/ex_getln.c 2018-08-18 21:20:59.041314761 +0200 +*************** +*** 276,415 **** + do_incsearch_highlighting(int firstc, incsearch_state_T *is_state, + int *skiplen, int *patlen) + { + *skiplen = 0; + *patlen = ccline.cmdlen; + +! if (p_is && !cmd_silent) + { +! // by default search all lines +! search_first_line = 0; +! search_last_line = MAXLNUM; +! +! if (firstc == '/' || firstc == '?') +! return TRUE; +! if (firstc == ':') + { +! char_u *cmd; +! cmdmod_T save_cmdmod = cmdmod; +! char_u *p; +! int delim; +! char_u *end; +! char_u *dummy; +! exarg_T ea; +! +! vim_memset(&ea, 0, sizeof(ea)); +! ea.line1 = 1; +! ea.line2 = 1; +! ea.cmd = ccline.cmdbuff; +! ea.addr_type = ADDR_LINES; +! +! parse_command_modifiers(&ea, &dummy, TRUE); +! cmdmod = save_cmdmod; +! +! cmd = skip_range(ea.cmd, NULL); +! if (*cmd == 's' || *cmd == 'g' || *cmd == 'v' || *cmd == 'l') +! { +! // Skip over "substitute" to find the pattern separator. +! for (p = cmd; ASCII_ISALPHA(*p); ++p) +! ; +! if (*skipwhite(p) != NUL) +! { +! if (STRNCMP(cmd, "substitute", p - cmd) == 0 +! || STRNCMP(cmd, "smagic", p - cmd) == 0 +! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "global", p - cmd) == 0 +! || STRNCMP(cmd, "vglobal", p - cmd) == 0) +! { +! if (*cmd == 's' && cmd[1] == 'm') +! p_magic = TRUE; +! else if (*cmd == 's' && cmd[1] == 'n') +! p_magic = FALSE; +! +! // Check for "global!/". +! if (*cmd == 'g' && *p == '!') +! { +! p++; +! if (*skipwhite(p) == NUL) +! return FALSE; +! } +! +! // For ":sort" skip over flags. +! if (cmd[0] == 's' && cmd[1] == 'o') +! { +! while (ASCII_ISALPHA(*(p = skipwhite(p)))) +! ++p; +! if (*p == NUL) +! return FALSE; +! } +! +! p = skipwhite(p); +! delim = *p++; +! end = skip_regexp(p, delim, p_magic, NULL); +! } +! else if (STRNCMP(cmd, "vimgrep", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "vimgrepadd", MAX(p - cmd, 8)) == 0 +! || STRNCMP(cmd, "lvimgrep", MAX(p - cmd, 2)) == 0 +! || STRNCMP(cmd, "lvimgrepadd", MAX(p - cmd, 9)) == 0) +! { +! // Check for "!/". +! if (*p == '!') +! { +! p++; +! if (*skipwhite(p) == NUL) +! return FALSE; +! } +! p = skipwhite(p); +! delim = (vim_isIDc(*p)) ? ' ' : *p++; +! end = skip_regexp(p, delim, p_magic, NULL); +! } +! else +! { +! end = p; +! delim = -1; +! } +! +! if (end > p || *end == delim) +! { +! pos_T save_cursor = curwin->w_cursor; +! +! // found a non-empty pattern or // +! *skiplen = (int)(p - ccline.cmdbuff); +! *patlen = (int)(end - p); +! +! // parse the address range +! curwin->w_cursor = is_state->search_start; +! parse_cmd_address(&ea, &dummy); +! if (ea.addr_count > 0) +! { +! // Allow for reverse match. +! if (ea.line2 < ea.line1) +! { +! search_first_line = ea.line2; +! search_last_line = ea.line1; +! } +! else +! { +! search_first_line = ea.line1; +! search_last_line = ea.line2; +! } +! } +! else if (cmd[0] == 's' && cmd[1] != 'o') +! { +! // :s defaults to the current line +! search_first_line = curwin->w_cursor.lnum; +! search_last_line = curwin->w_cursor.lnum; +! } +! +! curwin->w_cursor = save_cursor; +! return TRUE; +! } +! } +! } + } + } + +! return FALSE; + } + + static void +--- 276,400 ---- + do_incsearch_highlighting(int firstc, incsearch_state_T *is_state, + int *skiplen, int *patlen) + { ++ char_u *cmd; ++ cmdmod_T save_cmdmod = cmdmod; ++ char_u *p; ++ int delim_optional = FALSE; ++ int delim; ++ char_u *end; ++ char_u *dummy; ++ exarg_T ea; ++ pos_T save_cursor; ++ + *skiplen = 0; + *patlen = ccline.cmdlen; + +! if (!p_is || cmd_silent) +! return FALSE; +! +! // by default search all lines +! search_first_line = 0; +! search_last_line = MAXLNUM; +! +! if (firstc == '/' || firstc == '?') +! return TRUE; +! if (firstc != ':') +! return FALSE; +! +! vim_memset(&ea, 0, sizeof(ea)); +! ea.line1 = 1; +! ea.line2 = 1; +! ea.cmd = ccline.cmdbuff; +! ea.addr_type = ADDR_LINES; +! +! parse_command_modifiers(&ea, &dummy, TRUE); +! cmdmod = save_cmdmod; +! +! cmd = skip_range(ea.cmd, NULL); +! if (vim_strchr((char_u *)"sgvl", *cmd) == NULL) +! return FALSE; +! +! // Skip over "substitute" to find the pattern separator. +! for (p = cmd; ASCII_ISALPHA(*p); ++p) +! ; +! if (*skipwhite(p) == NUL) +! return FALSE; +! +! if (STRNCMP(cmd, "substitute", p - cmd) == 0 +! || STRNCMP(cmd, "smagic", p - cmd) == 0 +! || STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "vglobal", p - cmd) == 0) +! { +! if (*cmd == 's' && cmd[1] == 'm') +! p_magic = TRUE; +! else if (*cmd == 's' && cmd[1] == 'n') +! p_magic = FALSE; +! } +! else if (STRNCMP(cmd, "sort", MAX(p - cmd, 3)) == 0) + { +! // skip over flags +! while (ASCII_ISALPHA(*(p = skipwhite(p)))) +! ++p; +! if (*p == NUL) +! return FALSE; +! } +! else if (STRNCMP(cmd, "vimgrep", MAX(p - cmd, 3)) == 0 +! || STRNCMP(cmd, "vimgrepadd", MAX(p - cmd, 8)) == 0 +! || STRNCMP(cmd, "lvimgrep", MAX(p - cmd, 2)) == 0 +! || STRNCMP(cmd, "lvimgrepadd", MAX(p - cmd, 9)) == 0 +! || STRNCMP(cmd, "global", p - cmd) == 0) +! { +! // skip over "!" +! if (*p == '!') + { +! p++; +! if (*skipwhite(p) == NUL) +! return FALSE; + } ++ if (*cmd != 'g') ++ delim_optional = TRUE; ++ } ++ else ++ return FALSE; ++ ++ p = skipwhite(p); ++ delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++; ++ end = skip_regexp(p, delim, p_magic, NULL); ++ ++ if (end == p && *end != delim) ++ return FALSE; ++ // found a non-empty pattern or // ++ ++ *skiplen = (int)(p - ccline.cmdbuff); ++ *patlen = (int)(end - p); ++ ++ // parse the address range ++ save_cursor = curwin->w_cursor; ++ curwin->w_cursor = is_state->search_start; ++ parse_cmd_address(&ea, &dummy); ++ if (ea.addr_count > 0) ++ { ++ // Allow for reverse match. ++ if (ea.line2 < ea.line1) ++ { ++ search_first_line = ea.line2; ++ search_last_line = ea.line1; ++ } ++ else ++ { ++ search_first_line = ea.line1; ++ search_last_line = ea.line2; ++ } ++ } ++ else if (cmd[0] == 's' && cmd[1] != 'o') ++ { ++ // :s defaults to the current line ++ search_first_line = curwin->w_cursor.lnum; ++ search_last_line = curwin->w_cursor.lnum; + } + +! curwin->w_cursor = save_cursor; +! return TRUE; + } + + static void +*** ../vim-8.1.0295/src/version.c 2018-08-18 21:04:57.743864534 +0200 +--- src/version.c 2018-08-18 21:22:23.748034012 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 296, + /**/ + +-- +The Characters and incidents portrayed and the names used are fictitious and +any similarity to the names, characters, or history of any person is entirely +accidental and unintentional. + Signed RICHARD M. NIXON + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0297 b/data/vim/patches/8.1.0297 new file mode 100644 index 000000000..c91b19222 --- /dev/null +++ b/data/vim/patches/8.1.0297 @@ -0,0 +1,104 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0297 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0297 (after 8.1.0294) +Problem: MS-Windows: tests fail, Vim crashes. +Solution: Fix long file name handling. +Files: src/os_win32.c + + +*** ../vim-8.1.0296/src/os_win32.c 2018-08-18 20:20:23.335417254 +0200 +--- src/os_win32.c 2018-08-19 14:36:25.032599518 +0200 +*************** +*** 3109,3114 **** +--- 3109,3115 ---- + int len) + { + char_u abuf[_MAX_PATH + 1]; ++ DWORD lfnlen; + + /* + * Originally this was: +*************** +*** 3124,3134 **** + if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0) + { + WCHAR wcbuf[_MAX_PATH + 1]; +! char_u *p; + + if (GetLongPathNameW(wbuf, wcbuf, _MAX_PATH) != 0) + p = utf16_to_enc(wcbuf, NULL); +! else + p = utf16_to_enc(wbuf, NULL); + + if (p != NULL) +--- 3125,3143 ---- + if (GetCurrentDirectoryW(_MAX_PATH, wbuf) != 0) + { + WCHAR wcbuf[_MAX_PATH + 1]; +! char_u *p = NULL; + + if (GetLongPathNameW(wbuf, wcbuf, _MAX_PATH) != 0) ++ { + p = utf16_to_enc(wcbuf, NULL); +! if (STRLEN(p) >= (size_t)len) +! { +! // long path name is too long, fall back to short one +! vim_free(p); +! p = NULL; +! } +! } +! if (p == NULL) + p = utf16_to_enc(wbuf, NULL); + + if (p != NULL) +*************** +*** 3143,3153 **** + #endif + if (GetCurrentDirectory(len, (LPSTR)buf) == 0) + return FAIL; +! if (GetLongPathNameA((LPSTR)buf, (LPSTR)abuf, _MAX_PATH) == 0) +! // return the short path name + return OK; + +! vim_strncpy(abuf, buf, len - 1); + return OK; + } + +--- 3152,3164 ---- + #endif + if (GetCurrentDirectory(len, (LPSTR)buf) == 0) + return FAIL; +! lfnlen = GetLongPathNameA((LPCSTR)buf, (LPSTR)abuf, _MAX_PATH); +! if (lfnlen == 0 || lfnlen >= (DWORD)len) +! // Failed to get long path name or it's too long: fall back to the +! // short path name. + return OK; + +! STRCPY(buf, abuf); + return OK; + } + +*** ../vim-8.1.0296/src/version.c 2018-08-18 21:23:00.787474060 +0200 +--- src/version.c 2018-08-19 14:33:49.277455703 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 297, + /**/ + +-- +The most powerful force in the universe is gossip. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0298 b/data/vim/patches/8.1.0298 new file mode 100644 index 000000000..5e1c59529 --- /dev/null +++ b/data/vim/patches/8.1.0298 @@ -0,0 +1,44 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0298 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0298 +Problem: Window resize test sometimes fails on Mac. +Solution: Add Test_popup_and_window_resize() to flaky tests. +Files: src/testdir/runtest.vim + + +*** ../vim-8.1.0297/src/testdir/runtest.vim 2018-06-12 14:58:35.566840630 +0200 +--- src/testdir/runtest.vim 2018-08-19 15:46:43.666107201 +0200 +*************** +*** 272,277 **** +--- 272,278 ---- + \ 'Test_paused()', + \ 'Test_pipe_through_sort_all()', + \ 'Test_pipe_through_sort_some()', ++ \ 'Test_popup_and_window_resize()', " sometimes fails on Mac + \ 'Test_quoteplus()', + \ 'Test_quotestar()', + \ 'Test_reltime()', +*** ../vim-8.1.0297/src/version.c 2018-08-19 14:38:38.979859032 +0200 +--- src/version.c 2018-08-19 15:47:31.893813723 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 298, + /**/ + +-- +Mushrooms always grow in damp places and so they look like umbrellas. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0299 b/data/vim/patches/8.1.0299 new file mode 100644 index 000000000..cbb29531f --- /dev/null +++ b/data/vim/patches/8.1.0299 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0299 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0299 (after 8.1.0298) +Problem: misplaced comment +Solution: Remove comment +Files: src/testdir/runtest.vim + + +*** ../vim-8.1.0298/src/testdir/runtest.vim 2018-08-19 16:09:15.374103260 +0200 +--- src/testdir/runtest.vim 2018-08-19 16:52:33.834574032 +0200 +*************** +*** 272,278 **** + \ 'Test_paused()', + \ 'Test_pipe_through_sort_all()', + \ 'Test_pipe_through_sort_some()', +! \ 'Test_popup_and_window_resize()', " sometimes fails on Mac + \ 'Test_quoteplus()', + \ 'Test_quotestar()', + \ 'Test_reltime()', +--- 272,278 ---- + \ 'Test_paused()', + \ 'Test_pipe_through_sort_all()', + \ 'Test_pipe_through_sort_some()', +! \ 'Test_popup_and_window_resize()', + \ 'Test_quoteplus()', + \ 'Test_quotestar()', + \ 'Test_reltime()', +*** ../vim-8.1.0298/src/version.c 2018-08-19 16:09:15.378103236 +0200 +--- src/version.c 2018-08-19 16:53:09.818358203 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 299, + /**/ + +-- +To keep milk from turning sour: Keep it in the cow. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0300 b/data/vim/patches/8.1.0300 new file mode 100644 index 000000000..45f5bd25f --- /dev/null +++ b/data/vim/patches/8.1.0300 @@ -0,0 +1,80 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0300 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0300 +Problem: The old window title might be freed twice. (Dominique Pelle) +Solution: Do not free "oldtitle" in a signal handler but set a flag to have + it freed later. +Files: src/os_unix.c + + +*** ../vim-8.1.0299/src/os_unix.c 2018-08-11 13:57:16.215969777 +0200 +--- src/os_unix.c 2018-08-19 22:13:19.187362836 +0200 +*************** +*** 161,166 **** +--- 161,167 ---- + static int get_x11_icon(int); + + static char_u *oldtitle = NULL; ++ static volatile int oldtitle_outdated = FALSE; + static int did_set_title = FALSE; + static char_u *oldicon = NULL; + static int did_set_icon = FALSE; +*************** +*** 1231,1238 **** + after_sigcont(void) + { + # ifdef FEAT_TITLE +! // Set oldtitle to NULL, so the current title is obtained again. +! VIM_CLEAR(oldtitle); + # endif + settmode(TMODE_RAW); + need_check_timestamps = TRUE; +--- 1232,1240 ---- + after_sigcont(void) + { + # ifdef FEAT_TITLE +! // Don't change "oldtitle" in a signal handler, set a flag to obtain it +! // again later. +! oldtitle_outdated = TRUE; + # endif + settmode(TMODE_RAW); + need_check_timestamps = TRUE; +*************** +*** 2281,2286 **** +--- 2283,2293 ---- + */ + if ((type || *T_TS != NUL) && title != NULL) + { ++ if (oldtitle_outdated) ++ { ++ oldtitle_outdated = FALSE; ++ VIM_CLEAR(oldtitle); ++ } + if (oldtitle == NULL + #ifdef FEAT_GUI + && !gui.in_use +*** ../vim-8.1.0299/src/version.c 2018-08-19 17:03:57.369405009 +0200 +--- src/version.c 2018-08-19 22:11:53.003778230 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 300, + /**/ + +-- +System administrators are just like women: You can't live with them and you +can't live without them. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0301 b/data/vim/patches/8.1.0301 new file mode 100644 index 000000000..71730f0a9 --- /dev/null +++ b/data/vim/patches/8.1.0301 @@ -0,0 +1,261 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0301 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0301 +Problem: GTK: Input method popup displayed on wrong screen. +Solution: Add the screen position offset. (Ken Takata, closes #3268) +Files: src/gui_beval.c, src/gui_gtk_x11.c, src/mbyte.c, + src/proto/gui_gtk_x11.pro + + +*** ../vim-8.1.0300/src/gui_beval.c 2018-06-28 12:05:07.085006926 +0200 +--- src/gui_beval.c 2018-08-19 22:45:48.731522222 +0200 +*************** +*** 944,949 **** +--- 944,951 ---- + GtkRequisition requisition; + int screen_w; + int screen_h; ++ int screen_x; ++ int screen_y; + int x; + int y; + int x_offset = EVAL_OFFSET_X; +*************** +*** 956,963 **** + screen = gtk_widget_get_screen(beval->target); + gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen); + # endif +! gui_gtk_get_screen_size_of_win(beval->balloonShell, +! &screen_w, &screen_h); + # if !GTK_CHECK_VERSION(3,0,0) + gtk_widget_ensure_style(beval->balloonShell); + gtk_widget_ensure_style(beval->balloonLabel); +--- 958,965 ---- + screen = gtk_widget_get_screen(beval->target); + gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen); + # endif +! gui_gtk_get_screen_geom_of_win(beval->balloonShell, +! &screen_x, &screen_y, &screen_w, &screen_h); + # if !GTK_CHECK_VERSION(3,0,0) + gtk_widget_ensure_style(beval->balloonShell); + gtk_widget_ensure_style(beval->balloonLabel); +*************** +*** 998,1011 **** + y += beval->y; + + /* Get out of the way of the mouse pointer */ +! if (x + x_offset + requisition.width > screen_w) + y_offset += 15; +! if (y + y_offset + requisition.height > screen_h) + y_offset = -requisition.height - EVAL_OFFSET_Y; + + /* Sanitize values */ +! x = CLAMP(x + x_offset, 0, MAX(0, screen_w - requisition.width)); +! y = CLAMP(y + y_offset, 0, MAX(0, screen_h - requisition.height)); + + /* Show the balloon */ + # if GTK_CHECK_VERSION(3,0,0) +--- 1000,1015 ---- + y += beval->y; + + /* Get out of the way of the mouse pointer */ +! if (x + x_offset + requisition.width > screen_x + screen_w) + y_offset += 15; +! if (y + y_offset + requisition.height > screen_y + screen_h) + y_offset = -requisition.height - EVAL_OFFSET_Y; + + /* Sanitize values */ +! x = CLAMP(x + x_offset, 0, +! MAX(0, screen_x + screen_w - requisition.width)); +! y = CLAMP(y + y_offset, 0, +! MAX(0, screen_y + screen_h - requisition.height)); + + /* Show the balloon */ + # if GTK_CHECK_VERSION(3,0,0) +*** ../vim-8.1.0300/src/gui_gtk_x11.c 2018-08-07 20:01:34.245746660 +0200 +--- src/gui_gtk_x11.c 2018-08-19 22:54:38.120976094 +0200 +*************** +*** 5008,5034 **** + } + + void +! gui_gtk_get_screen_size_of_win(GtkWidget *wid, int *width, int *height) + { + #if GTK_CHECK_VERSION(3,22,0) + GdkDisplay *dpy = gtk_widget_get_display(wid); +- GdkWindow *win = gtk_widget_get_window(wid); + GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win); +- GdkRectangle geometry; + + gdk_monitor_get_geometry(monitor, &geometry); +- *width = geometry.width; +- *height = geometry.height; + #else + GdkScreen* screen; + + if (wid != NULL && gtk_widget_has_screen(wid)) + screen = gtk_widget_get_screen(wid); + else + screen = gdk_screen_get_default(); +! *width = gdk_screen_get_width(screen); +! *height = gdk_screen_get_height(screen); + #endif + } + + /* +--- 5008,5042 ---- + } + + void +! gui_gtk_get_screen_geom_of_win( +! GtkWidget *wid, +! int *screen_x, +! int *screen_y, +! int *width, +! int *height) + { ++ GdkRectangle geometry; ++ GdkWindow *win = gtk_widget_get_window(wid); + #if GTK_CHECK_VERSION(3,22,0) + GdkDisplay *dpy = gtk_widget_get_display(wid); + GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win); + + gdk_monitor_get_geometry(monitor, &geometry); + #else + GdkScreen* screen; ++ int monitor; + + if (wid != NULL && gtk_widget_has_screen(wid)) + screen = gtk_widget_get_screen(wid); + else + screen = gdk_screen_get_default(); +! monitor = gdk_screen_get_monitor_at_window(screen, win); +! gdk_screen_get_monitor_geometry(screen, monitor, &geometry); + #endif ++ *screen_x = geometry.x; ++ *screen_y = geometry.y; ++ *width = geometry.width; ++ *height = geometry.height; + } + + /* +*************** +*** 5039,5045 **** + void + gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) + { +! gui_gtk_get_screen_size_of_win(gui.mainwin, screen_w, screen_h); + + /* Subtract 'guiheadroom' from the height to allow some room for the + * window manager (task list and window title bar). */ +--- 5047,5055 ---- + void + gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) + { +! int x, y; +! +! gui_gtk_get_screen_geom_of_win(gui.mainwin, &x, &y, screen_w, screen_h); + + /* Subtract 'guiheadroom' from the height to allow some room for the + * window manager (task list and window title bar). */ +*** ../vim-8.1.0300/src/mbyte.c 2018-08-01 19:05:59.282223206 +0200 +--- src/mbyte.c 2018-08-19 22:57:01.724150866 +0200 +*************** +*** 4951,4974 **** + static void + im_preedit_window_set_position(void) + { +! int x, y, w, h, sw, sh; + + if (preedit_window == NULL) + return; + +! gui_gtk_get_screen_size_of_win(preedit_window, &sw, &sh); + #if GTK_CHECK_VERSION(3,0,0) + gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), &x, &y); + #else + gdk_window_get_origin(gui.drawarea->window, &x, &y); + #endif +! gtk_window_get_size(GTK_WINDOW(preedit_window), &w, &h); + x = x + FILL_X(gui.col); + y = y + FILL_Y(gui.row); +! if (x + w > sw) +! x = sw - w; +! if (y + h > sh) +! y = sh - h; + gtk_window_move(GTK_WINDOW(preedit_window), x, y); + } + +--- 4951,4976 ---- + static void + im_preedit_window_set_position(void) + { +! int x, y, width, height; +! int screen_x, screen_y, screen_width, screen_height; + + if (preedit_window == NULL) + return; + +! gui_gtk_get_screen_geom_of_win(gui.drawarea, +! &screen_x, &screen_y, &screen_width, &screen_height); + #if GTK_CHECK_VERSION(3,0,0) + gdk_window_get_origin(gtk_widget_get_window(gui.drawarea), &x, &y); + #else + gdk_window_get_origin(gui.drawarea->window, &x, &y); + #endif +! gtk_window_get_size(GTK_WINDOW(preedit_window), &width, &height); + x = x + FILL_X(gui.col); + y = y + FILL_Y(gui.row); +! if (x + width > screen_x + screen_width) +! x = screen_x + screen_width - width; +! if (y + height > screen_y + screen_height) +! y = screen_y + screen_height - height; + gtk_window_move(GTK_WINDOW(preedit_window), x, y); + } + +*** ../vim-8.1.0300/src/proto/gui_gtk_x11.pro 2018-05-17 13:53:00.000000000 +0200 +--- src/proto/gui_gtk_x11.pro 2018-08-19 22:57:22.476028708 +0200 +*************** +*** 25,31 **** + void gui_mch_unmaximize(void); + void gui_mch_newfont(void); + void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction); +! void gui_gtk_get_screen_size_of_win(GtkWidget *wid, int *width, int *height); + void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h); + void gui_mch_settitle(char_u *title, char_u *icon); + void gui_mch_enable_menu(int showit); +--- 25,31 ---- + void gui_mch_unmaximize(void); + void gui_mch_newfont(void); + void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction); +! void gui_gtk_get_screen_geom_of_win(GtkWidget *wid, int *screen_x, int *screen_y, int *width, int *height); + void gui_mch_get_screen_dimensions(int *screen_w, int *screen_h); + void gui_mch_settitle(char_u *title, char_u *icon); + void gui_mch_enable_menu(int showit); +*** ../vim-8.1.0300/src/version.c 2018-08-19 22:20:11.628993678 +0200 +--- src/version.c 2018-08-19 22:48:57.714733757 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 301, + /**/ + +-- +SUPERIMPOSE "England AD 787". After a few more seconds we hear hoofbeats in +the distance. They come slowly closer. Then out of the mist comes KING +ARTHUR followed by a SERVANT who is banging two half coconuts together. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0302 b/data/vim/patches/8.1.0302 new file mode 100644 index 000000000..7d44902ca --- /dev/null +++ b/data/vim/patches/8.1.0302 @@ -0,0 +1,247 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0302 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0302 +Problem: Crash when using :suspend and "fg". +Solution: Undo patch 8.1.244. +Files: src/os_unix.c, src/term.c, src/proto/term.pro + + +*** ../vim-8.1.0301/src/os_unix.c 2018-08-19 22:20:11.628993678 +0200 +--- src/os_unix.c 2018-08-20 21:54:06.847128443 +0200 +*************** +*** 1228,1251 **** + SIGRETURN; + } + +! static void +! after_sigcont(void) +! { +! # ifdef FEAT_TITLE +! // Don't change "oldtitle" in a signal handler, set a flag to obtain it +! // again later. +! oldtitle_outdated = TRUE; +! # endif +! settmode(TMODE_RAW); +! need_check_timestamps = TRUE; +! did_check_timestamps = FALSE; +! } +! +! #if defined(SIGCONT) +! static RETSIGTYPE sigcont_handler SIGPROTOARG; +! static int in_mch_suspend = FALSE; +! +! # if defined(_REENTRANT) && defined(SIGCONT) + /* + * On Solaris with multi-threading, suspending might not work immediately. + * Catch the SIGCONT signal, which will be used as an indication whether the +--- 1228,1234 ---- + SIGRETURN; + } + +! #if defined(_REENTRANT) && defined(SIGCONT) + /* + * On Solaris with multi-threading, suspending might not work immediately. + * Catch the SIGCONT signal, which will be used as an indication whether the +*************** +*** 1257,1263 **** + * volatile because it is used in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; +! # endif + + /* + * signal handler for SIGCONT +--- 1240,1246 ---- + * volatile because it is used in signal handler sigcont_handler(). + */ + static volatile int sigcont_received; +! static RETSIGTYPE sigcont_handler SIGPROTOARG; + + /* + * signal handler for SIGCONT +*************** +*** 1265,1302 **** + static RETSIGTYPE + sigcont_handler SIGDEFARG(sigarg) + { +! if (in_mch_suspend) +! { +! # if defined(_REENTRANT) && defined(SIGCONT) +! sigcont_received = TRUE; +! # endif +! } +! else +! { +! // We didn't suspend ourselves, assume we were stopped by a SIGSTOP +! // signal (which can't be intercepted) and get a SIGCONT. Need to get +! // back to a sane mode and redraw. +! after_sigcont(); +! +! update_screen(CLEAR); +! if (State & CMDLINE) +! redrawcmdline(); +! else if (State == HITRETURN || State == SETWSIZE || State == ASKMORE +! || State == EXTERNCMD || State == CONFIRM || exmode_active) +! repeat_message(); +! else if (redrawing()) +! setcursor(); +! #if defined(FEAT_INS_EXPAND) +! if (pum_visible()) +! { +! redraw_later(NOT_VALID); +! ins_compl_show_pum(); +! } +! #endif +! cursor_on_force(); +! out_flush(); +! } +! + SIGRETURN; + } + #endif +--- 1248,1254 ---- + static RETSIGTYPE + sigcont_handler SIGDEFARG(sigarg) + { +! sigcont_received = TRUE; + SIGRETURN; + } + #endif +*************** +*** 1379,1386 **** + { + /* BeOS does have SIGTSTP, but it doesn't work. */ + #if defined(SIGTSTP) && !defined(__BEOS__) +- in_mch_suspend = TRUE; +- + out_flush(); /* needed to make cursor visible on some systems */ + settmode(TMODE_COOK); + out_flush(); /* needed to disable mouse on some systems */ +--- 1331,1336 ---- +*************** +*** 1412,1420 **** + mch_delay(wait_time, FALSE); + } + # endif +- in_mch_suspend = FALSE; + +! after_sigcont(); + #else + suspend_shell(); + #endif +--- 1362,1377 ---- + mch_delay(wait_time, FALSE); + } + # endif + +! # ifdef FEAT_TITLE +! /* +! * Set oldtitle to NULL, so the current title is obtained again. +! */ +! VIM_CLEAR(oldtitle); +! # endif +! settmode(TMODE_RAW); +! need_check_timestamps = TRUE; +! did_check_timestamps = FALSE; + #else + suspend_shell(); + #endif +*************** +*** 1454,1460 **** + #ifdef SIGTSTP + signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); + #endif +! #if defined(SIGCONT) + signal(SIGCONT, sigcont_handler); + #endif + +--- 1411,1417 ---- + #ifdef SIGTSTP + signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); + #endif +! #if defined(_REENTRANT) && defined(SIGCONT) + signal(SIGCONT, sigcont_handler); + #endif + +*** ../vim-8.1.0301/src/term.c 2018-08-07 22:30:26.666240863 +0200 +--- src/term.c 2018-08-20 21:47:17.833581580 +0200 +*************** +*** 3834,3856 **** + static int cursor_is_off = FALSE; + + /* +- * Enable the cursor without checking if it's already enabled. +- */ +- void +- cursor_on_force(void) +- { +- out_str(T_VE); +- cursor_is_off = FALSE; +- } +- +- /* + * Enable the cursor. + */ + void + cursor_on(void) + { + if (cursor_is_off) +! cursor_on_force(); + } + + /* +--- 3834,3849 ---- + static int cursor_is_off = FALSE; + + /* + * Enable the cursor. + */ + void + cursor_on(void) + { + if (cursor_is_off) +! { +! out_str(T_VE); +! cursor_is_off = FALSE; +! } + } + + /* +*** ../vim-8.1.0301/src/proto/term.pro 2018-08-07 22:30:26.666240863 +0200 +--- src/proto/term.pro 2018-08-20 21:47:24.961538793 +0200 +*************** +*** 52,58 **** + int mouse_has(int c); + int mouse_model_popup(void); + void scroll_start(void); +- void cursor_on_force(void); + void cursor_on(void); + void cursor_off(void); + void term_cursor_mode(int forced); +--- 52,57 ---- +*** ../vim-8.1.0301/src/version.c 2018-08-19 22:58:39.783568118 +0200 +--- src/version.c 2018-08-20 21:49:38.956734730 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 302, + /**/ + +-- +SOLDIER: What? A swallow carrying a coconut? +ARTHUR: It could grip it by the husk ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0303 b/data/vim/patches/8.1.0303 new file mode 100644 index 000000000..48d20bf7d --- /dev/null +++ b/data/vim/patches/8.1.0303 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0303 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0303 +Problem: line2byte() is wrong for last line with 'noeol' and 'nofixeol'. +Solution: Fix off-by-one error. (Shane Harper, closes #3351) +Files: src/memline.c, src/testdir/test_functions.vim + + +*** ../vim-8.1.0302/src/memline.c 2018-08-07 21:39:09.251060096 +0200 +--- src/memline.c 2018-08-20 22:49:13.023489795 +0200 +*************** +*** 5267,5273 **** + /* Don't count the last line break if 'noeol' and ('bin' or + * 'nofixeol'). */ + if ((!buf->b_p_fixeol || buf->b_p_bin) && !buf->b_p_eol +! && buf->b_ml.ml_line_count == lnum) + size -= ffdos + 1; + } + +--- 5267,5273 ---- + /* Don't count the last line break if 'noeol' and ('bin' or + * 'nofixeol'). */ + if ((!buf->b_p_fixeol || buf->b_p_bin) && !buf->b_p_eol +! && lnum > buf->b_ml.ml_line_count) + size -= ffdos + 1; + } + +*** ../vim-8.1.0302/src/testdir/test_functions.vim 2018-08-08 22:27:27.043005000 +0200 +--- src/testdir/test_functions.vim 2018-08-20 22:48:48.891637382 +0200 +*************** +*** 682,687 **** +--- 682,688 ---- + + func Test_byte2line_line2byte() + new ++ set endofline + call setline(1, ['a', 'bc', 'd']) + + set fileformat=unix +*************** +*** 702,708 **** + call assert_equal([-1, -1, 1, 4, 8, 11, -1], + \ map(range(-1, 5), 'line2byte(v:val)')) + +! set fileformat& + bw! + endfunc + +--- 703,718 ---- + call assert_equal([-1, -1, 1, 4, 8, 11, -1], + \ map(range(-1, 5), 'line2byte(v:val)')) + +! bw! +! set noendofline nofixendofline +! normal a- +! for ff in ["unix", "mac", "dos"] +! let &fileformat = ff +! call assert_equal(1, line2byte(1)) +! call assert_equal(2, line2byte(2)) " line2byte(line("$") + 1) is the buffer size plus one (as per :help line2byte). +! endfor +! +! set endofline& fixendofline& fileformat& + bw! + endfunc + +*** ../vim-8.1.0302/src/version.c 2018-08-20 21:58:53.509410779 +0200 +--- src/version.c 2018-08-20 22:51:02.218823269 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 303, + /**/ + +-- +FIRST SOLDIER: So they wouldn't be able to bring a coconut back anyway. +SECOND SOLDIER: Wait a minute! Suppose two swallows carried it together? +FIRST SOLDIER: No, they'd have to have it on a line. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0304 b/data/vim/patches/8.1.0304 new file mode 100644 index 000000000..734e72fa7 --- /dev/null +++ b/data/vim/patches/8.1.0304 @@ -0,0 +1,315 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0304 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0304 +Problem: No redraw when using a STOP signal on Vim and then a CONT signal. +Solution: Catch the CONT signal and set the terminal to raw mode. This is + like 8.1.0244 but without the screen redraw and a fix for + multi-threading suggested by Dominique Pelle. +Files: src/os_unix.c, src/term.c, src/proto/term.pro + + +*** ../vim-8.1.0303/src/os_unix.c 2018-08-20 21:58:53.505410802 +0200 +--- src/os_unix.c 2018-08-21 13:01:23.341522963 +0200 +*************** +*** 1228,1241 **** + SIGRETURN; + } + +- #if defined(_REENTRANT) && defined(SIGCONT) + /* +! * On Solaris with multi-threading, suspending might not work immediately. +! * Catch the SIGCONT signal, which will be used as an indication whether the +! * suspending has been done or not. + * + * On Linux, signal is not always handled immediately either. + * See https://bugs.launchpad.net/bugs/291373 + * + * volatile because it is used in signal handler sigcont_handler(). + */ +--- 1228,1262 ---- + SIGRETURN; + } + + /* +! * Invoked after receiving SIGCONT. We don't know what happened while +! * sleeping, deal with part of that. +! */ +! static void +! after_sigcont(void) +! { +! # ifdef FEAT_TITLE +! // Don't change "oldtitle" in a signal handler, set a flag to obtain it +! // again later. +! oldtitle_outdated = TRUE; +! # endif +! settmode(TMODE_RAW); +! need_check_timestamps = TRUE; +! did_check_timestamps = FALSE; +! } +! +! #if defined(SIGCONT) +! static RETSIGTYPE sigcont_handler SIGPROTOARG; +! static volatile int in_mch_suspend = FALSE; +! +! /* +! * With multi-threading, suspending might not work immediately. Catch the +! * SIGCONT signal, which will be used as an indication whether the suspending +! * has been done or not. + * + * On Linux, signal is not always handled immediately either. + * See https://bugs.launchpad.net/bugs/291373 ++ * Probably because the signal is handled in another thread. + * + * volatile because it is used in signal handler sigcont_handler(). + */ +*************** +*** 1248,1254 **** + static RETSIGTYPE + sigcont_handler SIGDEFARG(sigarg) + { +! sigcont_received = TRUE; + SIGRETURN; + } + #endif +--- 1269,1290 ---- + static RETSIGTYPE + sigcont_handler SIGDEFARG(sigarg) + { +! if (in_mch_suspend) +! { +! sigcont_received = TRUE; +! } +! else +! { +! // We didn't suspend ourselves, assume we were stopped by a SIGSTOP +! // signal (which can't be intercepted) and get a SIGCONT. Need to get +! // back to a sane mode. We should redraw, but we can't really do that +! // in a signal handler, do a redraw later. +! after_sigcont(); +! redraw_later(CLEAR); +! cursor_on_force(); +! out_flush(); +! } +! + SIGRETURN; + } + #endif +*************** +*** 1331,1336 **** +--- 1367,1374 ---- + { + /* BeOS does have SIGTSTP, but it doesn't work. */ + #if defined(SIGTSTP) && !defined(__BEOS__) ++ in_mch_suspend = TRUE; ++ + out_flush(); /* needed to make cursor visible on some systems */ + settmode(TMODE_COOK); + out_flush(); /* needed to disable mouse on some systems */ +*************** +*** 1338,1377 **** + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + loose_clipboard(); + # endif +! +! # if defined(_REENTRANT) && defined(SIGCONT) + sigcont_received = FALSE; + # endif + kill(0, SIGTSTP); /* send ourselves a STOP signal */ +! # if defined(_REENTRANT) && defined(SIGCONT) + /* + * Wait for the SIGCONT signal to be handled. It generally happens +! * immediately, but somehow not all the time. Do not call pause() +! * because there would be race condition which would hang Vim if +! * signal happened in between the test of sigcont_received and the +! * call to pause(). If signal is not yet received, call sleep(0) +! * to just yield CPU. Signal should then be received. If somehow +! * it's still not received, sleep 1, 2, 3 ms. Don't bother waiting +! * further if signal is not received after 1+2+3+4 ms (not expected +! * to happen). + */ + { + long wait_time; + for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++) +- /* Loop is not entered most of the time */ + mch_delay(wait_time, FALSE); + } + # endif + +! # ifdef FEAT_TITLE +! /* +! * Set oldtitle to NULL, so the current title is obtained again. +! */ +! VIM_CLEAR(oldtitle); +! # endif +! settmode(TMODE_RAW); +! need_check_timestamps = TRUE; +! did_check_timestamps = FALSE; + #else + suspend_shell(); + #endif +--- 1376,1407 ---- + # if defined(FEAT_CLIPBOARD) && defined(FEAT_X11) + loose_clipboard(); + # endif +! # if defined(SIGCONT) + sigcont_received = FALSE; + # endif ++ + kill(0, SIGTSTP); /* send ourselves a STOP signal */ +! +! # if defined(SIGCONT) + /* + * Wait for the SIGCONT signal to be handled. It generally happens +! * immediately, but somehow not all the time, probably because it's handled +! * in another thread. Do not call pause() because there would be race +! * condition which would hang Vim if signal happened in between the test of +! * sigcont_received and the call to pause(). If signal is not yet received, +! * sleep 0, 1, 2, 3 ms. Don't bother waiting further if signal is not +! * received after 1+2+3 ms (not expected to happen). + */ + { + long wait_time; ++ + for (wait_time = 0; !sigcont_received && wait_time <= 3L; wait_time++) + mch_delay(wait_time, FALSE); + } + # endif ++ in_mch_suspend = FALSE; + +! after_sigcont(); + #else + suspend_shell(); + #endif +*************** +*** 1411,1417 **** + #ifdef SIGTSTP + signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); + #endif +! #if defined(_REENTRANT) && defined(SIGCONT) + signal(SIGCONT, sigcont_handler); + #endif + +--- 1441,1447 ---- + #ifdef SIGTSTP + signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); + #endif +! #if defined(SIGCONT) + signal(SIGCONT, sigcont_handler); + #endif + +*************** +*** 1470,1476 **** + reset_signals(void) + { + catch_signals(SIG_DFL, SIG_DFL); +! #if defined(_REENTRANT) && defined(SIGCONT) + /* SIGCONT isn't in the list, because its default action is ignore */ + signal(SIGCONT, SIG_DFL); + #endif +--- 1500,1506 ---- + reset_signals(void) + { + catch_signals(SIG_DFL, SIG_DFL); +! #if defined(SIGCONT) + /* SIGCONT isn't in the list, because its default action is ignore */ + signal(SIGCONT, SIG_DFL); + #endif +*************** +*** 1533,1539 **** + for (i = 0; signal_info[i].sig != -1; i++) + sigaddset(&newset, signal_info[i].sig); + +! # if defined(_REENTRANT) && defined(SIGCONT) + /* SIGCONT isn't in the list, because its default action is ignore */ + sigaddset(&newset, SIGCONT); + # endif +--- 1563,1569 ---- + for (i = 0; signal_info[i].sig != -1; i++) + sigaddset(&newset, signal_info[i].sig); + +! # if defined(SIGCONT) + /* SIGCONT isn't in the list, because its default action is ignore */ + sigaddset(&newset, SIGCONT); + # endif +*** ../vim-8.1.0303/src/term.c 2018-08-20 21:58:53.505410802 +0200 +--- src/term.c 2018-08-21 12:55:46.236289405 +0200 +*************** +*** 3834,3849 **** + static int cursor_is_off = FALSE; + + /* +! * Enable the cursor. + */ + void + cursor_on(void) + { + if (cursor_is_off) +! { +! out_str(T_VE); +! cursor_is_off = FALSE; +! } + } + + /* +--- 3834,3856 ---- + static int cursor_is_off = FALSE; + + /* +! * Enable the cursor without checking if it's already enabled. +! */ +! void +! cursor_on_force(void) +! { +! out_str(T_VE); +! cursor_is_off = FALSE; +! } +! +! /* +! * Enable the cursor if it's currently off. + */ + void + cursor_on(void) + { + if (cursor_is_off) +! cursor_on_force(); + } + + /* +*** ../vim-8.1.0303/src/proto/term.pro 2018-08-20 21:58:53.509410779 +0200 +--- src/proto/term.pro 2018-08-21 12:55:54.468217234 +0200 +*************** +*** 52,57 **** +--- 52,58 ---- + int mouse_has(int c); + int mouse_model_popup(void); + void scroll_start(void); ++ void cursor_on_force(void); + void cursor_on(void); + void cursor_off(void); + void term_cursor_mode(int forced); +*** ../vim-8.1.0303/src/version.c 2018-08-20 22:53:00.210105086 +0200 +--- src/version.c 2018-08-21 12:40:20.807634438 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 304, + /**/ + +-- +I used to wonder about the meaning of life. But I looked it +up in the dictionary under "L" and there it was - the meaning +of life. It was less than I expected. - Dogbert + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0305 b/data/vim/patches/8.1.0305 new file mode 100644 index 000000000..2fd893655 --- /dev/null +++ b/data/vim/patches/8.1.0305 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0305 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0305 +Problem: Missing support for Lua 5.4 32 bits on Unix. +Solution: Define lua_newuserdatauv. (Kazunobu Kuriyama) +Files: src/if_lua.c + + +*** ../vim-8.1.0304/src/if_lua.c 2018-07-25 22:02:32.227966325 +0200 +--- src/if_lua.c 2018-08-21 14:00:16.783006997 +0200 +*************** +*** 164,170 **** + #define lua_rawget dll_lua_rawget + #define lua_rawgeti dll_lua_rawgeti + #define lua_createtable dll_lua_createtable +! #define lua_newuserdata dll_lua_newuserdata + #define lua_getmetatable dll_lua_getmetatable + #define lua_setfield dll_lua_setfield + #define lua_rawset dll_lua_rawset +--- 164,174 ---- + #define lua_rawget dll_lua_rawget + #define lua_rawgeti dll_lua_rawgeti + #define lua_createtable dll_lua_createtable +! #if LUA_VERSION_NUM >= 504 +! #define lua_newuserdatauv dll_lua_newuserdatauv +! #else +! #define lua_newuserdata dll_lua_newuserdata +! #endif + #define lua_getmetatable dll_lua_getmetatable + #define lua_setfield dll_lua_setfield + #define lua_rawset dll_lua_rawset +*************** +*** 261,267 **** +--- 265,275 ---- + int (*dll_lua_rawgeti) (lua_State *L, int idx, lua_Integer n); + #endif + void (*dll_lua_createtable) (lua_State *L, int narr, int nrec); ++ #if LUA_VERSION_NUM >= 504 ++ void *(*dll_lua_newuserdatauv) (lua_State *L, size_t sz, int nuvalue); ++ #else + void *(*dll_lua_newuserdata) (lua_State *L, size_t sz); ++ #endif + int (*dll_lua_getmetatable) (lua_State *L, int objindex); + void (*dll_lua_setfield) (lua_State *L, int idx, const char *k); + void (*dll_lua_rawset) (lua_State *L, int idx); +*************** +*** 362,368 **** +--- 370,380 ---- + {"lua_rawget", (luaV_function) &dll_lua_rawget}, + {"lua_rawgeti", (luaV_function) &dll_lua_rawgeti}, + {"lua_createtable", (luaV_function) &dll_lua_createtable}, ++ #if LUA_VERSION_NUM >= 504 ++ {"lua_newuserdatauv", (luaV_function) &dll_lua_newuserdatauv}, ++ #else + {"lua_newuserdata", (luaV_function) &dll_lua_newuserdata}, ++ #endif + {"lua_getmetatable", (luaV_function) &dll_lua_getmetatable}, + {"lua_setfield", (luaV_function) &dll_lua_setfield}, + {"lua_rawset", (luaV_function) &dll_lua_rawset}, +*** ../vim-8.1.0304/src/version.c 2018-08-21 13:09:06.254115882 +0200 +--- src/version.c 2018-08-21 14:03:03.910066481 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 305, + /**/ + +-- +Why I like vim: +> I like VIM because, when I ask a question in this newsgroup, I get a +> one-line answer. With xemacs, I get a 1Kb lisp script with bugs in it ;-) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0306 b/data/vim/patches/8.1.0306 new file mode 100644 index 000000000..e2d9e3079 --- /dev/null +++ b/data/vim/patches/8.1.0306 @@ -0,0 +1,498 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0306 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0306 +Problem: Plural messages are not translated properly. +Solution: Add more usage of NGETTEXT(). (Sergey Alyoshin) +Files: src/vim.h, src/buffer.c, src/ex_cmds.c, src/ex_docmd.c, + src/fileio.c, src/misc1.c, src/ops.c + + +*** ../vim-8.1.0305/src/vim.h 2018-08-11 13:57:16.215969777 +0200 +--- src/vim.h 2018-08-21 14:34:37.322333098 +0200 +*************** +*** 553,558 **** +--- 553,562 ---- + /* + * The _() stuff is for using gettext(). It is a no-op when libintl.h is not + * found or the +multilang feature is disabled. ++ * Use NGETTEXT(single, multi, number) to get plural behavior: ++ * - single - message for singular form ++ * - multi - message for plural form ++ * - number - the count + */ + #ifdef FEAT_GETTEXT + # ifdef DYNAMIC_GETTEXT +*** ../vim-8.1.0305/src/buffer.c 2018-08-11 13:57:16.207969835 +0200 +--- src/buffer.c 2018-08-21 14:39:25.584435950 +0200 +*************** +*** 1174,1199 **** + else if (deleted >= p_report) + { + if (command == DOBUF_UNLOAD) +! { +! if (deleted == 1) +! MSG(_("1 buffer unloaded")); +! else +! smsg((char_u *)_("%d buffers unloaded"), deleted); +! } + else if (command == DOBUF_DEL) +! { +! if (deleted == 1) +! MSG(_("1 buffer deleted")); +! else +! smsg((char_u *)_("%d buffers deleted"), deleted); +! } + else +! { +! if (deleted == 1) +! MSG(_("1 buffer wiped out")); +! else +! smsg((char_u *)_("%d buffers wiped out"), deleted); +! } + } + } + +--- 1174,1187 ---- + else if (deleted >= p_report) + { + if (command == DOBUF_UNLOAD) +! smsg((char_u *)NGETTEXT("%d buffer unloaded", +! "%d buffers unloaded", deleted), deleted); + else if (command == DOBUF_DEL) +! smsg((char_u *)NGETTEXT("%d buffer deleted", +! "%d buffers deleted", deleted), deleted); + else +! smsg((char_u *)NGETTEXT("%d buffer wiped out", +! "%d buffers wiped out", deleted), deleted); + } + } + +*************** +*** 3485,3503 **** + n = (int)(((long)curwin->w_cursor.lnum * 100L) / + (long)curbuf->b_ml.ml_line_count); + if (curbuf->b_ml.ml_flags & ML_EMPTY) +- { + vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg)); +- } + #ifdef FEAT_CMDL_INFO + else if (p_ru) +- { + /* Current line and column are already on the screen -- webb */ +! if (curbuf->b_ml.ml_line_count == 1) +! vim_snprintf_add((char *)buffer, IOSIZE, _("1 line --%d%%--"), n); +! else +! vim_snprintf_add((char *)buffer, IOSIZE, _("%ld lines --%d%%--"), +! (long)curbuf->b_ml.ml_line_count, n); +! } + #endif + else + { +--- 3473,3486 ---- + n = (int)(((long)curwin->w_cursor.lnum * 100L) / + (long)curbuf->b_ml.ml_line_count); + if (curbuf->b_ml.ml_flags & ML_EMPTY) + vim_snprintf_add((char *)buffer, IOSIZE, "%s", _(no_lines_msg)); + #ifdef FEAT_CMDL_INFO + else if (p_ru) + /* Current line and column are already on the screen -- webb */ +! vim_snprintf_add((char *)buffer, IOSIZE, +! NGETTEXT("%ld line --%d%%--", "%ld lines --%d%%--", +! curbuf->b_ml.ml_line_count), +! (long)curbuf->b_ml.ml_line_count, n); + #endif + else + { +*** ../vim-8.1.0305/src/ex_cmds.c 2018-08-11 14:41:48.326928864 +0200 +--- src/ex_cmds.c 2018-08-21 15:09:35.720800340 +0200 +*************** +*** 985,996 **** + ml_delete(line1 + extra, TRUE); + + if (!global_busy && num_lines > p_report) +! { +! if (num_lines == 1) +! MSG(_("1 line moved")); +! else +! smsg((char_u *)_("%ld lines moved"), num_lines); +! } + + /* + * Leave the cursor on the last of the moved lines. +--- 985,992 ---- + ml_delete(line1 + extra, TRUE); + + if (!global_busy && num_lines > p_report) +! smsg((char_u *)NGETTEXT("%ld line moved", "%ld lines moved", num_lines), +! (long)num_lines); + + /* + * Leave the cursor on the last of the moved lines. +*************** +*** 5940,5962 **** + || count_only) + && messaging()) + { + if (got_int) + STRCPY(msg_buf, _("(Interrupted) ")); + else + *msg_buf = NUL; +! if (sub_nsubs == 1) +! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), +! "%s", count_only ? _("1 match") : _("1 substitution")); +! else +! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), +! count_only ? _("%ld matches") : _("%ld substitutions"), +! sub_nsubs); +! if (sub_nlines == 1) +! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), +! "%s", _(" on 1 line")); +! else +! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), +! _(" on %ld lines"), (long)sub_nlines); + if (msg(msg_buf)) + /* save message to display it after redraw */ + set_keep_msg(msg_buf, 0); +--- 5936,5964 ---- + || count_only) + && messaging()) + { ++ char *msg_single; ++ char *msg_plural; ++ + if (got_int) + STRCPY(msg_buf, _("(Interrupted) ")); + else + *msg_buf = NUL; +! +! msg_single = count_only +! ? NGETTEXT("%ld match on %ld line", +! "%ld matches on %ld line", sub_nsubs) +! : NGETTEXT("%ld substitution on %ld line", +! "%ld substitutions on %ld line", sub_nsubs); +! msg_plural = count_only +! ? NGETTEXT("%ld match on %ld lines", +! "%ld matches on %ld lines", sub_nsubs) +! : NGETTEXT("%ld substitution on %ld lines", +! "%ld substitutions on %ld lines", sub_nsubs); +! +! vim_snprintf_add((char *)msg_buf, sizeof(msg_buf), +! NGETTEXT(msg_single, msg_plural, sub_nlines), +! sub_nsubs, (long)sub_nlines); +! + if (msg(msg_buf)) + /* save message to display it after redraw */ + set_keep_msg(msg_buf, 0); +*** ../vim-8.1.0305/src/ex_docmd.c 2018-08-15 20:59:44.227025009 +0200 +--- src/ex_docmd.c 2018-08-21 14:35:02.210167853 +0200 +*************** +*** 5749,5770 **** + { + char_u buff[DIALOG_MSG_SIZE]; + +! if (n == 1) +! vim_strncpy(buff, +! (char_u *)_("1 more file to edit. Quit anyway?"), +! DIALOG_MSG_SIZE - 1); +! else +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, +! _("%d more files to edit. Quit anyway?"), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; + return FAIL; + } + #endif +! if (n == 1) +! EMSG(_("E173: 1 more file to edit")); +! else +! EMSGN(_("E173: %ld more files to edit"), n); + quitmore = 2; /* next try to quit is allowed */ + } + return FAIL; +--- 5749,5764 ---- + { + char_u buff[DIALOG_MSG_SIZE]; + +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, +! NGETTEXT("%d more file to edit. Quit anyway?", +! "%d more files to edit. Quit anyway?", n), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; + return FAIL; + } + #endif +! EMSGN(NGETTEXT("E173: %ld more file to edit", +! "E173: %ld more files to edit", n), n); + quitmore = 2; /* next try to quit is allowed */ + } + return FAIL; +*** ../vim-8.1.0305/src/fileio.c 2018-08-11 13:57:16.211969806 +0200 +--- src/fileio.c 2018-08-21 14:35:02.214167827 +0200 +*************** +*** 5349,5364 **** + "%ldL, %lldC", lnum, (long long)nchars); + else + { +! if (lnum == 1) +! STRCPY(p, _("1 line, ")); +! else +! sprintf((char *)p, _("%ld lines, "), lnum); + p += STRLEN(p); +! if (nchars == 1) +! STRCPY(p, _("1 character")); +! else +! vim_snprintf((char *)p, IOSIZE - (p - IObuff), +! _("%lld characters"), (long long)nchars); + } + } + +--- 5349,5359 ---- + "%ldL, %lldC", lnum, (long long)nchars); + else + { +! sprintf((char *)p, NGETTEXT("%ld line, ", "%ld lines, ", lnum), lnum); + p += STRLEN(p); +! vim_snprintf((char *)p, IOSIZE - (p - IObuff), +! NGETTEXT("%lld character", "%lld characters", nchars), +! (long long)nchars); + } + } + +*** ../vim-8.1.0305/src/misc1.c 2018-07-29 16:09:14.636945607 +0200 +--- src/misc1.c 2018-08-21 14:35:02.214167827 +0200 +*************** +*** 3802,3825 **** + + if (pn > p_report) + { +! if (pn == 1) +! { +! if (n > 0) +! vim_strncpy(msg_buf, (char_u *)_("1 more line"), +! MSG_BUF_LEN - 1); +! else +! vim_strncpy(msg_buf, (char_u *)_("1 line less"), +! MSG_BUF_LEN - 1); +! } + else +! { +! if (n > 0) +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld more lines"), pn); +! else +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld fewer lines"), pn); +! } + if (got_int) + vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN); + if (msg(msg_buf)) +--- 3802,3813 ---- + + if (pn > p_report) + { +! if (n > 0) +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! NGETTEXT("%ld more line", "%ld more lines", pn), pn); + else +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! NGETTEXT("%ld line less", "%ld fewer lines", pn), pn); + if (got_int) + vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN); + if (msg(msg_buf)) +*** ../vim-8.1.0305/src/ops.c 2018-07-29 16:09:14.640945583 +0200 +--- src/ops.c 2018-08-21 15:02:16.907624684 +0200 +*************** +*** 244,250 **** + { + long i; + int first_char; +- char_u *s; + int block_col = 0; + + if (u_save((linenr_T)(oap->start.lnum - 1), +--- 244,249 ---- +*************** +*** 297,322 **** + + if (oap->line_count > p_report) + { + if (oap->op_type == OP_RSHIFT) +! s = (char_u *)">"; +! else +! s = (char_u *)"<"; +! if (oap->line_count == 1) +! { +! if (amount == 1) +! sprintf((char *)IObuff, _("1 line %sed 1 time"), s); +! else +! sprintf((char *)IObuff, _("1 line %sed %d times"), s, amount); +! } + else +! { +! if (amount == 1) +! sprintf((char *)IObuff, _("%ld lines %sed 1 time"), +! oap->line_count, s); +! else +! sprintf((char *)IObuff, _("%ld lines %sed %d times"), +! oap->line_count, s, amount); +! } + msg(IObuff); + } + +--- 296,316 ---- + + if (oap->line_count > p_report) + { ++ char *op; ++ char *msg_line_single; ++ char *msg_line_plural; ++ + if (oap->op_type == OP_RSHIFT) +! op = ">"; + else +! op = "<"; +! msg_line_single = NGETTEXT("%ld line %sed %d time", +! "%ld line %sed %d times", amount); +! msg_line_plural = NGETTEXT("%ld lines %sed %d time", +! "%ld lines %sed %d times", amount); +! vim_snprintf((char *)IObuff, IOSIZE, +! NGETTEXT(msg_line_single, msg_line_plural, oap->line_count), +! oap->line_count, op, amount); + msg(IObuff); + } + +*************** +*** 789,798 **** + if (oap->line_count > p_report) + { + i = oap->line_count - (i + 1); +! if (i == 1) +! MSG(_("1 line indented ")); +! else +! smsg((char_u *)_("%ld lines indented "), i); + } + /* set '[ and '] marks */ + curbuf->b_op_start = oap->start; +--- 783,790 ---- + if (oap->line_count > p_report) + { + i = oap->line_count - (i + 1); +! smsg((char_u *)NGETTEXT("%ld line indented ", +! "%ld lines indented ", i), i); + } + /* set '[ and '] marks */ + curbuf->b_op_start = oap->start; +*************** +*** 2529,2540 **** + curbuf->b_op_end = oap->end; + + if (oap->line_count > p_report) +! { +! if (oap->line_count == 1) +! MSG(_("1 line changed")); +! else +! smsg((char_u *)_("%ld lines changed"), oap->line_count); +! } + } + + /* +--- 2521,2528 ---- + curbuf->b_op_end = oap->end; + + if (oap->line_count > p_report) +! smsg((char_u *)NGETTEXT("%ld line changed", "%ld lines changed", +! oap->line_count), oap->line_count); + } + + /* +*************** +*** 3348,3366 **** + + /* redisplay now, so message is not deleted */ + update_topline_redraw(); +! if (yanklines == 1) + { +! if (oap->block_mode) +! smsg((char_u *)_("block of 1 line yanked%s"), namebuf); +! else +! smsg((char_u *)_("1 line yanked%s"), namebuf); + } +- else if (oap->block_mode) +- smsg((char_u *)_("block of %ld lines yanked%s"), +- yanklines, namebuf); + else +! smsg((char_u *)_("%ld lines yanked%s"), yanklines, +! namebuf); + } + } + +--- 3336,3353 ---- + + /* redisplay now, so message is not deleted */ + update_topline_redraw(); +! if (oap->block_mode) + { +! smsg((char_u *)NGETTEXT("block of %ld line yanked%s", +! "block of %ld lines yanked%s", yanklines), +! yanklines, namebuf); + } + else +! { +! smsg((char_u *)NGETTEXT("%ld line yanked%s", +! "%ld lines yanked%s", yanklines), +! yanklines, namebuf); +! } + } + } + +*************** +*** 5653,5664 **** + curbuf->b_op_start = startpos; + + if (change_cnt > p_report) +! { +! if (change_cnt == 1) +! MSG(_("1 line changed")); +! else +! smsg((char_u *)_("%ld lines changed"), change_cnt); +! } + } + } + +--- 5640,5647 ---- + curbuf->b_op_start = startpos; + + if (change_cnt > p_report) +! smsg((char_u *)NGETTEXT("%ld line changed", "%ld lines changed", +! change_cnt), change_cnt); + } + } + +*** ../vim-8.1.0305/src/version.c 2018-08-21 14:23:31.418606007 +0200 +--- src/version.c 2018-08-21 15:02:32.359526078 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 306, + /**/ + +-- +LARGE MAN: Who's that then? +CART DRIVER: (Grudgingly) I dunno, Must be a king. +LARGE MAN: Why? +CART DRIVER: He hasn't got shit all over him. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0307 b/data/vim/patches/8.1.0307 new file mode 100644 index 000000000..95342de6e --- /dev/null +++ b/data/vim/patches/8.1.0307 @@ -0,0 +1,233 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0307 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0307 +Problem: There is no good way to get the window layout. +Solution: Add the winlayout() function. (Yegappan Lakshmanan) +Files: runtime/doc/eval.txt, src/evalfunc.c, src/proto/window.pro, + src/window.c, src/testdir/test_window_id.vim + + +*** ../vim-8.1.0306/runtime/doc/eval.txt 2018-07-29 15:34:20.864300100 +0200 +--- runtime/doc/eval.txt 2018-08-21 16:35:43.299154086 +0200 +*************** +*** 2497,2502 **** +--- 2504,2510 ---- + winbufnr({nr}) Number buffer number of window {nr} + wincol() Number window column of the cursor + winheight({nr}) Number height of window {nr} ++ winlayout([{tabnr}]) List layout of windows in tab {tabnr} + winline() Number window line of the cursor + winnr([{expr}]) Number number of current window + winrestcmd() String returns command to restore window sizes +*************** +*** 9087,9092 **** +--- 9096,9130 ---- + Examples: > + :echo "The current window has " . winheight(0) . " lines." + < ++ winlayout([{tabnr}]) *winlayout()* ++ The result is a nested List containing the layout of windows ++ in a tabpage. ++ ++ Without {tabnr} use the current tabpage, otherwise the tabpage ++ with number {tabnr}. If the tabpage {tabnr} is not found, ++ returns an empty list. ++ ++ For a leaf window, it returns: ++ ['leaf', {winid}] ++ For horizontally split windows, which form a column, it ++ returns: ++ ['col', [{nested list of windows}]] ++ For vertically split windows, which form a row, it returns: ++ ['row', [{nested list of windows}]] ++ ++ Example: > ++ " Only one window in the tab page ++ :echo winlayout() ++ ['leaf', 1000] ++ " Two horizontally split windows ++ :echo winlayout() ++ ['col', [['leaf', 1000], ['leaf', 1001]]] ++ " Three horizontally split windows, with two ++ " vertically split windows in the middle window ++ :echo winlayout(2) ++ ['col', [['leaf', 1002], ['row', ['leaf', 1003], ++ ['leaf', 1001]]], ['leaf', 1000]] ++ < + *winline()* + winline() The result is a Number, which is the screen line of the cursor + in the window. This is counting screen lines from the top of +*** ../vim-8.1.0306/src/evalfunc.c 2018-08-11 13:57:16.211969806 +0200 +--- src/evalfunc.c 2018-08-21 16:19:29.914566586 +0200 +*************** +*** 463,468 **** +--- 463,469 ---- + static void f_winbufnr(typval_T *argvars, typval_T *rettv); + static void f_wincol(typval_T *argvars, typval_T *rettv); + static void f_winheight(typval_T *argvars, typval_T *rettv); ++ static void f_winlayout(typval_T *argvars, typval_T *rettv); + static void f_winline(typval_T *argvars, typval_T *rettv); + static void f_winnr(typval_T *argvars, typval_T *rettv); + static void f_winrestcmd(typval_T *argvars, typval_T *rettv); +*************** +*** 952,957 **** +--- 953,959 ---- + {"winbufnr", 1, 1, f_winbufnr}, + {"wincol", 0, 0, f_wincol}, + {"winheight", 1, 1, f_winheight}, ++ {"winlayout", 0, 1, f_winlayout}, + {"winline", 0, 0, f_winline}, + {"winnr", 0, 1, f_winnr}, + {"winrestcmd", 0, 0, f_winrestcmd}, +*************** +*** 13743,13748 **** +--- 13745,13773 ---- + } + + /* ++ * "winlayout()" function ++ */ ++ static void ++ f_winlayout(typval_T *argvars, typval_T *rettv) ++ { ++ tabpage_T *tp; ++ ++ if (rettv_list_alloc(rettv) != OK) ++ return; ++ ++ if (argvars[0].v_type == VAR_UNKNOWN) ++ tp = curtab; ++ else ++ { ++ tp = find_tabpage((int)get_tv_number(&argvars[0])); ++ if (tp == NULL) ++ return; ++ } ++ ++ get_framelayout(tp->tp_topframe, rettv->vval.v_list, TRUE); ++ } ++ ++ /* + * "winline()" function + */ + static void +*** ../vim-8.1.0306/src/proto/window.pro 2018-06-12 16:49:26.366028607 +0200 +--- src/proto/window.pro 2018-08-21 16:38:15.282101882 +0200 +*************** +*** 94,97 **** +--- 94,98 ---- + win_T *win_id2wp(typval_T *argvars); + int win_id2win(typval_T *argvars); + void win_findbuf(typval_T *argvars, list_T *list); ++ void get_framelayout(frame_T *fr, list_T *l, int topframe); + /* vim: set ft=c : */ +*** ../vim-8.1.0306/src/window.c 2018-07-25 22:36:48.991518559 +0200 +--- src/window.c 2018-08-21 16:43:30.963948179 +0200 +*************** +*** 7236,7239 **** +--- 7236,7288 ---- + list_append_number(list, wp->w_id); + } + ++ /* ++ * Get the layout of the given tab page for winlayout(). ++ */ ++ void ++ get_framelayout(frame_T *fr, list_T *l, int outer) ++ { ++ frame_T *child; ++ list_T *fr_list; ++ list_T *win_list; ++ ++ if (fr == NULL) ++ return; ++ ++ if (outer) ++ // outermost call from f_winlayout() ++ fr_list = l; ++ else ++ { ++ fr_list = list_alloc(); ++ if (fr_list == NULL) ++ return; ++ list_append_list(l, fr_list); ++ } ++ ++ if (fr->fr_layout == FR_LEAF) ++ { ++ if (fr->fr_win != NULL) ++ { ++ list_append_string(fr_list, (char_u *)"leaf", -1); ++ list_append_number(fr_list, fr->fr_win->w_id); ++ } ++ } ++ else ++ { ++ list_append_string(fr_list, ++ fr->fr_layout == FR_ROW ? (char_u *)"row" : (char_u *)"col", -1); ++ ++ win_list = list_alloc(); ++ if (win_list == NULL) ++ return; ++ list_append_list(fr_list, win_list); ++ child = fr->fr_child; ++ while (child != NULL) ++ { ++ get_framelayout(child, win_list, FALSE); ++ child = child->fr_next; ++ } ++ } ++ } + #endif +*** ../vim-8.1.0306/src/testdir/test_window_id.vim 2016-11-13 14:25:47.000000000 +0100 +--- src/testdir/test_window_id.vim 2018-08-21 16:47:00.102536647 +0200 +*************** +*** 101,103 **** +--- 101,123 ---- + call assert_equal(win_getid(1), win_getid(1, 1)) + tabclose! + endfunc ++ ++ func Test_winlayout() ++ let w1 = win_getid() ++ call assert_equal(['leaf', w1], winlayout()) ++ ++ split ++ let w2 = win_getid() ++ call assert_equal(['col', [['leaf', w2], ['leaf', w1]]], winlayout()) ++ ++ split ++ let w3 = win_getid() ++ call assert_equal(['col', [['leaf', w3], ['leaf', w2], ['leaf', w1]]], winlayout()) ++ ++ 2wincmd w ++ vsplit ++ let w4 = win_getid() ++ call assert_equal(['col', [['leaf', w3], ['row', [['leaf', w4], ['leaf', w2]]], ['leaf', w1]]], winlayout()) ++ ++ only! ++ endfunc +*** ../vim-8.1.0306/src/version.c 2018-08-21 15:12:10.843801621 +0200 +--- src/version.c 2018-08-21 16:54:45.515933731 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 307, + /**/ + +-- +Friends? I have lots of friends! In fact, I have all episodes ever made. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0308 b/data/vim/patches/8.1.0308 new file mode 100644 index 000000000..34230ea65 --- /dev/null +++ b/data/vim/patches/8.1.0308 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0308 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0308 +Problem: A quick undo shows "1 seconds ago". (Tony Mechelynck) +Solution: Add singular/plural message. +Files: src/undo.c + + +*** ../vim-8.1.0307/src/undo.c 2018-07-13 16:31:11.952226727 +0200 +--- src/undo.c 2018-08-21 17:05:23.300046260 +0200 +*************** +*** 3124,3131 **** + } + else + #endif +! vim_snprintf((char *)buf, buflen, _("%ld seconds ago"), +! (long)(vim_time() - tt)); + } + + /* +--- 3124,3136 ---- + } + else + #endif +! { +! long seconds = (long)(vim_time() - tt); +! +! vim_snprintf((char *)buf, buflen, +! NGETTEXT("%ld second ago", "%ld seconds ago", seconds), +! seconds); +! } + } + + /* +*** ../vim-8.1.0307/src/version.c 2018-08-21 16:56:28.371325254 +0200 +--- src/version.c 2018-08-21 17:06:12.627737719 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 308, + /**/ + +-- +ARTHUR: I've said I'm sorry about the old woman, but from the behind you + looked ... +DENNIS: What I object to is that you automatically treat me like an inferior... +ARTHUR: Well ... I AM king. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0309 b/data/vim/patches/8.1.0309 new file mode 100644 index 000000000..a4a36b0ae --- /dev/null +++ b/data/vim/patches/8.1.0309 @@ -0,0 +1,395 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0309 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0309 +Problem: Profiling does not show a count for condition lines. (Daniel + Hahler) +Solution: Count lines when not skipping. (Ozaki Kiichi, closes #2499) +Files: src/ex_docmd.c, src/testdir/test_profile.vim + + +*** ../vim-8.1.0308/src/ex_docmd.c 2018-08-21 15:12:10.839801647 +0200 +--- src/ex_docmd.c 2018-08-21 17:40:31.920546399 +0200 +*************** +*** 1766,1782 **** + ea.skip = (if_level > 0); + #endif + + #ifdef FEAT_EVAL + # ifdef FEAT_PROFILE +! /* Count this line for profiling if ea.skip is FALSE. */ +! if (do_profiling == PROF_YES && !ea.skip) + { +! if (getline_equal(fgetline, cookie, get_func_line)) +! func_line_exec(getline_cookie(fgetline, cookie)); +! else if (getline_equal(fgetline, cookie, getsourceline)) +! script_line_exec(); + } +! #endif + + /* May go to debug mode. If this happens and the ">quit" debug command is + * used, throw an interrupt exception and skip the next command. */ +--- 1766,1816 ---- + ea.skip = (if_level > 0); + #endif + ++ /* ++ * 3. Skip over the range to find the command. Let "p" point to after it. ++ * ++ * We need the command to know what kind of range it uses. ++ */ ++ cmd = ea.cmd; ++ ea.cmd = skip_range(ea.cmd, NULL); ++ if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL) ++ ea.cmd = skipwhite(ea.cmd + 1); ++ p = find_command(&ea, NULL); ++ + #ifdef FEAT_EVAL + # ifdef FEAT_PROFILE +! // Count this line for profiling if skip is TRUE. +! if (do_profiling == PROF_YES +! && (!ea.skip || cstack->cs_idx == 0 || (cstack->cs_idx > 0 +! && (cstack->cs_flags[cstack->cs_idx - 1] & CSF_ACTIVE)))) + { +! int skip = did_emsg || got_int || did_throw; +! +! if (ea.cmdidx == CMD_catch) +! skip = !skip && !(cstack->cs_idx >= 0 +! && (cstack->cs_flags[cstack->cs_idx] & CSF_THROWN) +! && !(cstack->cs_flags[cstack->cs_idx] & CSF_CAUGHT)); +! else if (ea.cmdidx == CMD_else || ea.cmdidx == CMD_elseif) +! skip = skip || !(cstack->cs_idx >= 0 +! && !(cstack->cs_flags[cstack->cs_idx] +! & (CSF_ACTIVE | CSF_TRUE))); +! else if (ea.cmdidx == CMD_finally) +! skip = FALSE; +! else if (ea.cmdidx != CMD_endif +! && ea.cmdidx != CMD_endfor +! && ea.cmdidx != CMD_endtry +! && ea.cmdidx != CMD_endwhile) +! skip = ea.skip; +! +! if (!skip) +! { +! if (getline_equal(fgetline, cookie, get_func_line)) +! func_line_exec(getline_cookie(fgetline, cookie)); +! else if (getline_equal(fgetline, cookie, getsourceline)) +! script_line_exec(); +! } + } +! # endif + + /* May go to debug mode. If this happens and the ">quit" debug command is + * used, throw an interrupt exception and skip the next command. */ +*************** +*** 1789,1805 **** + #endif + + /* +- * 3. Skip over the range to find the command. Let "p" point to after it. +- * +- * We need the command to know what kind of range it uses. +- */ +- cmd = ea.cmd; +- ea.cmd = skip_range(ea.cmd, NULL); +- if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL) +- ea.cmd = skipwhite(ea.cmd + 1); +- p = find_command(&ea, NULL); +- +- /* + * 4. parse a range specifier of the form: addr [,addr] [;addr] .. + * + * where 'addr' is: +--- 1823,1828 ---- +*** ../vim-8.1.0308/src/testdir/test_profile.vim 2018-06-30 21:18:10.486300954 +0200 +--- src/testdir/test_profile.vim 2018-08-21 17:35:04.318354275 +0200 +*************** +*** 67,73 **** + call assert_match('^\s*1\s\+.*\slet l:count = 100$', lines[13]) + call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[14]) + call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[15]) +! call assert_match('^\s*100\s\+.*\sendwhile$', lines[16]) + call assert_equal('', lines[17]) + call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[18]) + call assert_equal('count total (s) self (s) function', lines[19]) +--- 67,73 ---- + call assert_match('^\s*1\s\+.*\slet l:count = 100$', lines[13]) + call assert_match('^\s*101\s\+.*\swhile l:count > 0$', lines[14]) + call assert_match('^\s*100\s\+.*\s let l:count = l:count - 1$', lines[15]) +! call assert_match('^\s*101\s\+.*\sendwhile$', lines[16]) + call assert_equal('', lines[17]) + call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[18]) + call assert_equal('count total (s) self (s) function', lines[19]) +*************** +*** 84,89 **** +--- 84,310 ---- + call delete('Xprofile_func.log') + endfunc + ++ func Test_profile_func_with_ifelse() ++ let lines = [ ++ \ "func! Foo1()", ++ \ " if 1", ++ \ " let x = 0", ++ \ " elseif 1", ++ \ " let x = 1", ++ \ " else", ++ \ " let x = 2", ++ \ " endif", ++ \ "endfunc", ++ \ "func! Foo2()", ++ \ " if 0", ++ \ " let x = 0", ++ \ " elseif 1", ++ \ " let x = 1", ++ \ " else", ++ \ " let x = 2", ++ \ " endif", ++ \ "endfunc", ++ \ "func! Foo3()", ++ \ " if 0", ++ \ " let x = 0", ++ \ " elseif 0", ++ \ " let x = 1", ++ \ " else", ++ \ " let x = 2", ++ \ " endif", ++ \ "endfunc", ++ \ "call Foo1()", ++ \ "call Foo2()", ++ \ "call Foo3()", ++ \ ] ++ ++ call writefile(lines, 'Xprofile_func.vim') ++ call system(v:progpath ++ \ . ' -es -u NONE -U NONE -i NONE --noplugin' ++ \ . ' -c "profile start Xprofile_func.log"' ++ \ . ' -c "profile func Foo*"' ++ \ . ' -c "so Xprofile_func.vim"' ++ \ . ' -c "qall!"') ++ call assert_equal(0, v:shell_error) ++ ++ let lines = readfile('Xprofile_func.log') ++ ++ " - Foo1() should pass 'if' block. ++ " - Foo2() should pass 'elseif' block. ++ " - Foo3() should pass 'else' block. ++ call assert_equal(54, len(lines)) ++ ++ call assert_equal('FUNCTION Foo1()', lines[0]) ++ call assert_equal('Called 1 time', lines[1]) ++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2]) ++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3]) ++ call assert_equal('', lines[4]) ++ call assert_equal('count total (s) self (s)', lines[5]) ++ call assert_match('^\s*1\s\+.*\sif 1$', lines[6]) ++ call assert_match('^\s*1\s\+.*\s let x = 0$', lines[7]) ++ call assert_match( '^\s\+elseif 1$', lines[8]) ++ call assert_match( '^\s\+let x = 1$', lines[9]) ++ call assert_match( '^\s\+else$', lines[10]) ++ call assert_match( '^\s\+let x = 2$', lines[11]) ++ call assert_match('^\s*1\s\+.*\sendif$', lines[12]) ++ call assert_equal('', lines[13]) ++ call assert_equal('FUNCTION Foo2()', lines[14]) ++ call assert_equal('Called 1 time', lines[15]) ++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[16]) ++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[17]) ++ call assert_equal('', lines[18]) ++ call assert_equal('count total (s) self (s)', lines[19]) ++ call assert_match('^\s*1\s\+.*\sif 0$', lines[20]) ++ call assert_match( '^\s\+let x = 0$', lines[21]) ++ call assert_match('^\s*1\s\+.*\selseif 1$', lines[22]) ++ call assert_match('^\s*1\s\+.*\s let x = 1$', lines[23]) ++ call assert_match( '^\s\+else$', lines[24]) ++ call assert_match( '^\s\+let x = 2$', lines[25]) ++ call assert_match('^\s*1\s\+.*\sendif$', lines[26]) ++ call assert_equal('', lines[27]) ++ call assert_equal('FUNCTION Foo3()', lines[28]) ++ call assert_equal('Called 1 time', lines[29]) ++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[30]) ++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[31]) ++ call assert_equal('', lines[32]) ++ call assert_equal('count total (s) self (s)', lines[33]) ++ call assert_match('^\s*1\s\+.*\sif 0$', lines[34]) ++ call assert_match( '^\s\+let x = 0$', lines[35]) ++ call assert_match('^\s*1\s\+.*\selseif 0$', lines[36]) ++ call assert_match( '^\s\+let x = 1$', lines[37]) ++ call assert_match('^\s*1\s\+.*\selse$', lines[38]) ++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[39]) ++ call assert_match('^\s*1\s\+.*\sendif$', lines[40]) ++ call assert_equal('', lines[41]) ++ call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[42]) ++ call assert_equal('count total (s) self (s) function', lines[43]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[44]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[45]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[46]) ++ call assert_equal('', lines[47]) ++ call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[48]) ++ call assert_equal('count total (s) self (s) function', lines[49]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[50]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[51]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[52]) ++ call assert_equal('', lines[53]) ++ ++ call delete('Xprofile_func.vim') ++ call delete('Xprofile_func.log') ++ endfunc ++ ++ func Test_profile_func_with_trycatch() ++ let lines = [ ++ \ "func! Foo1()", ++ \ " try", ++ \ " let x = 0", ++ \ " catch", ++ \ " let x = 1", ++ \ " finally", ++ \ " let x = 2", ++ \ " endtry", ++ \ "endfunc", ++ \ "func! Foo2()", ++ \ " try", ++ \ " throw 0", ++ \ " catch", ++ \ " let x = 1", ++ \ " finally", ++ \ " let x = 2", ++ \ " endtry", ++ \ "endfunc", ++ \ "func! Foo3()", ++ \ " try", ++ \ " throw 0", ++ \ " catch", ++ \ " throw 1", ++ \ " finally", ++ \ " let x = 2", ++ \ " endtry", ++ \ "endfunc", ++ \ "call Foo1()", ++ \ "call Foo2()", ++ \ "try", ++ \ " call Foo3()", ++ \ "catch", ++ \ "endtry", ++ \ ] ++ ++ call writefile(lines, 'Xprofile_func.vim') ++ call system(v:progpath ++ \ . ' -es -u NONE -U NONE -i NONE --noplugin' ++ \ . ' -c "profile start Xprofile_func.log"' ++ \ . ' -c "profile func Foo*"' ++ \ . ' -c "so Xprofile_func.vim"' ++ \ . ' -c "qall!"') ++ call assert_equal(0, v:shell_error) ++ ++ let lines = readfile('Xprofile_func.log') ++ ++ " - Foo1() should pass 'try' 'finally' blocks. ++ " - Foo2() should pass 'catch' 'finally' blocks. ++ " - Foo3() should not pass 'endtry'. ++ call assert_equal(54, len(lines)) ++ ++ call assert_equal('FUNCTION Foo1()', lines[0]) ++ call assert_equal('Called 1 time', lines[1]) ++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[2]) ++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[3]) ++ call assert_equal('', lines[4]) ++ call assert_equal('count total (s) self (s)', lines[5]) ++ call assert_match('^\s*1\s\+.*\stry$', lines[6]) ++ call assert_match('^\s*1\s\+.*\s let x = 0$', lines[7]) ++ call assert_match( '^\s\+catch$', lines[8]) ++ call assert_match( '^\s\+let x = 1$', lines[9]) ++ call assert_match('^\s*1\s\+.*\sfinally$', lines[10]) ++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[11]) ++ call assert_match('^\s*1\s\+.*\sendtry$', lines[12]) ++ call assert_equal('', lines[13]) ++ call assert_equal('FUNCTION Foo2()', lines[14]) ++ call assert_equal('Called 1 time', lines[15]) ++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[16]) ++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[17]) ++ call assert_equal('', lines[18]) ++ call assert_equal('count total (s) self (s)', lines[19]) ++ call assert_match('^\s*1\s\+.*\stry$', lines[20]) ++ call assert_match('^\s*1\s\+.*\s throw 0$', lines[21]) ++ call assert_match('^\s*1\s\+.*\scatch$', lines[22]) ++ call assert_match('^\s*1\s\+.*\s let x = 1$', lines[23]) ++ call assert_match('^\s*1\s\+.*\sfinally$', lines[24]) ++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[25]) ++ call assert_match('^\s*1\s\+.*\sendtry$', lines[26]) ++ call assert_equal('', lines[27]) ++ call assert_equal('FUNCTION Foo3()', lines[28]) ++ call assert_equal('Called 1 time', lines[29]) ++ call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[30]) ++ call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[31]) ++ call assert_equal('', lines[32]) ++ call assert_equal('count total (s) self (s)', lines[33]) ++ call assert_match('^\s*1\s\+.*\stry$', lines[34]) ++ call assert_match('^\s*1\s\+.*\s throw 0$', lines[35]) ++ call assert_match('^\s*1\s\+.*\scatch$', lines[36]) ++ call assert_match('^\s*1\s\+.*\s throw 1$', lines[37]) ++ call assert_match('^\s*1\s\+.*\sfinally$', lines[38]) ++ call assert_match('^\s*1\s\+.*\s let x = 2$', lines[39]) ++ call assert_match( '^\s\+endtry$', lines[40]) ++ call assert_equal('', lines[41]) ++ call assert_equal('FUNCTIONS SORTED ON TOTAL TIME', lines[42]) ++ call assert_equal('count total (s) self (s) function', lines[43]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[44]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[45]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[46]) ++ call assert_equal('', lines[47]) ++ call assert_equal('FUNCTIONS SORTED ON SELF TIME', lines[48]) ++ call assert_equal('count total (s) self (s) function', lines[49]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[50]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[51]) ++ call assert_match('^\s*1\s\+\d\+\.\d\+\s\+Foo.()$', lines[52]) ++ call assert_equal('', lines[53]) ++ ++ call delete('Xprofile_func.vim') ++ call delete('Xprofile_func.log') ++ endfunc ++ + func Test_profile_file() + let lines = [ + \ 'func! Foo()', +*************** +*** 123,129 **** + call assert_equal(' " a comment', lines[9]) + " if self and total are equal we only get one number + call assert_match('^\s*20\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[10]) +! call assert_match('^\s*20\s\+\d\+\.\d\+\s\+endfor$', lines[11]) + " if self and total are equal we only get one number + call assert_match('^\s*2\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[12]) + call assert_equal('', lines[13]) +--- 344,350 ---- + call assert_equal(' " a comment', lines[9]) + " if self and total are equal we only get one number + call assert_match('^\s*20\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[10]) +! call assert_match('^\s*22\s\+\d\+\.\d\+\s\+endfor$', lines[11]) + " if self and total are equal we only get one number + call assert_match('^\s*2\s\+\(\d\+\.\d\+\s\+\)\=\d\+\.\d\+\s\+call Foo()$', lines[12]) + call assert_equal('', lines[13]) +*** ../vim-8.1.0308/src/version.c 2018-08-21 17:07:40.155188638 +0200 +--- src/version.c 2018-08-21 17:48:43.353706395 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 309, + /**/ + +-- +ARTHUR: ... and I am your king .... +OLD WOMAN: Ooooh! I didn't know we had a king. I thought we were an + autonomous collective ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0310 b/data/vim/patches/8.1.0310 new file mode 100644 index 000000000..1b992b173 --- /dev/null +++ b/data/vim/patches/8.1.0310 @@ -0,0 +1,110 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0310 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0310 +Problem: File info message not always suppressed with 'F' in 'shortmess'. + (Asheq Imran) +Solution: Save and restore msg_silent. (Christian Brabandt, closes #3221) +Files: src/buffer.c, src/memline.c, src/testdir/test_options.vim + + +*** ../vim-8.1.0309/src/buffer.c 2018-08-21 15:12:10.831801698 +0200 +--- src/buffer.c 2018-08-21 18:36:25.882450971 +0200 +*************** +*** 1035,1041 **** +--- 1035,1048 ---- + buf = old_curbuf->br_buf; + if (buf != NULL) + { ++ int old_msg_silent = msg_silent; ++ ++ if (shortmess(SHM_FILEINFO)) ++ msg_silent = 1; // prevent fileinfo message + enter_buffer(buf); ++ // restore msg_silent, so that the command line will be shown ++ msg_silent = old_msg_silent; ++ + # ifdef FEAT_SYN_HL + if (old_tw != curbuf->b_p_tw) + check_colorcolumn(curwin); +*** ../vim-8.1.0309/src/memline.c 2018-08-20 22:53:00.210105086 +0200 +--- src/memline.c 2018-08-21 18:38:03.481885916 +0200 +*************** +*** 828,837 **** + */ + void + check_need_swap( +! int newfile) /* reading file into new buffer */ + { + if (curbuf->b_may_swap && (!curbuf->b_p_ro || !newfile)) + ml_open_file(curbuf); + } + + /* +--- 828,840 ---- + */ + void + check_need_swap( +! int newfile) // reading file into new buffer + { ++ int old_msg_silent = msg_silent; // might be reset by an E325 message ++ + if (curbuf->b_may_swap && (!curbuf->b_p_ro || !newfile)) + ml_open_file(curbuf); ++ msg_silent = old_msg_silent; + } + + /* +*** ../vim-8.1.0309/src/testdir/test_options.vim 2018-08-11 17:52:57.848311971 +0200 +--- src/testdir/test_options.vim 2018-08-21 18:34:20.687161831 +0200 +*************** +*** 414,416 **** +--- 414,437 ---- + set shortmess& + bwipe + endfunc ++ ++ func Test_shortmess_F2() ++ e file1 ++ e file2 ++ call assert_match('file1', execute('bn', '')) ++ call assert_match('file2', execute('bn', '')) ++ set shortmess+=F ++ call assert_true(empty(execute('bn', ''))) ++ call assert_true(empty(execute('bn', ''))) ++ set hidden ++ call assert_true(empty(execute('bn', ''))) ++ call assert_true(empty(execute('bn', ''))) ++ set nohidden ++ call assert_true(empty(execute('bn', ''))) ++ call assert_true(empty(execute('bn', ''))) ++ set shortmess& ++ call assert_match('file1', execute('bn', '')) ++ call assert_match('file2', execute('bn', '')) ++ bwipe ++ bwipe ++ endfunc +*** ../vim-8.1.0309/src/version.c 2018-08-21 17:49:50.993308900 +0200 +--- src/version.c 2018-08-21 18:42:36.348269248 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 310, + /**/ + +-- +"The future's already arrived - it's just not evenly distributed yet." + -- William Gibson + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0311 b/data/vim/patches/8.1.0311 new file mode 100644 index 000000000..3b6ece599 --- /dev/null +++ b/data/vim/patches/8.1.0311 @@ -0,0 +1,112 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0311 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0311 +Problem: Filtering entries in a quickfix list is not easy. +Solution: Add the cfilter plugin. (Yegappan Lakshmanan) +Files: runtime/pack/dist/opt/cfilter/plugin/cfilter.vim, + runtime/doc/quickfix.txt + + +*** ../vim-8.1.0310/runtime/pack/dist/opt/cfilter/plugin/cfilter.vim 1970-01-01 01:00:00.000000000 +0100 +--- runtime/pack/dist/opt/cfilter/plugin/cfilter.vim 2018-08-21 18:56:37.027118962 +0200 +*************** +*** 0 **** +--- 1,43 ---- ++ " cfilter.vim: Plugin to filter entries from a quickfix/location list ++ " Last Change: May 12, 2018 ++ " Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com) ++ " Version: 1.0 ++ " ++ " Commands to filter the quickfix list: ++ " :Cfilter[!] {pat} ++ " Create a new quickfix list from entries matching {pat} in the current ++ " quickfix list. Both the file name and the text of the entries are ++ " matched against {pat}. If ! is supplied, then entries not matching ++ " {pat} are used. ++ " :Lfilter[!] {pat} ++ " Same as :Cfilter but operates on the current location list. ++ " ++ if exists("loaded_cfilter") ++ finish ++ endif ++ let loaded_cfilter = 1 ++ ++ func s:Qf_filter(qf, pat, bang) ++ if a:qf ++ let Xgetlist = function('getqflist') ++ let Xsetlist = function('setqflist') ++ let cmd = ':Cfilter' . a:bang ++ else ++ let Xgetlist = function('getloclist', [0]) ++ let Xsetlist = function('setloclist', [0]) ++ let cmd = ':Lfilter' . a:bang ++ endif ++ ++ if a:bang == '!' ++ let cond = 'v:val.text !~# a:pat && bufname(v:val.bufnr) !~# a:pat' ++ else ++ let cond = 'v:val.text =~# a:pat || bufname(v:val.bufnr) =~# a:pat' ++ endif ++ ++ let items = filter(Xgetlist(), cond) ++ let title = cmd . ' ' . a:pat ++ call Xsetlist([], ' ', {'title' : title, 'items' : items}) ++ endfunc ++ ++ com! -nargs=+ -bang Cfilter call s:Qf_filter(1, , ) ++ com! -nargs=+ -bang Lfilter call s:Qf_filter(0, , ) +*** ../vim-8.1.0310/runtime/doc/quickfix.txt 2018-07-08 18:20:18.111521913 +0200 +--- runtime/doc/quickfix.txt 2018-08-21 19:02:00.097112470 +0200 +*************** +*** 1551,1556 **** +--- 1551,1572 ---- + recognized as a command separator. The backslash before each space is + required for the set command. + ++ *cfilter-plugin* ++ If you have too many matching messages, you can use the cfilter plugin to ++ reduce the number of entries. Load the plugin with: > ++ packadd cfilter ++ ++ Then you can use these command: > ++ :Cfilter[!] {pat} ++ :Lfilter[!] {pat} ++ ++ :Cfilter creates a new quickfix list from entries matching {pat} in the ++ current quickfix list. Both the file name and the text of the entries are ++ matched against {pat}. If ! is supplied, then entries not matching {pat} are ++ used. ++ ++ :Lfilter does the same as :Cfilter but operates on the current location list. ++ + ============================================================================= + 8. The directory stack *quickfix-directory-stack* + +*** ../vim-8.1.0310/src/version.c 2018-08-21 18:50:11.153501902 +0200 +--- src/version.c 2018-08-21 19:01:28.421309486 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 311, + /**/ + +-- +ARTHUR: Be quiet! I order you to shut up. +OLD WOMAN: Order, eh -- who does he think he is? +ARTHUR: I am your king! +OLD WOMAN: Well, I didn't vote for you. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0312 b/data/vim/patches/8.1.0312 new file mode 100644 index 000000000..9db92c0d5 --- /dev/null +++ b/data/vim/patches/8.1.0312 @@ -0,0 +1,226 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0312 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0312 +Problem: Wrong type for flags used in signal handlers. +Solution: Use sig_atomic_t. (Dominique Pelle, closes #3356) +Files: src/globals.h, src/os_unix.c, src/os_win32.h + + +*** ../vim-8.1.0311/src/globals.h 2018-08-14 13:38:12.744559267 +0200 +--- src/globals.h 2018-08-21 19:32:32.566883918 +0200 +*************** +*** 518,524 **** + * + * volatile because it is used in signal handler sig_sysmouse(). + */ +! EXTERN volatile int hold_gui_events INIT(= 0); + + /* + * When resizing the shell is postponed, remember the new size, and call +--- 518,524 ---- + * + * volatile because it is used in signal handler sig_sysmouse(). + */ +! EXTERN volatile sig_atomic_t hold_gui_events INIT(= 0); + + /* + * When resizing the shell is postponed, remember the new size, and call +*************** +*** 655,661 **** + /* TRUE when in or after free_all_mem() */ + #endif + /* volatile because it is used in signal handler deathtrap(). */ +! EXTERN volatile int full_screen INIT(= FALSE); + /* TRUE when doing full-screen output + * otherwise only writing some messages */ + +--- 655,661 ---- + /* TRUE when in or after free_all_mem() */ + #endif + /* volatile because it is used in signal handler deathtrap(). */ +! EXTERN volatile sig_atomic_t full_screen INIT(= FALSE); + /* TRUE when doing full-screen output + * otherwise only writing some messages */ + +*************** +*** 800,810 **** + EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */ + # ifdef SIGHASARG + /* volatile because it is used in signal handlers. */ +! EXTERN volatile int lc_signal; /* caught signal number, 0 when no was signal + caught; used for mch_libcall() */ + # endif + /* volatile because it is used in signal handler deathtrap(). */ +! EXTERN volatile int lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */ + #endif + + #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) +--- 800,810 ---- + EXTERN JMP_BUF lc_jump_env; /* argument to SETJMP() */ + # ifdef SIGHASARG + /* volatile because it is used in signal handlers. */ +! EXTERN volatile sig_atomic_t lc_signal; /* caught signal number, 0 when no was signal + caught; used for mch_libcall() */ + # endif + /* volatile because it is used in signal handler deathtrap(). */ +! EXTERN volatile sig_atomic_t lc_active INIT(= FALSE); /* TRUE when lc_jump_env is valid. */ + #endif + + #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) +*************** +*** 1037,1043 **** + EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */ + + /* volatile because it is used in signal handler catch_sigint(). */ +! EXTERN volatile int got_int INIT(= FALSE); /* set to TRUE when interrupt + signal occurred */ + #ifdef USE_TERM_CONSOLE + EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */ +--- 1037,1043 ---- + EXTERN int read_cmd_fd INIT(= 0); /* fd to read commands from */ + + /* volatile because it is used in signal handler catch_sigint(). */ +! EXTERN volatile sig_atomic_t got_int INIT(= FALSE); /* set to TRUE when interrupt + signal occurred */ + #ifdef USE_TERM_CONSOLE + EXTERN int term_console INIT(= FALSE); /* set to TRUE when console used */ +*** ../vim-8.1.0311/src/os_unix.c 2018-08-21 13:09:06.250115910 +0200 +--- src/os_unix.c 2018-08-21 19:32:32.570883895 +0200 +*************** +*** 161,167 **** + static int get_x11_icon(int); + + static char_u *oldtitle = NULL; +! static volatile int oldtitle_outdated = FALSE; + static int did_set_title = FALSE; + static char_u *oldicon = NULL; + static int did_set_icon = FALSE; +--- 161,167 ---- + static int get_x11_icon(int); + + static char_u *oldtitle = NULL; +! static volatile sig_atomic_t oldtitle_outdated = FALSE; + static int did_set_title = FALSE; + static char_u *oldicon = NULL; + static int did_set_icon = FALSE; +*************** +*** 205,211 **** + # define SET_SIG_ALARM + static RETSIGTYPE sig_alarm SIGPROTOARG; + /* volatile because it is used in signal handler sig_alarm(). */ +! static volatile int sig_alarm_called; + #endif + static RETSIGTYPE deathtrap SIGPROTOARG; + +--- 205,211 ---- + # define SET_SIG_ALARM + static RETSIGTYPE sig_alarm SIGPROTOARG; + /* volatile because it is used in signal handler sig_alarm(). */ +! static volatile sig_atomic_t sig_alarm_called; + #endif + static RETSIGTYPE deathtrap SIGPROTOARG; + +*************** +*** 231,243 **** + #endif + + /* volatile because it is used in signal handler sig_winch(). */ +! static volatile int do_resize = FALSE; + static char_u *extra_shell_arg = NULL; + static int show_shell_mess = TRUE; + /* volatile because it is used in signal handler deathtrap(). */ +! static volatile int deadly_signal = 0; /* The signal we caught */ + /* volatile because it is used in signal handler deathtrap(). */ +! static volatile int in_mch_delay = FALSE; /* sleeping in mch_delay() */ + + #if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM) + static int dont_check_job_ended = 0; +--- 231,243 ---- + #endif + + /* volatile because it is used in signal handler sig_winch(). */ +! static volatile sig_atomic_t do_resize = FALSE; + static char_u *extra_shell_arg = NULL; + static int show_shell_mess = TRUE; + /* volatile because it is used in signal handler deathtrap(). */ +! static volatile sig_atomic_t deadly_signal = 0; /* The signal we caught */ + /* volatile because it is used in signal handler deathtrap(). */ +! static volatile sig_atomic_t in_mch_delay = FALSE; /* sleeping in mch_delay() */ + + #if defined(FEAT_JOB_CHANNEL) && !defined(USE_SYSTEM) + static int dont_check_job_ended = 0; +*************** +*** 1247,1253 **** + + #if defined(SIGCONT) + static RETSIGTYPE sigcont_handler SIGPROTOARG; +! static volatile int in_mch_suspend = FALSE; + + /* + * With multi-threading, suspending might not work immediately. Catch the +--- 1247,1253 ---- + + #if defined(SIGCONT) + static RETSIGTYPE sigcont_handler SIGPROTOARG; +! static volatile sig_atomic_t in_mch_suspend = FALSE; + + /* + * With multi-threading, suspending might not work immediately. Catch the +*************** +*** 1260,1266 **** + * + * volatile because it is used in signal handler sigcont_handler(). + */ +! static volatile int sigcont_received; + static RETSIGTYPE sigcont_handler SIGPROTOARG; + + /* +--- 1260,1266 ---- + * + * volatile because it is used in signal handler sigcont_handler(). + */ +! static volatile sig_atomic_t sigcont_received; + static RETSIGTYPE sigcont_handler SIGPROTOARG; + + /* +*** ../vim-8.1.0311/src/os_win32.h 2017-02-01 13:08:19.000000000 +0100 +--- src/os_win32.h 2018-08-21 19:32:32.570883895 +0200 +*************** +*** 89,94 **** +--- 89,95 ---- + + #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */ + ++ #include + #include + #include + #include +*** ../vim-8.1.0311/src/version.c 2018-08-21 19:22:00.366591999 +0200 +--- src/version.c 2018-08-21 19:33:01.798710954 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 312, + /**/ + +-- +OLD WOMAN: Well, how did you become king, then? +ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite, + held Excalibur aloft from the bosom of the water to signify by Divine + Providence ... that I, Arthur, was to carry Excalibur ... That is + why I am your king! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0313 b/data/vim/patches/8.1.0313 new file mode 100644 index 000000000..e3f170127 --- /dev/null +++ b/data/vim/patches/8.1.0313 @@ -0,0 +1,232 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0313 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0313 +Problem: Information about a swap file is unavailable. +Solution: Add swapinfo(). (Enzo Ferber) +Files: runtime/doc/eval.txt, src/evalfunc.c, src/memline.c, + src/proto/memline.pro, src/testdir/test_swap.vim + + +*** ../vim-8.1.0312/runtime/doc/eval.txt 2018-08-21 16:56:28.363325301 +0200 +--- runtime/doc/eval.txt 2018-08-21 20:12:15.882157860 +0200 +*************** +*** 2409,2414 **** +--- 2416,2422 ---- + specific match in ":s" or substitute() + substitute({expr}, {pat}, {sub}, {flags}) + String all {pat} in {expr} replaced with {sub} ++ swapinfo({fname}) Dict information about swap file {fname} + synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} + synIDattr({synID}, {what} [, {mode}]) + String attribute {what} of syntax ID {synID} +*************** +*** 7999,8004 **** +--- 8009,8030 ---- + |submatch()| returns. Example: > + :echo substitute(s, '%\(\x\x\)', {m -> '0x' . m[1]}, 'g') + ++ swapinfo({fname}) swapinfo() ++ The result is a dictionary, which holds information about the ++ swapfile {fname}. The available fields are: ++ version VIM version ++ user user name ++ host host name ++ fname original file name ++ pid PID of the VIM process that created the swap ++ file ++ mtime last modification time in seconds ++ inode Optional: INODE number of the file ++ In case of failure an "error" item is added with the reason: ++ Cannot open file: file not found or in accessible ++ Cannot read file: cannot read first block ++ magic number mismatch: info in first block is invalid ++ + synID({lnum}, {col}, {trans}) *synID()* + The result is a Number, which is the syntax ID at the position + {lnum} and {col} in the current window. +*** ../vim-8.1.0312/src/evalfunc.c 2018-08-21 16:56:28.367325278 +0200 +--- src/evalfunc.c 2018-08-21 20:26:36.876842294 +0200 +*************** +*** 398,403 **** +--- 398,404 ---- + static void f_strwidth(typval_T *argvars, typval_T *rettv); + static void f_submatch(typval_T *argvars, typval_T *rettv); + static void f_substitute(typval_T *argvars, typval_T *rettv); ++ static void f_swapinfo(typval_T *argvars, typval_T *rettv); + static void f_synID(typval_T *argvars, typval_T *rettv); + static void f_synIDattr(typval_T *argvars, typval_T *rettv); + static void f_synIDtrans(typval_T *argvars, typval_T *rettv); +*************** +*** 859,864 **** +--- 860,866 ---- + {"strwidth", 1, 1, f_strwidth}, + {"submatch", 1, 2, f_submatch}, + {"substitute", 4, 4, f_substitute}, ++ {"swapinfo", 1, 1, f_swapinfo}, + {"synID", 3, 3, f_synID}, + {"synIDattr", 2, 3, f_synIDattr}, + {"synIDtrans", 1, 1, f_synIDtrans}, +*************** +*** 12314,12319 **** +--- 12316,12331 ---- + } + + /* ++ * "swapinfo(swap_filename)" function ++ */ ++ static void ++ f_swapinfo(typval_T *argvars, typval_T *rettv) ++ { ++ if (rettv_dict_alloc(rettv) == OK) ++ get_b0_dict(get_tv_string(argvars), rettv->vval.v_dict); ++ } ++ ++ /* + * "synID(lnum, col, trans)" function + */ + static void +*** ../vim-8.1.0312/src/memline.c 2018-08-21 18:50:11.153501902 +0200 +--- src/memline.c 2018-08-21 20:18:30.815871851 +0200 +*************** +*** 2042,2047 **** +--- 2042,2090 ---- + #endif + + /* ++ * Return information found in swapfile "fname" in dictionary "d". ++ * This is used by the swapinfo() function. ++ */ ++ void ++ get_b0_dict(char_u *fname, dict_T *d) ++ { ++ int fd; ++ struct block0 b0; ++ ++ if ((fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0)) >= 0) ++ { ++ if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) ++ { ++ if (b0_magic_wrong(&b0)) ++ { ++ dict_add_string(d, "error", ++ vim_strsave((char_u *)"magic number mismatch")); ++ } ++ else ++ { ++ /* we have swap information */ ++ dict_add_string(d, "version", vim_strsave(b0.b0_version)); ++ dict_add_string(d, "user", vim_strsave(b0.b0_uname)); ++ dict_add_string(d, "host", vim_strsave(b0.b0_hname)); ++ dict_add_string(d, "fname", vim_strsave(b0.b0_fname)); ++ ++ dict_add_number(d, "pid", char_to_long(b0.b0_pid)); ++ dict_add_number(d, "mtime", char_to_long(b0.b0_mtime)); ++ #ifdef CHECK_INODE ++ dict_add_number(d, "inode", char_to_long(b0.b0_ino)); ++ #endif ++ } ++ } ++ else ++ dict_add_string(d, "error", ++ vim_strsave((char_u *)"Cannot read file")); ++ close(fd); ++ } ++ else ++ dict_add_string(d, "error", vim_strsave((char_u *)"Cannot open file")); ++ } ++ ++ /* + * Give information about an existing swap file. + * Returns timestamp (0 when unknown). + */ +*** ../vim-8.1.0312/src/proto/memline.pro 2018-08-07 21:39:09.251060096 +0200 +--- src/proto/memline.pro 2018-08-21 20:00:58.994558112 +0200 +*************** +*** 11,16 **** +--- 11,18 ---- + void ml_timestamp(buf_T *buf); + void ml_recover(void); + int recover_names(char_u *fname, int list, int nr, char_u **fname_out); ++ char_u *make_percent_swname(char_u *dir, char_u *name); ++ void get_b0_dict(char_u *fname, dict_T *d); + void ml_sync_all(int check_file, int check_char); + void ml_preserve(buf_T *buf, int message); + char_u *ml_get(linenr_T lnum); +*************** +*** 34,38 **** + void ml_decrypt_data(memfile_T *mfp, char_u *data, off_T offset, unsigned size); + long ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp); + void goto_byte(long cnt); +- char_u *make_percent_swname (char_u *dir, char_u *name); + /* vim: set ft=c : */ +--- 36,39 ---- +*** ../vim-8.1.0312/src/testdir/test_swap.vim 2018-05-12 15:57:33.000000000 +0200 +--- src/testdir/test_swap.vim 2018-08-21 20:18:23.395917660 +0200 +*************** +*** 97,99 **** +--- 97,133 ---- + set directory& + call delete('Xswapdir', 'rf') + endfunc ++ ++ func Test_swapinfo() ++ new Xswapinfo ++ call setline(1, ['one', 'two', 'three']) ++ w ++ let fname = trim(execute('swapname')) ++ call assert_match('Xswapinfo', fname) ++ let info = swapinfo(fname) ++ call assert_match('8\.', info.version) ++ call assert_match('\w', info.user) ++ call assert_equal(hostname(), info.host) ++ call assert_match('Xswapinfo', info.fname) ++ call assert_equal(getpid(), info.pid) ++ call assert_match('^\d*$', info.mtime) ++ if has_key(info, 'inode') ++ call assert_match('\d', info.inode) ++ endif ++ bwipe! ++ call delete(fname) ++ call delete('Xswapinfo') ++ ++ let info = swapinfo('doesnotexist') ++ call assert_equal('Cannot open file', info.error) ++ ++ call writefile(['burp'], 'Xnotaswapfile') ++ let info = swapinfo('Xnotaswapfile') ++ call assert_equal('Cannot read file', info.error) ++ call delete('Xnotaswapfile') ++ ++ call writefile([repeat('x', 10000)], 'Xnotaswapfile') ++ let info = swapinfo('Xnotaswapfile') ++ call assert_equal('magic number mismatch', info.error) ++ call delete('Xnotaswapfile') ++ endfunc +*** ../vim-8.1.0312/src/version.c 2018-08-21 19:47:44.724053803 +0200 +--- src/version.c 2018-08-21 19:54:18.937247096 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 313, + /**/ + +-- +DENNIS: Look, strange women lying on their backs in ponds handing out + swords ... that's no basis for a system of government. Supreme + executive power derives from a mandate from the masses, not from some + farcical aquatic ceremony. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0314 b/data/vim/patches/8.1.0314 new file mode 100644 index 000000000..69dc90054 --- /dev/null +++ b/data/vim/patches/8.1.0314 @@ -0,0 +1,158 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0314 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0314 (after 8.1.0313) +Problem: Build failure without the +eval feature. (Brenton Horne) +Solution: Add #ifdef. Also add the "dirty" item. +Files: src/memline.c, runtime/doc/eval.txt, src/testdir/test_swap.vim + + +*** ../vim-8.1.0313/src/memline.c 2018-08-21 20:28:49.888006612 +0200 +--- src/memline.c 2018-08-21 21:07:08.927388911 +0200 +*************** +*** 2041,2046 **** +--- 2041,2047 ---- + static int process_still_running; + #endif + ++ #if defined(FEAT_EVAL) || defined(PROTO) + /* + * Return information found in swapfile "fname" in dictionary "d". + * This is used by the swapinfo() function. +*************** +*** 2055,2065 **** + { + if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) + { +! if (b0_magic_wrong(&b0)) +! { + dict_add_string(d, "error", +! vim_strsave((char_u *)"magic number mismatch")); +! } + else + { + /* we have swap information */ +--- 2056,2067 ---- + { + if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) + { +! if (ml_check_b0_id(&b0) == FAIL) + dict_add_string(d, "error", +! vim_strsave((char_u *)"Not a swap file")); +! else if (b0_magic_wrong(&b0)) +! dict_add_string(d, "error", +! vim_strsave((char_u *)"Magic number mismatch")); + else + { + /* we have swap information */ +*************** +*** 2070,2078 **** + + dict_add_number(d, "pid", char_to_long(b0.b0_pid)); + dict_add_number(d, "mtime", char_to_long(b0.b0_mtime)); +! #ifdef CHECK_INODE + dict_add_number(d, "inode", char_to_long(b0.b0_ino)); +! #endif + } + } + else +--- 2072,2081 ---- + + dict_add_number(d, "pid", char_to_long(b0.b0_pid)); + dict_add_number(d, "mtime", char_to_long(b0.b0_mtime)); +! dict_add_number(d, "dirty", b0.b0_dirty ? 1 : 0); +! # ifdef CHECK_INODE + dict_add_number(d, "inode", char_to_long(b0.b0_ino)); +! # endif + } + } + else +*************** +*** 2083,2088 **** +--- 2086,2092 ---- + else + dict_add_string(d, "error", vim_strsave((char_u *)"Cannot open file")); + } ++ #endif + + /* + * Give information about an existing swap file. +*** ../vim-8.1.0313/runtime/doc/eval.txt 2018-08-21 20:28:49.884006638 +0200 +--- runtime/doc/eval.txt 2018-08-21 21:06:33.431590332 +0200 +*************** +*** 8011,8020 **** + file + mtime last modification time in seconds + inode Optional: INODE number of the file + In case of failure an "error" item is added with the reason: + Cannot open file: file not found or in accessible + Cannot read file: cannot read first block +! magic number mismatch: info in first block is invalid + + synID({lnum}, {col}, {trans}) *synID()* + The result is a Number, which is the syntax ID at the position +--- 8020,8031 ---- + file + mtime last modification time in seconds + inode Optional: INODE number of the file ++ dirty 1 if file was modified, 0 if not + In case of failure an "error" item is added with the reason: + Cannot open file: file not found or in accessible + Cannot read file: cannot read first block +! Not a swap file: does not contain correct block ID +! Magic number mismatch: Info in first block is invalid + + synID({lnum}, {col}, {trans}) *synID()* + The result is a Number, which is the syntax ID at the position +*** ../vim-8.1.0313/src/testdir/test_swap.vim 2018-08-21 20:28:49.892006588 +0200 +--- src/testdir/test_swap.vim 2018-08-21 21:07:26.571288544 +0200 +*************** +*** 109,114 **** +--- 109,115 ---- + call assert_match('\w', info.user) + call assert_equal(hostname(), info.host) + call assert_match('Xswapinfo', info.fname) ++ call assert_match(0, info.dirty) + call assert_equal(getpid(), info.pid) + call assert_match('^\d*$', info.mtime) + if has_key(info, 'inode') +*************** +*** 128,133 **** + + call writefile([repeat('x', 10000)], 'Xnotaswapfile') + let info = swapinfo('Xnotaswapfile') +! call assert_equal('magic number mismatch', info.error) + call delete('Xnotaswapfile') + endfunc +--- 129,134 ---- + + call writefile([repeat('x', 10000)], 'Xnotaswapfile') + let info = swapinfo('Xnotaswapfile') +! call assert_equal('Not a swap file', info.error) + call delete('Xnotaswapfile') + endfunc +*** ../vim-8.1.0313/src/version.c 2018-08-21 20:28:49.892006588 +0200 +--- src/version.c 2018-08-21 21:08:05.951063970 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 314, + /**/ + +-- +DENNIS: You can't expect to wield supreme executive power just 'cause some + watery tart threw a sword at you! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0315 b/data/vim/patches/8.1.0315 new file mode 100644 index 000000000..cea600e2b --- /dev/null +++ b/data/vim/patches/8.1.0315 @@ -0,0 +1,223 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0315 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0315 +Problem: Helpgrep with language doesn't work properly. (Takuya Fujiwara) +Solution: Check for the language earlier. (Hirohito Higashi) +Files: src/quickfix.c, src/testdir/test_quickfix.vim + + +*** ../vim-8.1.0314/src/quickfix.c 2018-08-18 19:59:48.418322409 +0200 +--- src/quickfix.c 2018-08-21 21:47:55.412902244 +0200 +*************** +*** 5385,5391 **** + if (qf_restore_list(qi, save_qfid) == FAIL) + goto theend; + +! /* Jump to first match. */ + if (!qf_list_empty(qi, qi->qf_curlist)) + { + if ((flags & VGR_NOJUMP) == 0) +--- 5385,5391 ---- + if (qf_restore_list(qi, save_qfid) == FAIL) + goto theend; + +! // Jump to first match. + if (!qf_list_empty(qi, qi->qf_curlist)) + { + if ((flags & VGR_NOJUMP) == 0) +*************** +*** 6844,6859 **** + /* + * Search for a pattern in all the help files in the 'runtimepath' + * and add the matches to a quickfix list. +! * 'arg' is the language specifier. If supplied, then only matches in the + * specified language are found. + */ + static void +! hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *arg) + { + char_u *p; +- #ifdef FEAT_MULTI_LANG +- char_u *lang; +- #endif + + #ifdef FEAT_MBYTE + vimconv_T vc; +--- 6844,6856 ---- + /* + * Search for a pattern in all the help files in the 'runtimepath' + * and add the matches to a quickfix list. +! * 'lang' is the language specifier. If supplied, then only matches in the + * specified language are found. + */ + static void +! hgr_search_in_rtp(qf_info_T *qi, regmatch_T *p_regmatch, char_u *lang) + { + char_u *p; + + #ifdef FEAT_MBYTE + vimconv_T vc; +*************** +*** 6865,6874 **** + convert_setup(&vc, (char_u *)"utf-8", p_enc); + #endif + +- #ifdef FEAT_MULTI_LANG +- /* Check for a specified language */ +- lang = check_help_lang(arg); +- #endif + + /* Go through all the directories in 'runtimepath' */ + p = p_rtp; +--- 6862,6867 ---- +*************** +*** 6903,6908 **** +--- 6896,6902 ---- + qf_info_T *qi = &ql_info; + int new_qi = FALSE; + char_u *au_name = NULL; ++ char_u *lang = NULL; + + switch (eap->cmdidx) + { +*************** +*** 6919,6925 **** + #endif + } + +! /* Make 'cpoptions' empty, the 'l' flag should not be used here. */ + save_cpo = p_cpo; + p_cpo = empty_option; + +--- 6913,6919 ---- + #endif + } + +! // Make 'cpoptions' empty, the 'l' flag should not be used here. + save_cpo = p_cpo; + p_cpo = empty_option; + +*************** +*** 6930,6943 **** + return; + } + + regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING); + regmatch.rm_ic = FALSE; + if (regmatch.regprog != NULL) + { +! /* create a new quickfix list */ + qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep)); + +! hgr_search_in_rtp(qi, ®match, eap->arg); + + vim_regfree(regmatch.regprog); + +--- 6924,6941 ---- + return; + } + ++ #ifdef FEAT_MULTI_LANG ++ // Check for a specified language ++ lang = check_help_lang(eap->arg); ++ #endif + regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING); + regmatch.rm_ic = FALSE; + if (regmatch.regprog != NULL) + { +! // create a new quickfix list + qf_new_list(qi, qf_cmdtitle(*eap->cmdlinep)); + +! hgr_search_in_rtp(qi, ®match, lang); + + vim_regfree(regmatch.regprog); + +*************** +*** 6950,6956 **** + if (p_cpo == empty_option) + p_cpo = save_cpo; + else +! /* Darn, some plugin changed the value. */ + free_string_option(save_cpo); + + qf_list_changed(qi, qi->qf_curlist); +--- 6948,6954 ---- + if (p_cpo == empty_option) + p_cpo = save_cpo; + else +! // Darn, some plugin changed the value. + free_string_option(save_cpo); + + qf_list_changed(qi, qi->qf_curlist); +*************** +*** 6973,6980 **** + + if (eap->cmdidx == CMD_lhelpgrep) + { +! /* If the help window is not opened or if it already points to the +! * correct location list, then free the new location list. */ + if (!bt_help(curwin->w_buffer) || curwin->w_llist == qi) + { + if (new_qi) +--- 6971,6978 ---- + + if (eap->cmdidx == CMD_lhelpgrep) + { +! // If the help window is not opened or if it already points to the +! // correct location list, then free the new location list. + if (!bt_help(curwin->w_buffer) || curwin->w_llist == qi) + { + if (new_qi) +*** ../vim-8.1.0314/src/testdir/test_quickfix.vim 2018-08-15 22:29:46.977604162 +0200 +--- src/testdir/test_quickfix.vim 2018-08-21 21:44:49.058013219 +0200 +*************** +*** 3091,3096 **** +--- 3091,3110 ---- + call Xqftick_tests('l') + endfunc + ++ " Test helpgrep with lang specifier ++ func Xtest_helpgrep_with_lang_specifier(cchar) ++ call s:setup_commands(a:cchar) ++ Xhelpgrep Vim@en ++ call assert_equal('help', &filetype) ++ call assert_notequal(0, g:Xgetlist({'nr' : '$'}).nr) ++ new | only ++ endfunc ++ ++ func Test_helpgrep_with_lang_specifier() ++ call Xtest_helpgrep_with_lang_specifier('c') ++ call Xtest_helpgrep_with_lang_specifier('l') ++ endfunc ++ + " The following test used to crash Vim. + " Open the location list window and close the regular window associated with + " the location list. When the garbage collection runs now, it incorrectly +*** ../vim-8.1.0314/src/version.c 2018-08-21 21:09:02.598739663 +0200 +--- src/version.c 2018-08-21 21:50:24.460013769 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 315, + /**/ + +-- +BLACK KNIGHT: None shall pass. +ARTHUR: I have no quarrel with you, brave Sir knight, but I must cross + this bridge. +BLACK KNIGHT: Then you shall die. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0316 b/data/vim/patches/8.1.0316 new file mode 100644 index 000000000..67c07b78f --- /dev/null +++ b/data/vim/patches/8.1.0316 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0316 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0316 +Problem: swapinfo() test fails on Travis. +Solution: Handle a long host name. (Ozaki Kiichi, closes #3361) + Also make the version check flexible. (James McCoy) +Files: src/testdir/test_swap.vim + + +*** ../vim-8.1.0315/src/testdir/test_swap.vim 2018-08-21 21:09:02.598739663 +0200 +--- src/testdir/test_swap.vim 2018-08-22 11:25:49.275645594 +0200 +*************** +*** 105,113 **** + let fname = trim(execute('swapname')) + call assert_match('Xswapinfo', fname) + let info = swapinfo(fname) +! call assert_match('8\.', info.version) + call assert_match('\w', info.user) +! call assert_equal(hostname(), info.host) + call assert_match('Xswapinfo', info.fname) + call assert_match(0, info.dirty) + call assert_equal(getpid(), info.pid) +--- 105,117 ---- + let fname = trim(execute('swapname')) + call assert_match('Xswapinfo', fname) + let info = swapinfo(fname) +! +! let ver = printf('VIM %d.%d', v:version / 100, v:version % 100) +! call assert_equal(ver, info.version) +! + call assert_match('\w', info.user) +! " host name is truncated to 39 bytes in the swap file +! call assert_equal(hostname()[:38], info.host) + call assert_match('Xswapinfo', info.fname) + call assert_match(0, info.dirty) + call assert_equal(getpid(), info.pid) +*** ../vim-8.1.0315/src/version.c 2018-08-21 21:58:09.528674683 +0200 +--- src/version.c 2018-08-22 11:23:44.476323657 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 316, + /**/ + +-- +ARTHUR: What are you going to do. bleed on me? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0317 b/data/vim/patches/8.1.0317 new file mode 100644 index 000000000..ecbe65c5f --- /dev/null +++ b/data/vim/patches/8.1.0317 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0317 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0317 +Problem: Cscope test fails when using shadow directory. +Solution: Resolve symlink in Vim. (James McCoy, closes #3364) +Files: src/testdir/test_cscope.vim + + +*** ../vim-8.1.0316/src/testdir/test_cscope.vim 2018-07-15 17:36:28.825442123 +0200 +--- src/testdir/test_cscope.vim 2018-08-22 20:04:27.869744792 +0200 +*************** +*** 259,265 **** + " Test ":cs add {dir}" (add the {dir}/cscope.out database) + func Test_cscope_add_dir() + call mkdir('Xcscopedir', 'p') +! call system('cscope -bk -fXcscopedir/cscope.out ../memfile_test.c') + cs add Xcscopedir + let a = execute('cscope show') + let lines = split(a, "\n", 1) +--- 259,270 ---- + " Test ":cs add {dir}" (add the {dir}/cscope.out database) + func Test_cscope_add_dir() + call mkdir('Xcscopedir', 'p') +! +! " Cscope doesn't handle symlinks, so this needs to be resolved in case a +! " shadow directory is being used. +! let memfile = resolve('../memfile_test.c') +! call system('cscope -bk -fXcscopedir/cscope.out ' . memfile) +! + cs add Xcscopedir + let a = execute('cscope show') + let lines = split(a, "\n", 1) +*** ../vim-8.1.0316/src/version.c 2018-08-22 11:27:57.118946770 +0200 +--- src/version.c 2018-08-22 20:05:19.677430359 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 317, + /**/ + +-- +Eye have a spelling checker, it came with my PC; +It plainly marks four my revue mistakes I cannot sea. +I've run this poem threw it, I'm sure your please to no, +It's letter perfect in it's weigh, my checker tolled me sew! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0318 b/data/vim/patches/8.1.0318 new file mode 100644 index 000000000..10ecffb35 --- /dev/null +++ b/data/vim/patches/8.1.0318 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0318 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0318 +Problem: The getftype() test may fail for char devices if the file + disappeared in between the listing and the getftype() call. +Solution: Ignore empty result. (Ozaki Kiichi, closes #3360) +Files: src/testdir/test_stat.vim + + +*** ../vim-8.1.0317/src/testdir/test_stat.vim 2018-08-09 22:08:53.017560100 +0200 +--- src/testdir/test_stat.vim 2018-08-22 20:14:37.597732518 +0200 +*************** +*** 141,157 **** + endif + + for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null') +! call assert_equal('cdev', getftype(cdevfile)) + endfor + + for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null') +! call assert_equal('bdev', getftype(bdevfile)) + endfor + + " The /run/ directory typically contains socket files. + " If it does not, test won't fail but will not test socket files. + for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null') +! call assert_equal('socket', getftype(socketfile)) + endfor + + " TODO: file type 'other' is not tested. How can we test it? +--- 141,169 ---- + endif + + for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null') +! let type = getftype(cdevfile) +! " ignore empty result, can happen if the file disappeared +! if type != '' +! call assert_equal('cdev', type) +! endif + endfor + + for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null') +! let type = getftype(bdevfile) +! " ignore empty result, can happen if the file disappeared +! if type != '' +! call assert_equal('bdev', type) +! endif + endfor + + " The /run/ directory typically contains socket files. + " If it does not, test won't fail but will not test socket files. + for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null') +! let type = getftype(socketfile) +! " ignore empty result, can happen if the file disappeared +! if type != '' +! call assert_equal('socket', type) +! endif + endfor + + " TODO: file type 'other' is not tested. How can we test it? +*** ../vim-8.1.0317/src/version.c 2018-08-22 20:06:22.829022787 +0200 +--- src/version.c 2018-08-22 20:11:52.166808526 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 318, + /**/ + +-- +BLACK KNIGHT: The Black Knight always triumphs. Have at you! + ARTHUR takes his last leg off. The BLACK KNIGHT's body lands upright. +BLACK KNIGHT: All right, we'll call it a draw. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0319 b/data/vim/patches/8.1.0319 new file mode 100644 index 000000000..15d08e909 --- /dev/null +++ b/data/vim/patches/8.1.0319 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0319 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0319 +Problem: bzero() function prototype doesn't work for Android. +Solution: Add an #ifdef. (Elliott Hughes, closes #3365) +Files: src/osdef1.h.in + + +*** ../vim-8.1.0318/src/osdef1.h.in 2016-12-01 17:08:35.000000000 +0100 +--- src/osdef1.h.in 2018-08-22 21:54:20.888804176 +0200 +*************** +*** 65,72 **** + # endif + # endif + #endif +! /* used inside of FD_ZERO macro: */ + extern void bzero(void *, size_t); + #ifdef HAVE_SETSID + extern pid_t setsid(void); + #endif +--- 65,74 ---- + # endif + # endif + #endif +! #ifndef __BIONIC__ // Android's libc #defines bzero to memset. +! // used inside of FD_ZERO macro + extern void bzero(void *, size_t); ++ #endif + #ifdef HAVE_SETSID + extern pid_t setsid(void); + #endif +*** ../vim-8.1.0318/src/version.c 2018-08-22 20:16:11.985125882 +0200 +--- src/version.c 2018-08-22 21:56:23.076075393 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 319, + /**/ + +-- +Westheimer's Discovery: + A couple of months in the laboratory can + frequently save a couple of hours in the library. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0320 b/data/vim/patches/8.1.0320 new file mode 100644 index 000000000..dc3181114 --- /dev/null +++ b/data/vim/patches/8.1.0320 @@ -0,0 +1,141 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0320 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0320 +Problem: Too much 'incsearch' highlight for pattern matching everything. +Solution: Add the skiplen to the command and remove the line range. + (Christian Brabandt) Check for empty pattern earlier. +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_substitute_09.dump + + +*** ../vim-8.1.0319/src/ex_getln.c 2018-08-18 21:23:00.787474060 +0200 +--- src/ex_getln.c 2018-08-22 22:35:09.131882839 +0200 +*************** +*** 285,290 **** +--- 285,291 ---- + char_u *dummy; + exarg_T ea; + pos_T save_cursor; ++ int use_last_pat; + + *skiplen = 0; + *patlen = ccline.cmdlen; +*************** +*** 361,370 **** + delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++; + end = skip_regexp(p, delim, p_magic, NULL); + +! if (end == p && *end != delim) + return FALSE; +- // found a non-empty pattern or // + + *skiplen = (int)(p - ccline.cmdbuff); + *patlen = (int)(end - p); + +--- 362,386 ---- + delim = (delim_optional && vim_isIDc(*p)) ? ' ' : *p++; + end = skip_regexp(p, delim, p_magic, NULL); + +! use_last_pat = end == p && *end == delim; +! +! if (end == p && !use_last_pat) + return FALSE; + ++ // Don't do 'hlsearch' highlighting if the pattern matches everything. ++ if (!use_last_pat) ++ { ++ char c = *end; ++ int empty; ++ ++ *end = NUL; ++ empty = empty_pattern(p); ++ *end = c; ++ if (empty) ++ return FALSE; ++ } ++ ++ // found a non-empty pattern or // + *skiplen = (int)(p - ccline.cmdbuff); + *patlen = (int)(end - p); + +*************** +*** 556,572 **** + else + end_pos = curwin->w_cursor; // shutup gcc 4 + +- // Disable 'hlsearch' highlighting if the pattern matches everything. +- // Avoids a flash when typing "foo\|". +- if (!use_last_pat) +- { +- next_char = ccline.cmdbuff[skiplen + patlen]; +- ccline.cmdbuff[skiplen + patlen] = NUL; +- if (empty_pattern(ccline.cmdbuff)) +- set_no_hlsearch(TRUE); +- ccline.cmdbuff[skiplen + patlen] = next_char; +- } +- + validate_cursor(); + // May redraw the status line to show the cursor position. + if (p_ru && curwin->w_status_height > 0) +--- 572,577 ---- +*** ../vim-8.1.0319/src/testdir/test_search.vim 2018-08-18 21:04:57.743864534 +0200 +--- src/testdir/test_search.vim 2018-08-22 22:41:42.689971619 +0200 +*************** +*** 913,918 **** +--- 913,926 ---- + call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {}) + call term_sendkeys(buf, "\") + ++ " Only \v handled as empty pattern, does not move cursor ++ call term_sendkeys(buf, '3G4G') ++ call term_sendkeys(buf, ":nohlsearch\") ++ call term_sendkeys(buf, ':6,7s/\v') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {}) ++ call term_sendkeys(buf, "\") ++ + call StopVimInTerminal(buf) + call delete('Xis_subst_script') + endfunc +*** ../vim-8.1.0319/src/testdir/dumps/Test_incsearch_substitute_09.dump 2018-08-22 23:02:14.943209354 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_09.dump 2018-08-22 22:41:52.269923211 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |3| @64 ++ |f+8&&|o@1| |4| @64 ++ |f+0&&|o@1| |5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |f|o@1| |9| @64 ++ |f|o@1| |1|0| @63 ++ |:|6|,|7|s|/|\|v> @61 +*** ../vim-8.1.0319/src/version.c 2018-08-22 21:56:53.399893884 +0200 +--- src/version.c 2018-08-22 23:02:25.679145625 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 320, + /**/ + +-- + A village. Sound of chanting of Latin canon, punctuated by short, sharp + cracks. It comes nearer. We see it is a line of MONKS ala SEVENTH SEAL + flagellation scene, chanting and banging themselves on the foreheads with + wooden boards. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0321 b/data/vim/patches/8.1.0321 new file mode 100644 index 000000000..daf15822d --- /dev/null +++ b/data/vim/patches/8.1.0321 @@ -0,0 +1,147 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0321 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0321 (after 8.1.0320) +Problem: 'incsearch' regression: /\v highlights everything. +Solution: Put back the empty_pattern() check. +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_search_01.dump, + src/testdir/dumps/Test_incsearch_search_02.dump + + +*** ../vim-8.1.0320/src/ex_getln.c 2018-08-22 23:03:19.486827548 +0200 +--- src/ex_getln.c 2018-08-23 20:51:58.597337138 +0200 +*************** +*** 572,577 **** +--- 572,588 ---- + else + end_pos = curwin->w_cursor; // shutup gcc 4 + ++ // Disable 'hlsearch' highlighting if the pattern matches everything. ++ // Avoids a flash when typing "foo\|". ++ if (!use_last_pat) ++ { ++ next_char = ccline.cmdbuff[skiplen + patlen]; ++ ccline.cmdbuff[skiplen + patlen] = NUL; ++ if (empty_pattern(ccline.cmdbuff)) ++ set_no_hlsearch(TRUE); ++ ccline.cmdbuff[skiplen + patlen] = next_char; ++ } ++ + validate_cursor(); + // May redraw the status line to show the cursor position. + if (p_ru && curwin->w_status_height > 0) +*** ../vim-8.1.0320/src/testdir/test_search.vim 2018-08-22 23:03:19.486827548 +0200 +--- src/testdir/test_search.vim 2018-08-23 20:51:10.061621201 +0200 +*************** +*** 813,818 **** +--- 813,853 ---- + call delete('Xscript') + endfunc + ++ func Test_incsearch_search_dump() ++ if !exists('+incsearch') ++ return ++ endif ++ if !CanRunVimInTerminal() ++ return ++ endif ++ call writefile([ ++ \ 'set incsearch hlsearch scrolloff=0', ++ \ 'for n in range(1, 8)', ++ \ ' call setline(n, "foo " . n)', ++ \ 'endfor', ++ \ '3', ++ \ ], 'Xis_search_script') ++ let buf = RunVimInTerminal('-S Xis_search_script', {'rows': 9, 'cols': 70}) ++ " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by ++ " the 'ambiwidth' check. ++ sleep 100m ++ ++ " Need to send one key at a time to force a redraw. ++ call term_sendkeys(buf, '/fo') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_search_01', {}) ++ call term_sendkeys(buf, "\") ++ sleep 100m ++ ++ call term_sendkeys(buf, '/\v') ++ sleep 100m ++ call VerifyScreenDump(buf, 'Test_incsearch_search_02', {}) ++ call term_sendkeys(buf, "\") ++ ++ call StopVimInTerminal(buf) ++ call delete('Xis_search_script') ++ endfunc ++ + func Test_incsearch_substitute() + if !exists('+incsearch') + return +*************** +*** 926,932 **** + endfunc + + " Similar to Test_incsearch_substitute_dump() for :sort +! func Test_incsearch_ssort_dump() + if !exists('+incsearch') + return + endif +--- 961,967 ---- + endfunc + + " Similar to Test_incsearch_substitute_dump() for :sort +! func Test_incsearch_sort_dump() + if !exists('+incsearch') + return + endif +*** ../vim-8.1.0320/src/testdir/dumps/Test_incsearch_search_01.dump 2018-08-23 20:53:38.528751838 +0200 +--- src/testdir/dumps/Test_incsearch_search_01.dump 2018-08-23 20:41:15.889079877 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffff4012|o|o+0&#ffffff0| |1| @64 ++ |f+0&#ffff4012|o|o+0&#ffffff0| |2| @64 ++ |f+0&#ffff4012|o|o+0&#ffffff0| |3| @64 ++ |f+1&&|o|o+0&&| |4| @64 ++ |f+0&#ffff4012|o|o+0&#ffffff0| |5| @64 ++ |f+0&#ffff4012|o|o+0&#ffffff0| |6| @64 ++ |f+0&#ffff4012|o|o+0&#ffffff0| |7| @64 ++ |f+0&#ffff4012|o|o+0&#ffffff0| |8| @64 ++ |/|f|o> @66 +*** ../vim-8.1.0320/src/testdir/dumps/Test_incsearch_search_02.dump 2018-08-23 20:53:38.536751791 +0200 +--- src/testdir/dumps/Test_incsearch_search_02.dump 2018-08-23 20:52:11.605260981 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffffff0|o@1| |1| @64 ++ |f|o@1| |2| @64 ++ |f|o+1&&|o+0&&| |3| @64 ++ |f|o@1| |4| @64 ++ |f|o@1| |5| @64 ++ |f|o@1| |6| @64 ++ |f|o@1| |7| @64 ++ |f|o@1| |8| @64 ++ |/|\|v> @66 +*** ../vim-8.1.0320/src/version.c 2018-08-22 23:03:19.486827548 +0200 +--- src/version.c 2018-08-23 20:53:21.256853038 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 321, + /**/ + +-- +This computer is so slow, it takes forever to execute and endless loop! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0322 b/data/vim/patches/8.1.0322 new file mode 100644 index 000000000..3bed5bf49 --- /dev/null +++ b/data/vim/patches/8.1.0322 @@ -0,0 +1,153 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0322 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0322 +Problem: Test_copy_winopt() does not restore 'hidden'. +Solution: Restore the option, fix indent. (Ozaki Kiichi, closes #3367) +Files: src/testdir/test_options.vim + + +*** ../vim-8.1.0321/src/testdir/test_options.vim 2018-08-21 18:50:11.153501902 +0200 +--- src/testdir/test_options.vim 2018-08-23 22:17:40.635048688 +0200 +*************** +*** 350,404 **** + endfunc + + func Test_copy_winopt() +! set hidden + +! " Test copy option from current buffer in window +! split +! enew +! setlocal numberwidth=5 +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(5,&numberwidth) +! bw! +! call assert_equal(4,&numberwidth) +! +! " Test copy value from window that used to be display the buffer +! split +! enew +! setlocal numberwidth=6 +! bnext +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(6,&numberwidth) +! bw! +! +! " Test that if buffer is current, don't use the stale cached value +! " from the last time the buffer was displayed. +! split +! enew +! setlocal numberwidth=7 +! bnext +! bnext +! setlocal numberwidth=8 +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(8,&numberwidth) +! bw! +! +! " Test value is not copied if window already has seen the buffer +! enew +! split +! setlocal numberwidth=9 +! bnext +! setlocal numberwidth=10 +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(4,&numberwidth) +! bw! + endfunc + + func Test_shortmess_F() +--- 350,406 ---- + endfunc + + func Test_copy_winopt() +! set hidden + +! " Test copy option from current buffer in window +! split +! enew +! setlocal numberwidth=5 +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(5,&numberwidth) +! bw! +! call assert_equal(4,&numberwidth) +! +! " Test copy value from window that used to be display the buffer +! split +! enew +! setlocal numberwidth=6 +! bnext +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(6,&numberwidth) +! bw! +! +! " Test that if buffer is current, don't use the stale cached value +! " from the last time the buffer was displayed. +! split +! enew +! setlocal numberwidth=7 +! bnext +! bnext +! setlocal numberwidth=8 +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(8,&numberwidth) +! bw! +! +! " Test value is not copied if window already has seen the buffer +! enew +! split +! setlocal numberwidth=9 +! bnext +! setlocal numberwidth=10 +! wincmd w +! call assert_equal(4,&numberwidth) +! bnext +! call assert_equal(4,&numberwidth) +! bw! +! +! set hidden& + endfunc + + func Test_shortmess_F() +*** ../vim-8.1.0321/src/version.c 2018-08-23 20:55:23.328137497 +0200 +--- src/version.c 2018-08-23 22:19:27.038296744 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 322, + /**/ + +-- +BEDEVERE: Why do you think she is a witch? +SECOND VILLAGER: She turned me into a newt. +BEDEVERE: A newt? +SECOND VILLAGER: (After looking at himself for some time) I got better. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0323 b/data/vim/patches/8.1.0323 new file mode 100644 index 000000000..fb1e777b2 --- /dev/null +++ b/data/vim/patches/8.1.0323 @@ -0,0 +1,76 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0323 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0323 +Problem: Reverse order of VTP calls only needed the first time. +Solution: Add a flag to remember the state. (Nobuhiro Takasaki, closes #3366) +Files: src/os_win32.c + + +*** ../vim-8.1.0322/src/os_win32.c 2018-08-19 14:38:38.979859032 +0200 +--- src/os_win32.c 2018-08-23 22:35:59.155914101 +0200 +*************** +*** 4046,4051 **** +--- 4046,4052 ---- + CONSOLE_SCREEN_BUFFER_INFO csbi; /* hold current console buffer info */ + SMALL_RECT srWindowRect; /* hold the new console size */ + COORD coordScreen; ++ static int resized = FALSE; + + #ifdef MCH_WRITE_DUMP + if (fdDump) +*************** +*** 4091,4098 **** + coordScreen.X = xSize; + coordScreen.Y = ySize; + +! // In the new console call API in reverse order +! if (!vtp_working) + { + ResizeWindow(hConsole, srWindowRect); + ResizeConBuf(hConsole, coordScreen); +--- 4092,4099 ---- + coordScreen.X = xSize; + coordScreen.Y = ySize; + +! // In the new console call API, only the first time in reverse order +! if (!vtp_working || resized) + { + ResizeWindow(hConsole, srWindowRect); + ResizeConBuf(hConsole, coordScreen); +*************** +*** 4101,4106 **** +--- 4102,4108 ---- + { + ResizeConBuf(hConsole, coordScreen); + ResizeWindow(hConsole, srWindowRect); ++ resized = TRUE; + } + } + +*** ../vim-8.1.0322/src/version.c 2018-08-23 22:20:31.449852029 +0200 +--- src/version.c 2018-08-23 22:37:35.715321239 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 323, + /**/ + +-- +ALL: A witch! A witch! +WITCH: It's a fair cop. +ALL: Burn her! Burn her! Let's make her into a ladder. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0324 b/data/vim/patches/8.1.0324 new file mode 100644 index 000000000..2d704bba1 --- /dev/null +++ b/data/vim/patches/8.1.0324 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0324 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0324 +Problem: Off-by-one error in cmdidx check. (Coverity) +Solution: Use ">=" instead of ">". +Files: src/ex_docmd.c + + +*** ../vim-8.1.0323/src/ex_docmd.c 2018-08-21 17:49:50.993308900 +0200 +--- src/ex_docmd.c 2018-08-23 22:43:28.505170168 +0200 +*************** +*** 12554,12560 **** + int + is_loclist_cmd(int cmdidx) + { +! if (cmdidx < 0 || cmdidx > CMD_SIZE) + return FALSE; + return cmdnames[cmdidx].cmd_name[0] == 'l'; + } +--- 12554,12560 ---- + int + is_loclist_cmd(int cmdidx) + { +! if (cmdidx < 0 || cmdidx >= CMD_SIZE) + return FALSE; + return cmdnames[cmdidx].cmd_name[0] == 'l'; + } +*** ../vim-8.1.0323/src/version.c 2018-08-23 22:38:27.915001621 +0200 +--- src/version.c 2018-08-23 22:51:09.762302937 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 324, + /**/ + +-- +Never under any circumstances take a sleeping pill +and a laxative on the same night. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0325 b/data/vim/patches/8.1.0325 new file mode 100644 index 000000000..a11a55338 --- /dev/null +++ b/data/vim/patches/8.1.0325 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0325 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0325 +Problem: Strings in swap file may not be NUL terminated. (Coverity) +Solution: Limit the length of the used string. +Files: src/memline.c + + +*** ../vim-8.1.0324/src/memline.c 2018-08-21 21:09:02.598739663 +0200 +--- src/memline.c 2018-08-23 22:59:10.070904878 +0200 +*************** +*** 2065,2074 **** + else + { + /* we have swap information */ +! dict_add_string(d, "version", vim_strsave(b0.b0_version)); +! dict_add_string(d, "user", vim_strsave(b0.b0_uname)); +! dict_add_string(d, "host", vim_strsave(b0.b0_hname)); +! dict_add_string(d, "fname", vim_strsave(b0.b0_fname)); + + dict_add_number(d, "pid", char_to_long(b0.b0_pid)); + dict_add_number(d, "mtime", char_to_long(b0.b0_mtime)); +--- 2065,2077 ---- + else + { + /* we have swap information */ +! dict_add_string(d, "version", vim_strnsave(b0.b0_version, 10)); +! dict_add_string(d, "user", +! vim_strnsave(b0.b0_uname, B0_UNAME_SIZE)); +! dict_add_string(d, "host", +! vim_strnsave(b0.b0_hname, B0_HNAME_SIZE)); +! dict_add_string(d, "fname", +! vim_strnsave(b0.b0_fname, B0_FNAME_SIZE_ORG)); + + dict_add_number(d, "pid", char_to_long(b0.b0_pid)); + dict_add_number(d, "mtime", char_to_long(b0.b0_mtime)); +*** ../vim-8.1.0324/src/version.c 2018-08-23 22:51:30.882144095 +0200 +--- src/version.c 2018-08-23 23:00:19.290441550 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 325, + /**/ + +-- +If you had to identify, in one word, the reason why the +human race has not achieved, and never will achieve, its +full potential, that word would be "meetings." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0326 b/data/vim/patches/8.1.0326 new file mode 100644 index 000000000..667bfaeaf --- /dev/null +++ b/data/vim/patches/8.1.0326 @@ -0,0 +1,101 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0326 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0326 +Problem: Screen dump does not consider NUL and space equal. +Solution: Use temp variables instead of character from cell. +Files: src/terminal.c, src/testdir/dumps/Test_syntax_c_01.dump + + +*** ../vim-8.1.0325/src/terminal.c 2018-08-07 16:33:15.255728441 +0200 +--- src/terminal.c 2018-08-24 21:12:24.363925057 +0200 +*************** +*** 3939,3947 **** + c = (c == NUL) ? ' ' : c; + pc = (pc == NUL) ? ' ' : pc; + } +! if (cell.chars[i] != prev_cell.chars[i]) + same_chars = FALSE; +! if (cell.chars[i] == NUL || prev_cell.chars[i] == NUL) + break; + } + same_attr = vtermAttr2hl(cell.attrs) +--- 3939,3947 ---- + c = (c == NUL) ? ' ' : c; + pc = (pc == NUL) ? ' ' : pc; + } +! if (c != pc) + same_chars = FALSE; +! if (c == NUL || pc == NUL) + break; + } + same_attr = vtermAttr2hl(cell.attrs) +*** ../vim-8.1.0325/src/testdir/dumps/Test_syntax_c_01.dump 2018-02-25 21:33:46.000000000 +0100 +--- src/testdir/dumps/Test_syntax_c_01.dump 2018-08-24 21:19:49.004842497 +0200 +*************** +*** 1,20 **** + >/+0#0000e05#ffffff0|*| |c|o|m@1|e|n|t| |l|i|n|e| |a|t| |t|h|e| |t|o|p| |*|/| +0#0000000&@45 +! | @1|i+0#00e0003&|n|t| +0#0000000&@69 + |m|a|i|n|(|i+0#00e0003&|n|t| +0#0000000&|a|r|g|c|,| |c+0#00e0003&|h|a|r| +0#0000000&|*@1|a|r|g|v|)|/+0#0000e05&@1| |a|n|o|t|h|e|r| |c|o|m@1|e|n|t| +0#0000000&@29 + |{| @73 + |#+0#e000e06&|i|f| |0| +0#0000000&@69 + | +0#0000e05&@2|i|n|t| @2|n|o|t|_|u|s|e|d|;| +0#0000000&@56 + |#+0#e000e06&|e|l|s|e| +0#0000000&@69 +! | @2|i+0#00e0003&|n|t| +0#0000000&@2|u|s|e|d|;| @60 + |#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +! | @2|p|r|i|n|t|f|(|"+0#e000002&|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| |C| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27 +! | @2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&|x|0|f@1|;+0#0000000&| @58 + |}| @73 +! | @2|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&@60 + |m|y|F|u|n|c|t|i|o|n|(|c+0#00e0003&|o|n|s|t| +0#0000000&|d+0#00e0003&|o|u|b|l|e| +0#0000000&|c|o|u|n|t|,| |s+0#00e0003&|t|r|u|c|t| +0#0000000&|n|o|t|h|i|n|g|,| |l+0#00e0003&|o|n|g| +0#0000000&|t|h|e|r|e|)| |{| @14 +! | @1|/+0#0000e05&@1| |1+0#e000002&|2|3|:+0#0000e05&| |n|o|t|h|i|n|g| |t|o| |r|e|a|d| |h|e|r|e| +0#0000000&@44 +! | @1|f+0#af5f00255&|o|r| +0#0000000&|(|i+0#00e0003&|n|t| +0#0000000&|i| |=| |0+0#e000002&|;+0#0000000&| |i| |<| |c|o|u|n|t|;| |+@1|i|)| |{| @39 +! | @3|b+0#af5f00255&|r|e|a|k|;+0#0000000&| @64 +! | @1|}| @71 + |}| @73 + |"|X|t|e|s|t|.|c|"| |1|9|L|,| |3|6|4|C| @37|1|,|1| @10|A|l@1| +--- 1,20 ---- + >/+0#0000e05#ffffff0|*| |c|o|m@1|e|n|t| |l|i|n|e| |a|t| |t|h|e| |t|o|p| |*|/| +0#0000000&@45 +! @2|i+0#00e0003&|n|t| +0#0000000&@69 + |m|a|i|n|(|i+0#00e0003&|n|t| +0#0000000&|a|r|g|c|,| |c+0#00e0003&|h|a|r| +0#0000000&|*@1|a|r|g|v|)|/+0#0000e05&@1| |a|n|o|t|h|e|r| |c|o|m@1|e|n|t| +0#0000000&@29 + |{| @73 + |#+0#e000e06&|i|f| |0| +0#0000000&@69 + | +0#0000e05&@2|i|n|t| @2|n|o|t|_|u|s|e|d|;| +0#0000000&@56 + |#+0#e000e06&|e|l|s|e| +0#0000000&@69 +! @3|i+0#00e0003&|n|t| +0#0000000&@2|u|s|e|d|;| @60 + |#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +! @3|p|r|i|n|t|f|(|"+0#e000002&|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| |C| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27 +! @3|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&|x|0|f@1|;+0#0000000&| @58 + |}| @73 +! @3|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&@60 + |m|y|F|u|n|c|t|i|o|n|(|c+0#00e0003&|o|n|s|t| +0#0000000&|d+0#00e0003&|o|u|b|l|e| +0#0000000&|c|o|u|n|t|,| |s+0#00e0003&|t|r|u|c|t| +0#0000000&|n|o|t|h|i|n|g|,| |l+0#00e0003&|o|n|g| +0#0000000&|t|h|e|r|e|)| |{| @14 +! @2|/+0#0000e05&@1| |1+0#e000002&|2|3|:+0#0000e05&| |n|o|t|h|i|n|g| |t|o| |r|e|a|d| |h|e|r|e| +0#0000000&@44 +! @2|f+0#af5f00255&|o|r| +0#0000000&|(|i+0#00e0003&|n|t| +0#0000000&|i| |=| |0+0#e000002&|;+0#0000000&| |i| |<| |c|o|u|n|t|;| |+@1|i|)| |{| @39 +! @4|b+0#af5f00255&|r|e|a|k|;+0#0000000&| @64 +! @2|}| @71 + |}| @73 + |"|X|t|e|s|t|.|c|"| |1|9|L|,| |3|6|4|C| @37|1|,|1| @10|A|l@1| +*** ../vim-8.1.0325/src/version.c 2018-08-23 23:01:22.898019607 +0200 +--- src/version.c 2018-08-24 21:24:36.840693934 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 326, + /**/ + +-- +Your company is doomed if your primary product is overhead transparencies. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0327 b/data/vim/patches/8.1.0327 new file mode 100644 index 000000000..37cdd65d7 --- /dev/null +++ b/data/vim/patches/8.1.0327 @@ -0,0 +1,136 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0327 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0327 +Problem: The "g CTRL-G" command isn't tested much. +Solution: Add more tests. (Dominique Pelle, closes #3369) +Files: src/testdir/test_normal.vim + + +*** ../vim-8.1.0326/src/testdir/test_normal.vim 2018-05-17 15:43:28.000000000 +0200 +--- src/testdir/test_normal.vim 2018-08-24 21:56:40.272464401 +0200 +*************** +*** 1806,1816 **** + call assert_equal(15, col('.')) + call assert_equal('l', getreg(0)) + +- " Test for g Ctrl-G +- set ff=unix +- let a=execute(":norm! g\") +- call assert_match('Col 15 of 43; Line 2 of 2; Word 2 of 2; Byte 16 of 45', a) +- + " Test for gI + norm! gIfoo + call assert_equal(['', 'fooabcdefghijk lmno0123456789AMNOPQRSTUVWXYZ'], getline(1,'$')) +--- 1806,1811 ---- +*************** +*** 1829,1834 **** +--- 1824,1904 ---- + bw! + endfunc + ++ func! Test_g_ctrl_g() ++ new ++ ++ let a = execute(":norm! g\") ++ call assert_equal("\n--No lines in buffer--", a) ++ ++ call setline(1, ['first line', 'second line']) ++ ++ " Test g CTRL-g with dos, mac and unix file type. ++ norm! gojll ++ set ff=dos ++ let a = execute(":norm! g\") ++ call assert_equal("\nCol 3 of 11; Line 2 of 2; Word 3 of 4; Byte 15 of 25", a) ++ ++ set ff=mac ++ let a = execute(":norm! g\") ++ call assert_equal("\nCol 3 of 11; Line 2 of 2; Word 3 of 4; Byte 14 of 23", a) ++ ++ set ff=unix ++ let a = execute(":norm! g\") ++ call assert_equal("\nCol 3 of 11; Line 2 of 2; Word 3 of 4; Byte 14 of 23", a) ++ ++ " Test g CTRL-g in visual mode (v) ++ let a = execute(":norm! gojllvlg\") ++ call assert_equal("\nSelected 1 of 2 Lines; 1 of 4 Words; 2 of 23 Bytes", a) ++ ++ " Test g CTRL-g in visual mode (CTRL-V) with end col > start col ++ let a = execute(":norm! \gojll\kllg\") ++ call assert_equal("\nSelected 3 Cols; 2 of 2 Lines; 2 of 4 Words; 6 of 23 Bytes", a) ++ ++ " Test g_CTRL-g in visual mode (CTRL-V) with end col < start col ++ let a = execute(":norm! \goll\jhhg\") ++ call assert_equal("\nSelected 3 Cols; 2 of 2 Lines; 2 of 4 Words; 6 of 23 Bytes", a) ++ ++ " Test g CTRL-g in visual mode (CTRL-V) with end_vcol being MAXCOL ++ let a = execute(":norm! \gojll\k$g\") ++ call assert_equal("\nSelected 2 of 2 Lines; 4 of 4 Words; 17 of 23 Bytes", a) ++ ++ " There should be one byte less with noeol ++ set bin noeol ++ let a = execute(":norm! \gog\") ++ 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! \gojlg\") ++ 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! \gojvlg\") ++ 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! \goll\jlg\") ++ 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! \gojlg\") ++ 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\") ++ 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\") ++ call assert_equal("\nCol 4-3 of 9-6; Line 2 of 2; Word 2 of 2; Char 11 of 13; Byte 16 of 20(+4 for BOM)", a) ++ ++ set fenc& bomb& ++ endif ++ ++ set ff& ++ bwipe! ++ endfunc ++ + fun! Test_normal34_g_cmd3() + if !has("multi_byte") + return +*** ../vim-8.1.0326/src/version.c 2018-08-24 21:30:24.818557489 +0200 +--- src/version.c 2018-08-24 21:57:46.239693505 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 327, + /**/ + +-- +For large projects, Team Leaders use sophisticated project management software +to keep track of who's doing what. The software collects the lies and guesses +of the project team and organizes them in to instantly outdated charts that +are too boring to look at closely. This is called "planning". + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0328 b/data/vim/patches/8.1.0328 new file mode 100644 index 000000000..c5e957ffc --- /dev/null +++ b/data/vim/patches/8.1.0328 @@ -0,0 +1,167 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0328 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0328 +Problem: inputlist() doesn't work with a timer. (Dominique Pelle) +Solution: Don't redraw when cmdline_row is zero. (Hirohito Higashi, + closes #3239) +Files: src/misc1.c, src/screen.c + + +*** ../vim-8.1.0327/src/misc1.c 2018-08-21 15:12:10.839801647 +0200 +--- src/misc1.c 2018-08-26 21:18:04.834809910 +0200 +*************** +*** 3747,3764 **** + else + MSG_PUTS(_("Type number and (empty cancels): ")); + +! /* Set the state such that text can be selected/copied/pasted and we still +! * get mouse events. */ + save_cmdline_row = cmdline_row; + cmdline_row = 0; + save_State = State; +! State = ASKMORE; /* prevents a screen update when using a timer */ + #ifdef FEAT_MOUSE +! /* May show different mouse shape. */ + setmouse(); + #endif + +- + i = get_number(TRUE, mouse_used); + if (KeyTyped) + { +--- 3747,3764 ---- + else + MSG_PUTS(_("Type number and (empty cancels): ")); + +! // Set the state such that text can be selected/copied/pasted and we still +! // get mouse events. redraw_after_callback() will not redraw if cmdline_row +! // is zero. + save_cmdline_row = cmdline_row; + cmdline_row = 0; + save_State = State; +! State = CMDLINE; + #ifdef FEAT_MOUSE +! // May show different mouse shape. + setmouse(); + #endif + + i = get_number(TRUE, mouse_used); + if (KeyTyped) + { +*************** +*** 3773,3779 **** + cmdline_row = save_cmdline_row; + State = save_State; + #ifdef FEAT_MOUSE +! /* May need to restore mouse shape. */ + setmouse(); + #endif + +--- 3773,3779 ---- + cmdline_row = save_cmdline_row; + State = save_State; + #ifdef FEAT_MOUSE +! // May need to restore mouse shape. + setmouse(); + #endif + +*** ../vim-8.1.0327/src/screen.c 2018-08-11 16:40:39.068311966 +0200 +--- src/screen.c 2018-08-26 21:19:58.221890668 +0200 +*************** +*** 447,478 **** + ++redrawing_for_callback; + + if (State == HITRETURN || State == ASKMORE) +! ; /* do nothing */ + else if (State & CMDLINE) + { +! /* Redrawing only works when the screen didn't scroll. Don't clear +! * wildmenu entries. */ +! if (msg_scrolled == 0 + #ifdef FEAT_WILDMENU +! && wild_menu_showing == 0 + #endif +! && call_update_screen) +! update_screen(0); +! /* Redraw in the same position, so that the user can continue +! * editing the command. */ +! redrawcmdline_ex(FALSE); + } + else if (State & (NORMAL | INSERT | TERMINAL)) + { +! /* keep the command line if possible */ + update_screen(VALID_NO_UPDATE); + setcursor(); + } + cursor_on(); + #ifdef FEAT_GUI + if (gui.in_use && !gui_mch_is_blink_off()) +! /* Don't update the cursor when it is blinking and off to avoid +! * flicker. */ + out_flush_cursor(FALSE, FALSE); + else + #endif +--- 447,483 ---- + ++redrawing_for_callback; + + if (State == HITRETURN || State == ASKMORE) +! ; // do nothing + else if (State & CMDLINE) + { +! // Don't redraw when in prompt_for_number(). +! if (cmdline_row > 0) +! { +! // Redrawing only works when the screen didn't scroll. Don't clear +! // wildmenu entries. +! if (msg_scrolled == 0 + #ifdef FEAT_WILDMENU +! && wild_menu_showing == 0 + #endif +! && call_update_screen) +! update_screen(0); +! +! // Redraw in the same position, so that the user can continue +! // editing the command. +! redrawcmdline_ex(FALSE); +! } + } + else if (State & (NORMAL | INSERT | TERMINAL)) + { +! // keep the command line if possible + update_screen(VALID_NO_UPDATE); + setcursor(); + } + cursor_on(); + #ifdef FEAT_GUI + if (gui.in_use && !gui_mch_is_blink_off()) +! // Don't update the cursor when it is blinking and off to avoid +! // flicker. + out_flush_cursor(FALSE, FALSE); + else + #endif +*** ../vim-8.1.0327/src/version.c 2018-08-24 22:07:54.094796047 +0200 +--- src/version.c 2018-08-26 21:16:30.423572538 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 328, + /**/ + +-- +The budget process was invented by an alien race of sadistic beings who +resemble large cats. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0329 b/data/vim/patches/8.1.0329 new file mode 100644 index 000000000..6173c5701 --- /dev/null +++ b/data/vim/patches/8.1.0329 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0329 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0329 +Problem: Using inputlist() during startup results in garbage. (Dominique + Pelle) +Solution: Make sure the xterm tracing is stopped when disabling the mouse. +Files: src/os_unix.c + + +*** ../vim-8.1.0328/src/os_unix.c 2018-08-21 19:47:44.724053803 +0200 +--- src/os_unix.c 2018-08-27 23:22:31.668899230 +0200 +*************** +*** 3664,3669 **** +--- 3664,3676 ---- + # endif + int xterm_mouse_vers; + ++ # if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) ++ if (!on) ++ // Make sure not tracing mouse movements. Important when a button-down ++ // was received but no release yet. ++ stop_xterm_trace(); ++ # endif ++ + if (on == mouse_ison + # ifdef FEAT_BEVAL_TERM + && p_bevalterm == bevalterm_ison +*** ../vim-8.1.0328/src/version.c 2018-08-26 21:23:03.400383307 +0200 +--- src/version.c 2018-08-27 23:21:45.437306003 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 329, + /**/ + +-- +Engineers are always delighted to share wisdom, even in areas in which they +have no experience whatsoever. Their logic provides them with inherent +insight into any field of expertise. This can be a problem when dealing with +the illogical people who believe that knowledge can only be derived through +experience. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0330 b/data/vim/patches/8.1.0330 new file mode 100644 index 000000000..0c0b9ba2c --- /dev/null +++ b/data/vim/patches/8.1.0330 @@ -0,0 +1,219 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0330 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0330 +Problem: The qf_add_entries() function is too long. +Solution: Split in two parts. (Yegappan Lakshmanan) +Files: src/quickfix.c + + +*** ../vim-8.1.0329/src/quickfix.c 2018-08-21 21:58:09.524674714 +0200 +--- src/quickfix.c 2018-08-28 22:05:22.995585778 +0200 +*************** +*** 5997,6002 **** +--- 5997,6079 ---- + } + + /* ++ * Add a new quickfix entry to list at 'qf_idx' in the stack 'qi' from the ++ * items in the dict 'd'. ++ */ ++ static int ++ qf_add_entry_from_dict( ++ qf_info_T *qi, ++ int qf_idx, ++ dict_T *d, ++ int first_entry) ++ { ++ static int did_bufnr_emsg; ++ char_u *filename, *module, *pattern, *text, *type; ++ int bufnum, valid, status, col, vcol, nr; ++ long lnum; ++ ++ if (first_entry) ++ did_bufnr_emsg = FALSE; ++ ++ filename = get_dict_string(d, (char_u *)"filename", TRUE); ++ module = get_dict_string(d, (char_u *)"module", TRUE); ++ bufnum = (int)get_dict_number(d, (char_u *)"bufnr"); ++ lnum = (int)get_dict_number(d, (char_u *)"lnum"); ++ col = (int)get_dict_number(d, (char_u *)"col"); ++ vcol = (int)get_dict_number(d, (char_u *)"vcol"); ++ nr = (int)get_dict_number(d, (char_u *)"nr"); ++ type = get_dict_string(d, (char_u *)"type", TRUE); ++ pattern = get_dict_string(d, (char_u *)"pattern", TRUE); ++ text = get_dict_string(d, (char_u *)"text", TRUE); ++ if (text == NULL) ++ text = vim_strsave((char_u *)""); ++ ++ valid = TRUE; ++ if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL)) ++ valid = FALSE; ++ ++ // Mark entries with non-existing buffer number as not valid. Give the ++ // error message only once. ++ if (bufnum != 0 && (buflist_findnr(bufnum) == NULL)) ++ { ++ if (!did_bufnr_emsg) ++ { ++ did_bufnr_emsg = TRUE; ++ EMSGN(_("E92: Buffer %ld not found"), bufnum); ++ } ++ valid = FALSE; ++ bufnum = 0; ++ } ++ ++ // If the 'valid' field is present it overrules the detected value. ++ if ((dict_find(d, (char_u *)"valid", -1)) != NULL) ++ valid = (int)get_dict_number(d, (char_u *)"valid"); ++ ++ status = qf_add_entry(qi, ++ qf_idx, ++ NULL, // dir ++ filename, ++ module, ++ bufnum, ++ text, ++ lnum, ++ col, ++ vcol, // vis_col ++ pattern, // search pattern ++ nr, ++ type == NULL ? NUL : *type, ++ valid); ++ ++ vim_free(filename); ++ vim_free(module); ++ vim_free(pattern); ++ vim_free(text); ++ vim_free(type); ++ ++ return status; ++ } ++ ++ /* + * Add list of entries to quickfix/location list. Each list entry is + * a dictionary with item information. + */ +*************** +*** 6010,6024 **** + { + listitem_T *li; + dict_T *d; +- char_u *filename, *module, *pattern, *text, *type; +- int bufnum; +- long lnum; +- int col, nr; +- int vcol; + qfline_T *old_last = NULL; +- int valid, status; + int retval = OK; +- int did_bufnr_emsg = FALSE; + + if (action == ' ' || qf_idx == qi->qf_listcount) + { +--- 6087,6094 ---- +*************** +*** 6044,6109 **** + if (d == NULL) + continue; + +! filename = get_dict_string(d, (char_u *)"filename", TRUE); +! module = get_dict_string(d, (char_u *)"module", TRUE); +! bufnum = (int)get_dict_number(d, (char_u *)"bufnr"); +! lnum = (int)get_dict_number(d, (char_u *)"lnum"); +! col = (int)get_dict_number(d, (char_u *)"col"); +! vcol = (int)get_dict_number(d, (char_u *)"vcol"); +! nr = (int)get_dict_number(d, (char_u *)"nr"); +! type = get_dict_string(d, (char_u *)"type", TRUE); +! pattern = get_dict_string(d, (char_u *)"pattern", TRUE); +! text = get_dict_string(d, (char_u *)"text", TRUE); +! if (text == NULL) +! text = vim_strsave((char_u *)""); +! +! valid = TRUE; +! if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL)) +! valid = FALSE; +! +! /* Mark entries with non-existing buffer number as not valid. Give the +! * error message only once. */ +! if (bufnum != 0 && (buflist_findnr(bufnum) == NULL)) +! { +! if (!did_bufnr_emsg) +! { +! did_bufnr_emsg = TRUE; +! EMSGN(_("E92: Buffer %ld not found"), bufnum); +! } +! valid = FALSE; +! bufnum = 0; +! } +! +! /* If the 'valid' field is present it overrules the detected value. */ +! if ((dict_find(d, (char_u *)"valid", -1)) != NULL) +! valid = (int)get_dict_number(d, (char_u *)"valid"); +! +! status = qf_add_entry(qi, +! qf_idx, +! NULL, /* dir */ +! filename, +! module, +! bufnum, +! text, +! lnum, +! col, +! vcol, /* vis_col */ +! pattern, /* search pattern */ +! nr, +! type == NULL ? NUL : *type, +! valid); +! +! vim_free(filename); +! vim_free(module); +! vim_free(pattern); +! vim_free(text); +! vim_free(type); +! +! if (status == FAIL) +! { +! retval = FAIL; + break; +- } + } + + if (qi->qf_lists[qf_idx].qf_index == 0) +--- 6114,6122 ---- + if (d == NULL) + continue; + +! retval = qf_add_entry_from_dict(qi, qf_idx, d, li == list->lv_first); +! if (retval == FAIL) + break; + } + + if (qi->qf_lists[qf_idx].qf_index == 0) +*** ../vim-8.1.0329/src/version.c 2018-08-27 23:24:13.064009239 +0200 +--- src/version.c 2018-08-28 22:06:20.577141281 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 330, + /**/ + +-- +An alien life briefly visits earth. Just before departing it leaves a +message in the dust on the back of a white van. The world is shocked +and wants to know what it means. After months of studies the worlds +best linguistic scientists are able to decipher the message: "Wash me!". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0331 b/data/vim/patches/8.1.0331 new file mode 100644 index 000000000..ef2610ccb --- /dev/null +++ b/data/vim/patches/8.1.0331 @@ -0,0 +1,126 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0331 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0331 +Problem: Insufficient test coverage for :mkview and :loadview. +Solution: Add tests. (Dominique Pelle, closes #3385) +Files: src/testdir/test_mksession.vim + + +*** ../vim-8.1.0330/src/testdir/test_mksession.vim 2018-07-04 22:44:05.273544402 +0200 +--- src/testdir/test_mksession.vim 2018-08-28 22:17:22.286410573 +0200 +*************** +*** 311,315 **** +--- 311,396 ---- + + endif " has('terminal') + ++ " Test :mkview with a file argument. ++ func Test_mkview_file() ++ " Create a view with line number and a fold. ++ help :mkview ++ set number ++ norm! V}zf ++ let pos = getpos('.') ++ let linefoldclosed1 = foldclosed('.') ++ mkview! Xview ++ set nonumber ++ norm! zrj ++ " We can close the help window, as mkview with a file name should ++ " generate a command to edit the file. ++ helpclose ++ ++ source Xview ++ call assert_equal(1, &number) ++ call assert_match('\*:mkview\*$', getline('.')) ++ call assert_equal(pos, getpos('.')) ++ call assert_equal(linefoldclosed1, foldclosed('.')) ++ ++ " Creating a view again with the same file name should fail (file ++ " already exists). But with a !, the previous view should be ++ " overwritten without error. ++ help :loadview ++ call assert_fails('mkview Xview', 'E189:') ++ call assert_match('\*:loadview\*$', getline('.')) ++ mkview! Xview ++ call assert_match('\*:loadview\*$', getline('.')) ++ ++ call delete('Xview') ++ bwipe ++ endfunc ++ ++ " Test :mkview and :loadview with a custom 'viewdir'. ++ func Test_mkview_loadview_with_viewdir() ++ set viewdir=Xviewdir ++ ++ help :mkview ++ set number ++ norm! V}zf ++ let pos = getpos('.') ++ let linefoldclosed1 = foldclosed('.') ++ mkview 1 ++ set nonumber ++ norm! zrj ++ ++ loadview 1 ++ ++ " The directory Xviewdir/ should have been created and the view ++ " should be stored in that directory. ++ call assert_equal('Xviewdir/' . ++ \ substitute( ++ \ substitute( ++ \ expand('%:p'), '/', '=+', 'g'), ':', '=-', 'g') . '=1.vim', ++ \ glob('Xviewdir/*')) ++ call assert_equal(1, &number) ++ call assert_match('\*:mkview\*$', getline('.')) ++ call assert_equal(pos, getpos('.')) ++ call assert_equal(linefoldclosed1, foldclosed('.')) ++ ++ call delete('Xviewdir', 'rf') ++ set viewdir& ++ helpclose ++ endfunc ++ ++ func Test_mkview_no_file_name() ++ new ++ " :mkview or :mkview {nr} should fail in a unnamed buffer. ++ call assert_fails('mkview', 'E32:') ++ call assert_fails('mkview 1', 'E32:') ++ ++ " :mkview {file} should succeed in a unnamed buffer. ++ mkview Xview ++ help ++ source Xview ++ call assert_equal('', bufname('%')) ++ ++ call delete('Xview') ++ %bwipe ++ endfunc + + " vim: shiftwidth=2 sts=2 expandtab +*** ../vim-8.1.0330/src/version.c 2018-08-28 22:07:38.574120540 +0200 +--- src/version.c 2018-08-28 22:18:55.432595716 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 331, + /**/ + +-- +For society, it's probably a good thing that engineers value function over +appearance. For example, you wouldn't want engineers to build nuclear power +plants that only _look_ like they would keep all the radiation inside. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0332 b/data/vim/patches/8.1.0332 new file mode 100644 index 000000000..d3aced072 --- /dev/null +++ b/data/vim/patches/8.1.0332 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0332 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0332 +Problem: Get Gdk-Critical error on first balloon show. +Solution: Get screen geometry using the draw area widget. (Davit Samvelyan, + closes #3386) +Files: src/gui_beval.c + + +*** ../vim-8.1.0331/src/gui_beval.c 2018-08-19 22:58:39.775568167 +0200 +--- src/gui_beval.c 2018-08-28 23:08:03.890441876 +0200 +*************** +*** 958,964 **** + screen = gtk_widget_get_screen(beval->target); + gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen); + # endif +! gui_gtk_get_screen_geom_of_win(beval->balloonShell, + &screen_x, &screen_y, &screen_w, &screen_h); + # if !GTK_CHECK_VERSION(3,0,0) + gtk_widget_ensure_style(beval->balloonShell); +--- 958,964 ---- + screen = gtk_widget_get_screen(beval->target); + gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen); + # endif +! gui_gtk_get_screen_geom_of_win(beval->target, + &screen_x, &screen_y, &screen_w, &screen_h); + # if !GTK_CHECK_VERSION(3,0,0) + gtk_widget_ensure_style(beval->balloonShell); +*** ../vim-8.1.0331/src/version.c 2018-08-28 22:19:27.739993071 +0200 +--- src/version.c 2018-08-28 23:07:48.122609624 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 332, + /**/ + +-- +Engineers understand that their appearance only bothers other people and +therefore it is not worth optimizing. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0333 b/data/vim/patches/8.1.0333 new file mode 100644 index 000000000..f4179ce59 --- /dev/null +++ b/data/vim/patches/8.1.0333 @@ -0,0 +1,133 @@ +diff --git src/ex_docmd.c src/ex_docmd.c +index d4cf6a2c0..c8a1c3f23 100644 +--- src/ex_docmd.c ++++ src/ex_docmd.c +@@ -11706,6 +11706,18 @@ ses_do_win(win_T *wp) + return TRUE; + } + ++ static int ++put_view_curpos(FILE *fd, win_T *wp, char *spaces) ++{ ++ int r; ++ ++ if (wp->w_curswant == MAXCOL) ++ r = fprintf(fd, "%snormal! $", spaces); ++ else ++ r = fprintf(fd, "%snormal! 0%d|", spaces, wp->w_virtcol + 1); ++ return r < 0 || put_eol(fd) == FAIL ? FALSE : OK; ++} ++ + /* + * Write commands to "fd" to restore the view of a window. + * Caller must make sure 'scrolloff' is zero. +@@ -11897,17 +11909,12 @@ put_view( + (long)wp->w_virtcol + 1) < 0 + || put_eol(fd) == FAIL + || put_line(fd, "else") == FAIL +- || fprintf(fd, " normal! 0%d|", wp->w_virtcol + 1) < 0 +- || put_eol(fd) == FAIL ++ || put_view_curpos(fd, wp, " ") == FAIL + || put_line(fd, "endif") == FAIL) + return FAIL; + } +- else +- { +- if (fprintf(fd, "normal! 0%d|", wp->w_virtcol + 1) < 0 +- || put_eol(fd) == FAIL) +- return FAIL; +- } ++ else if (put_view_curpos(fd, wp, "") == FAIL) ++ return FAIL; + } + } + +diff --git src/testdir/test_mksession.vim src/testdir/test_mksession.vim +index c0b82ffa8..ed8b10fa0 100644 +--- src/testdir/test_mksession.vim ++++ src/testdir/test_mksession.vim +@@ -22,7 +22,8 @@ func Test_mksession() + \ 'two tabs in one line', + \ 'one ä multibyteCharacter', + \ 'aä Ä two multiByte characters', +- \ 'Aäöü three mulTibyte characters' ++ \ 'Aäöü three mulTibyte characters', ++ \ 'short line', + \ ]) + let tmpfile = 'Xtemp' + exec 'w! ' . tmpfile +@@ -44,6 +45,8 @@ func Test_mksession() + norm! j16| + split + norm! j16| ++ split ++ norm! j$ + wincmd l + + set nowrap +@@ -66,7 +69,7 @@ func Test_mksession() + split + call wincol() + mksession! Xtest_mks.out +- let li = filter(readfile('Xtest_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"') ++ let li = filter(readfile('Xtest_mks.out'), 'v:val =~# "\\(^ *normal! [0$]\\|^ *exe ''normal!\\)"') + let expected = [ + \ 'normal! 016|', + \ 'normal! 016|', +@@ -76,6 +79,7 @@ func Test_mksession() + \ 'normal! 016|', + \ 'normal! 016|', + \ 'normal! 016|', ++ \ 'normal! $', + \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'", + \ " normal! 016|", + \ " exe 'normal! ' . s:c . '|zs' . 16 . '|'", +@@ -317,7 +321,7 @@ func Test_mkview_file() + help :mkview + set number + norm! V}zf +- let pos = getpos('.') ++ let pos = getcurpos() + let linefoldclosed1 = foldclosed('.') + mkview! Xview + set nonumber +@@ -329,7 +333,7 @@ func Test_mkview_file() + source Xview + call assert_equal(1, &number) + call assert_match('\*:mkview\*$', getline('.')) +- call assert_equal(pos, getpos('.')) ++ call assert_equal(pos, getcurpos()) + call assert_equal(linefoldclosed1, foldclosed('.')) + + " Creating a view again with the same file name should fail (file +@@ -352,7 +356,7 @@ func Test_mkview_loadview_with_viewdir() + help :mkview + set number + norm! V}zf +- let pos = getpos('.') ++ let pos = getcurpos() + let linefoldclosed1 = foldclosed('.') + mkview 1 + set nonumber +@@ -369,7 +373,7 @@ func Test_mkview_loadview_with_viewdir() + \ glob('Xviewdir/*')) + call assert_equal(1, &number) + call assert_match('\*:mkview\*$', getline('.')) +- call assert_equal(pos, getpos('.')) ++ call assert_equal(pos, getcurpos()) + call assert_equal(linefoldclosed1, foldclosed('.')) + + call delete('Xviewdir', 'rf') +diff --git src/version.c src/version.c +index 243e213d2..c2f64d37a 100644 +--- src/version.c ++++ src/version.c +@@ -795,6 +795,8 @@ static char *(features[]) = + static int included_patches[] = + { /* Add new patch number below this line */ + /**/ ++ 333, ++/**/ + 332, + /**/ + 331, diff --git a/data/vim/patches/8.1.0334 b/data/vim/patches/8.1.0334 new file mode 100644 index 000000000..71c455c4e --- /dev/null +++ b/data/vim/patches/8.1.0334 @@ -0,0 +1,118 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0334 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0334 +Problem: 'autowrite' takes effect when buffer is not to be written. +Solution: Don't write buffers that are not supposed to be written. (Even Q + Jones, closes #3391) Add tests for 'autowrite'. +Files: src/ex_cmds2.c, src/testdir/test_writefile.vim + + +*** ../vim-8.1.0333/src/ex_cmds2.c 2018-07-08 17:18:58.416462371 +0200 +--- src/ex_cmds2.c 2018-08-30 12:54:53.366211602 +0200 +*************** +*** 2041,2047 **** + } + + /* +! * flush all buffers, except the ones that are readonly + */ + void + autowrite_all(void) +--- 2041,2047 ---- + } + + /* +! * Flush all buffers, except the ones that are readonly or are never written. + */ + void + autowrite_all(void) +*************** +*** 2051,2057 **** + if (!(p_aw || p_awa) || !p_write) + return; + FOR_ALL_BUFFERS(buf) +! if (bufIsChanged(buf) && !buf->b_p_ro) + { + bufref_T bufref; + +--- 2051,2057 ---- + if (!(p_aw || p_awa) || !p_write) + return; + FOR_ALL_BUFFERS(buf) +! if (bufIsChanged(buf) && !buf->b_p_ro && !bt_dontwrite(buf)) + { + bufref_T bufref; + +*** ../vim-8.1.0333/src/testdir/test_writefile.vim 2018-04-21 20:10:32.000000000 +0200 +--- src/testdir/test_writefile.vim 2018-08-30 13:03:35.924399170 +0200 +*************** +*** 112,114 **** +--- 112,152 ---- + throw 'Skipped: /dev/stdout is not writable' + endif + endfunc ++ ++ func Test_writefile_autowrite() ++ set autowrite ++ new ++ next Xa Xb Xc ++ call setline(1, 'aaa') ++ next ++ call assert_equal(['aaa'], readfile('Xa')) ++ call setline(1, 'bbb') ++ call assert_fails('edit XX') ++ call assert_false(filereadable('Xb')) ++ ++ set autowriteall ++ edit XX ++ call assert_equal(['bbb'], readfile('Xb')) ++ ++ bwipe! ++ call delete('Xa') ++ call delete('Xb') ++ set noautowrite ++ endfunc ++ ++ func Test_writefile_autowrite_nowrite() ++ set autowrite ++ new ++ next Xa Xb Xc ++ set buftype=nowrite ++ call setline(1, 'aaa') ++ let buf = bufnr('%') ++ " buffer contents silently lost ++ edit XX ++ call assert_false(filereadable('Xa')) ++ rewind ++ call assert_equal('', getline(1)) ++ ++ bwipe! ++ set noautowrite ++ endfunc +*** ../vim-8.1.0333/src/version.c 2018-08-29 21:42:39.016365007 +0200 +--- src/version.c 2018-08-30 12:50:09.857472529 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 334, + /**/ + +-- +I learned the customs and mannerisms of engineers by observing them, much the +way Jane Goodall learned about the great apes, but without the hassle of +grooming. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0335 b/data/vim/patches/8.1.0335 new file mode 100644 index 000000000..341e1c7bf --- /dev/null +++ b/data/vim/patches/8.1.0335 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0335 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0335 +Problem: mkview test fails on CI. +Solution: Attempt to force recomputing curswant after folding. +Files: src/testdir/test_mksession.vim + + +*** ../vim-8.1.0334/src/testdir/test_mksession.vim 2018-08-29 21:42:39.016365007 +0200 +--- src/testdir/test_mksession.vim 2018-08-30 14:03:35.770304367 +0200 +*************** +*** 320,326 **** + " Create a view with line number and a fold. + help :mkview + set number +! norm! V}zf + let pos = getcurpos() + let linefoldclosed1 = foldclosed('.') + mkview! Xview +--- 320,326 ---- + " Create a view with line number and a fold. + help :mkview + set number +! norm! V}zf0 + let pos = getcurpos() + let linefoldclosed1 = foldclosed('.') + mkview! Xview +*** ../vim-8.1.0334/src/version.c 2018-08-30 13:07:12.026033864 +0200 +--- src/version.c 2018-08-30 13:54:25.107638207 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 335, + /**/ + +-- +If someone questions your market projections, simply point out that your +target market is "People who are nuts" and "People who will buy any damn +thing". Nobody is going to tell you there aren't enough of those people +to go around. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0336 b/data/vim/patches/8.1.0336 new file mode 100644 index 000000000..47b905758 --- /dev/null +++ b/data/vim/patches/8.1.0336 @@ -0,0 +1,104 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0336 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0336 +Problem: mkview test still fails on CI. +Solution: Ignore curswant, don't see another solution. +Files: src/testdir/test_mksession.vim + + +*** ../vim-8.1.0335/src/testdir/test_mksession.vim 2018-08-30 14:04:22.105836549 +0200 +--- src/testdir/test_mksession.vim 2018-08-30 14:14:25.455621441 +0200 +*************** +*** 321,327 **** + help :mkview + set number + norm! V}zf0 +! let pos = getcurpos() + let linefoldclosed1 = foldclosed('.') + mkview! Xview + set nonumber +--- 321,327 ---- + help :mkview + set number + norm! V}zf0 +! let pos = getpos('.') + let linefoldclosed1 = foldclosed('.') + mkview! Xview + set nonumber +*************** +*** 333,339 **** + source Xview + call assert_equal(1, &number) + call assert_match('\*:mkview\*$', getline('.')) +! call assert_equal(pos, getcurpos()) + call assert_equal(linefoldclosed1, foldclosed('.')) + + " Creating a view again with the same file name should fail (file +--- 333,339 ---- + source Xview + call assert_equal(1, &number) + call assert_match('\*:mkview\*$', getline('.')) +! call assert_equal(pos, getpos('.')) + call assert_equal(linefoldclosed1, foldclosed('.')) + + " Creating a view again with the same file name should fail (file +*************** +*** 356,362 **** + help :mkview + set number + norm! V}zf +! let pos = getcurpos() + let linefoldclosed1 = foldclosed('.') + mkview 1 + set nonumber +--- 356,362 ---- + help :mkview + set number + norm! V}zf +! let pos = getpos('.') + let linefoldclosed1 = foldclosed('.') + mkview 1 + set nonumber +*************** +*** 373,379 **** + \ glob('Xviewdir/*')) + call assert_equal(1, &number) + call assert_match('\*:mkview\*$', getline('.')) +! call assert_equal(pos, getcurpos()) + call assert_equal(linefoldclosed1, foldclosed('.')) + + call delete('Xviewdir', 'rf') +--- 373,379 ---- + \ glob('Xviewdir/*')) + call assert_equal(1, &number) + call assert_match('\*:mkview\*$', getline('.')) +! call assert_equal(pos, getpos('.')) + call assert_equal(linefoldclosed1, foldclosed('.')) + + call delete('Xviewdir', 'rf') +*** ../vim-8.1.0335/src/version.c 2018-08-30 14:04:22.105836549 +0200 +--- src/version.c 2018-08-30 14:13:10.464402485 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 336, + /**/ + +-- +A consultant is a person who takes your money and annoys your employees while +tirelessly searching for the best way to extend the consulting contract. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0337 b/data/vim/patches/8.1.0337 new file mode 100644 index 000000000..c816ba6ee --- /dev/null +++ b/data/vim/patches/8.1.0337 @@ -0,0 +1,121 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0337 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0337 +Problem: :file fails in quickfix command. +Solution: Allow :file without argument when curbuf_lock is set. (Jason + Franklin) +Files: src/ex_docmd.c, src/testdir/test_quickfix.vim + + +*** ../vim-8.1.0336/src/ex_docmd.c 2018-08-29 21:42:39.016365007 +0200 +--- src/ex_docmd.c 2018-08-30 15:42:47.756074140 +0200 +*************** +*** 2039,2050 **** + errormsg = (char_u *)_(get_text_locked_msg()); + goto doend; + } + /* Disallow editing another buffer when "curbuf_lock" is set. +! * Do allow ":edit" (check for argument later). +! * Do allow ":checktime" (it's postponed). */ + if (!(ea.argt & CMDWIN) +- && ea.cmdidx != CMD_edit + && ea.cmdidx != CMD_checktime + && !IS_USER_CMDIDX(ea.cmdidx) + && curbuf_locked()) + goto doend; +--- 2039,2053 ---- + errormsg = (char_u *)_(get_text_locked_msg()); + goto doend; + } ++ + /* Disallow editing another buffer when "curbuf_lock" is set. +! * Do allow ":checktime" (it is postponed). +! * Do allow ":edit" (check for an argument later). +! * Do allow ":file" with no arguments (check for an argument later). */ + if (!(ea.argt & CMDWIN) + && ea.cmdidx != CMD_checktime ++ && ea.cmdidx != CMD_edit ++ && ea.cmdidx != CMD_file + && !IS_USER_CMDIDX(ea.cmdidx) + && curbuf_locked()) + goto doend; +*************** +*** 2130,2135 **** +--- 2133,2142 ---- + else + ea.arg = skipwhite(p); + ++ // ":file" cannot be run with an argument when "curbuf_lock" is set ++ if (ea.cmdidx == CMD_file && *ea.arg != NUL && curbuf_locked()) ++ goto doend; ++ + /* + * Check for "++opt=val" argument. + * Must be first, allow ":w ++enc=utf8 !cmd" +*** ../vim-8.1.0336/src/testdir/test_quickfix.vim 2018-08-21 21:58:09.528674683 +0200 +--- src/testdir/test_quickfix.vim 2018-08-30 15:39:06.810888474 +0200 +*************** +*** 2485,2490 **** +--- 2485,2519 ---- + call test_override('starting', 0) + endfunc + ++ " Check that ":file" without an argument is possible even when "curbuf_lock" ++ " is set. ++ func Test_file_from_copen() ++ " Works without argument. ++ augroup QF_Test ++ au! ++ au FileType qf file ++ augroup END ++ copen ++ ++ augroup QF_Test ++ au! ++ augroup END ++ cclose ++ ++ " Fails with argument. ++ augroup QF_Test ++ au! ++ au FileType qf call assert_fails(':file foo', 'E788') ++ augroup END ++ copen ++ augroup QF_Test ++ au! ++ augroup END ++ cclose ++ ++ augroup! QF_Test ++ endfunction ++ + func Test_resize_from_copen() + augroup QF_Test + au! +*** ../vim-8.1.0336/src/version.c 2018-08-30 14:15:56.858667449 +0200 +--- src/version.c 2018-08-30 15:40:27.861841127 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 337, + /**/ + +-- +The process for understanding customers primarily involves sitting around with +other marketing people and talking about what you would to if you were dumb +enough to be a customer. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0338 b/data/vim/patches/8.1.0338 new file mode 100644 index 000000000..b8de0abfa --- /dev/null +++ b/data/vim/patches/8.1.0338 @@ -0,0 +1,177 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0338 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0338 +Problem: MS-Windows: VTP doesn't work properly with Powershell. +Solution: Adjust the color index. (Nobuhiro Takasaki, closes #3347) +Files: src/os_win32.c + + +*** ../vim-8.1.0337/src/os_win32.c 2018-08-23 22:38:27.915001621 +0200 +--- src/os_win32.c 2018-08-30 17:45:38.582500357 +0200 +*************** +*** 213,218 **** +--- 213,226 ---- + static guicolor_T save_console_bg_rgb; + static guicolor_T save_console_fg_rgb; + ++ static int g_color_index_bg = 0; ++ static int g_color_index_fg = 7; ++ ++ # ifdef FEAT_TERMGUICOLORS ++ static int default_console_color_bg = 0x000000; // black ++ static int default_console_color_fg = 0xc0c0c0; // white ++ # endif ++ + # ifdef FEAT_TERMGUICOLORS + # define USE_VTP (vtp_working && is_term_win32() && (p_tgc || (!p_tgc && t_colors >= 256))) + # else +*************** +*** 2628,2633 **** +--- 2636,2645 ---- + if (cterm_normal_bg_color == 0) + cterm_normal_bg_color = ((g_attrCurrent >> 4) & 0xf) + 1; + ++ // Fg and Bg color index nunmber at startup ++ g_color_index_fg = g_attrDefault & 0xf; ++ g_color_index_bg = (g_attrDefault >> 4) & 0xf; ++ + /* set termcap codes to current text attributes */ + update_tcap(g_attrCurrent); + +*************** +*** 7664,7669 **** +--- 7676,7684 ---- + DWORD ver, mode; + HMODULE hKerneldll; + DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi; ++ # ifdef FEAT_TERMGUICOLORS ++ COLORREF fg, bg; ++ # endif + + ver = get_build_number(); + vtp_working = (ver >= VTP_FIRST_SUPPORT_BUILD) ? 1 : 0; +*************** +*** 7690,7697 **** + csbi.cbSize = sizeof(csbi); + if (has_csbiex) + pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi); +! save_console_bg_rgb = (guicolor_T)csbi.ColorTable[0]; +! save_console_fg_rgb = (guicolor_T)csbi.ColorTable[7]; + + set_console_color_rgb(); + } +--- 7705,7721 ---- + csbi.cbSize = sizeof(csbi); + if (has_csbiex) + pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi); +! save_console_bg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_bg]; +! save_console_fg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_fg]; +! +! # ifdef FEAT_TERMGUICOLORS +! bg = (COLORREF)csbi.ColorTable[g_color_index_bg]; +! fg = (COLORREF)csbi.ColorTable[g_color_index_fg]; +! bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg); +! fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg); +! default_console_color_bg = bg; +! default_console_color_fg = fg; +! #endif + + set_console_color_rgb(); + } +*************** +*** 7788,7801 **** + ctermfg = -1; + if (id > 0) + syn_id2cterm_bg(id, &ctermfg, &ctermbg); +! fg = ctermfg != -1 ? ctermtoxterm(ctermfg) : 0xc0c0c0; /* white */ + } + if (bg == INVALCOLOR) + { + ctermbg = -1; + if (id > 0) + syn_id2cterm_bg(id, &ctermfg, &ctermbg); +! bg = ctermbg != -1 ? ctermtoxterm(ctermbg) : 0x000000; /* black */ + } + fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg); + bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg); +--- 7812,7827 ---- + ctermfg = -1; + if (id > 0) + syn_id2cterm_bg(id, &ctermfg, &ctermbg); +! fg = ctermfg != -1 ? ctermtoxterm(ctermfg) : default_console_color_fg; +! cterm_normal_fg_gui_color = fg; + } + if (bg == INVALCOLOR) + { + ctermbg = -1; + if (id > 0) + syn_id2cterm_bg(id, &ctermfg, &ctermbg); +! bg = ctermbg != -1 ? ctermtoxterm(ctermbg) : default_console_color_bg; +! cterm_normal_bg_gui_color = bg; + } + fg = (GetRValue(fg) << 16) | (GetGValue(fg) << 8) | GetBValue(fg); + bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg); +*************** +*** 7807,7814 **** + csbi.cbSize = sizeof(csbi); + csbi.srWindow.Right += 1; + csbi.srWindow.Bottom += 1; +! csbi.ColorTable[0] = (COLORREF)bg; +! csbi.ColorTable[7] = (COLORREF)fg; + if (has_csbiex) + pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi); + # endif +--- 7833,7840 ---- + csbi.cbSize = sizeof(csbi); + csbi.srWindow.Right += 1; + csbi.srWindow.Bottom += 1; +! csbi.ColorTable[g_color_index_bg] = (COLORREF)bg; +! csbi.ColorTable[g_color_index_fg] = (COLORREF)fg; + if (has_csbiex) + pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi); + # endif +*************** +*** 7827,7834 **** + csbi.cbSize = sizeof(csbi); + csbi.srWindow.Right += 1; + csbi.srWindow.Bottom += 1; +! csbi.ColorTable[0] = (COLORREF)save_console_bg_rgb; +! csbi.ColorTable[7] = (COLORREF)save_console_fg_rgb; + if (has_csbiex) + pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi); + # endif +--- 7853,7860 ---- + csbi.cbSize = sizeof(csbi); + csbi.srWindow.Right += 1; + csbi.srWindow.Bottom += 1; +! csbi.ColorTable[g_color_index_bg] = (COLORREF)save_console_bg_rgb; +! csbi.ColorTable[g_color_index_fg] = (COLORREF)save_console_fg_rgb; + if (has_csbiex) + pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi); + # endif +*** ../vim-8.1.0337/src/version.c 2018-08-30 15:58:23.248944510 +0200 +--- src/version.c 2018-08-30 17:45:48.250391370 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 338, + /**/ + +-- +The average life of an organization chart is six months. You can safely +ignore any order from your boss that would take six months to complete. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0339 b/data/vim/patches/8.1.0339 new file mode 100644 index 000000000..26ab0843f --- /dev/null +++ b/data/vim/patches/8.1.0339 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0339 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0339 +Problem: Wrong highlight when 'incsearch' set and cancelling :s. +Solution: Reset search line range. (Hirohito Higashi, Masamichi Abe) +Files: src/ex_getln.c, src/testdir/test_search.vim, + src/testdir/dumps/Test_incsearch_substitute_10.dump + + +*** ../vim-8.1.0338/src/ex_getln.c 2018-08-23 20:55:23.328137497 +0200 +--- src/ex_getln.c 2018-08-31 22:01:54.482219518 +0200 +*************** +*** 436,447 **** + } + restore_viewstate(&is_state->old_viewstate); + highlight_match = FALSE; + validate_cursor(); /* needed for TAB */ + if (call_update_screen) + update_screen(SOME_VALID); + else + redraw_all_later(SOME_VALID); +- p_magic = is_state->magic_save; + } + } + +--- 436,453 ---- + } + restore_viewstate(&is_state->old_viewstate); + highlight_match = FALSE; ++ ++ // by default search all lines ++ search_first_line = 0; ++ search_last_line = MAXLNUM; ++ ++ p_magic = is_state->magic_save; ++ + validate_cursor(); /* needed for TAB */ + if (call_update_screen) + update_screen(SOME_VALID); + else + redraw_all_later(SOME_VALID); + } + } + +*** ../vim-8.1.0338/src/testdir/test_search.vim 2018-08-23 20:55:23.328137497 +0200 +--- src/testdir/test_search.vim 2018-08-31 22:06:07.867638671 +0200 +*************** +*** 956,961 **** +--- 956,970 ---- + call VerifyScreenDump(buf, 'Test_incsearch_substitute_09', {}) + call term_sendkeys(buf, "\") + ++ call term_sendkeys(buf, ":set nocursorline\") ++ ++ " All matches are highlighted for 'hlsearch' after the incsearch canceled ++ call term_sendkeys(buf, "1G*") ++ call term_sendkeys(buf, ":2,5s/foo") ++ sleep 100m ++ call term_sendkeys(buf, "\") ++ call VerifyScreenDump(buf, 'Test_incsearch_substitute_10', {}) ++ + call StopVimInTerminal(buf) + call delete('Xis_subst_script') + endfunc +*** ../vim-8.1.0338/src/testdir/dumps/Test_incsearch_substitute_10.dump 2018-08-31 22:08:36.694113050 +0200 +--- src/testdir/dumps/Test_incsearch_substitute_10.dump 2018-08-31 22:01:54.482219518 +0200 +*************** +*** 0 **** +--- 1,9 ---- ++ |f+0&#ffff4012|o@1| +0&#ffffff0|1| @64 ++ >f+0&#ffff4012|o@1| +0&#ffffff0|2| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|3| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|4| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|5| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|6| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|7| @64 ++ |f+0&#ffff4012|o@1| +0&#ffffff0|8| @64 ++ @52|2|,|1| @10|T|o|p| +*** ../vim-8.1.0338/src/version.c 2018-08-30 17:47:01.949560920 +0200 +--- src/version.c 2018-08-31 22:08:45.178025914 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 339, + /**/ + +-- +A)bort, R)etry, D)o it right this time + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0340 b/data/vim/patches/8.1.0340 new file mode 100644 index 000000000..c63fda431 --- /dev/null +++ b/data/vim/patches/8.1.0340 @@ -0,0 +1,72 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0340 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0340 +Problem: No test for :spellinfo. +Solution: Add a test. (Dominique Pelle, closes #3394) +Files: src/testdir/test_spell.vim + + +*** ../vim-8.1.0339/src/testdir/test_spell.vim 2018-07-20 23:36:21.171368602 +0200 +--- src/testdir/test_spell.vim 2018-08-31 22:25:03.695993566 +0200 +*************** +*** 126,131 **** +--- 126,160 ---- + bwipe! + endfunc + ++ func Test_spellinfo() ++ new ++ ++ set enc=latin1 spell spelllang=en ++ call assert_match("^\nfile: .*/runtime/spell/en.latin1.spl\n$", execute('spellinfo')) ++ ++ set enc=cp1250 spell spelllang=en ++ call assert_match("^\nfile: .*/runtime/spell/en.ascii.spl\n$", execute('spellinfo')) ++ ++ if has('multi_byte') ++ set enc=utf-8 spell spelllang=en ++ call assert_match("^\nfile: .*/runtime/spell/en.utf-8.spl\n$", execute('spellinfo')) ++ endif ++ ++ set enc=latin1 spell spelllang=en_us,en_nz ++ call assert_match("^\n" . ++ \ "file: .*/runtime/spell/en.latin1.spl\n" . ++ \ "file: .*/runtime/spell/en.latin1.spl\n$", execute('spellinfo')) ++ ++ set spell spelllang= ++ call assert_fails('spellinfo', 'E756:') ++ ++ set nospell spelllang=en ++ call assert_fails('spellinfo', 'E756:') ++ ++ set enc& spell& spelllang& ++ bwipe ++ endfunc ++ + func Test_zz_basic() + call LoadAffAndDic(g:test_data_aff1, g:test_data_dic1) + call RunGoodBad("wrong OK puts. Test the end", +*** ../vim-8.1.0339/src/version.c 2018-08-31 22:09:31.561549259 +0200 +--- src/version.c 2018-08-31 22:24:49.216141831 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 340, + /**/ + +-- +A)bort, R)etry, P)lease don't bother me again + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0341 b/data/vim/patches/8.1.0341 new file mode 100644 index 000000000..fed330424 --- /dev/null +++ b/data/vim/patches/8.1.0341 @@ -0,0 +1,312 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0341 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0341 +Problem: :argadd in empty buffer changes the buffer name. (Pavol Juhas) +Solution: Don't re-use the current buffer when not going to edit the file. + (closes #3397) Do re-use the current buffer for :next. +Files: src/ex_cmds2.c, src/testdir/test_arglist.vim, + src/testdir/test_command_count.vim + + +*** ../vim-8.1.0340/src/ex_cmds2.c 2018-08-30 13:07:12.026033864 +0200 +--- src/ex_cmds2.c 2018-08-31 23:00:26.400150737 +0200 +*************** +*** 2445,2454 **** + */ + + static char_u *do_one_arg(char_u *str); +! static int do_arglist(char_u *str, int what, int after); + static void alist_check_arg_idx(void); + static int editing_arg_idx(win_T *win); +! static int alist_add_list(int count, char_u **files, int after); + #define AL_SET 1 + #define AL_ADD 2 + #define AL_DEL 3 +--- 2445,2454 ---- + */ + + static char_u *do_one_arg(char_u *str); +! static int do_arglist(char_u *str, int what, int after, int will_edit); + static void alist_check_arg_idx(void); + static int editing_arg_idx(win_T *win); +! static void alist_add_list(int count, char_u **files, int after, int will_edit); + #define AL_SET 1 + #define AL_ADD 2 + #define AL_DEL 3 +*************** +*** 2553,2559 **** + void + set_arglist(char_u *str) + { +! do_arglist(str, AL_SET, 0); + } + + /* +--- 2553,2559 ---- + void + set_arglist(char_u *str) + { +! do_arglist(str, AL_SET, 0, FALSE); + } + + /* +*************** +*** 2567,2573 **** + do_arglist( + char_u *str, + int what, +! int after UNUSED) /* 0 means before first one */ + { + garray_T new_ga; + int exp_count; +--- 2567,2574 ---- + do_arglist( + char_u *str, + int what, +! int after UNUSED, // 0 means before first one +! int will_edit) // will edit added argument + { + garray_T new_ga; + int exp_count; +*************** +*** 2652,2662 **** + + if (what == AL_ADD) + { +! (void)alist_add_list(exp_count, exp_files, after); + vim_free(exp_files); + } + else /* what == AL_SET */ +! alist_set(ALIST(curwin), exp_count, exp_files, FALSE, NULL, 0); + } + + alist_check_arg_idx(); +--- 2653,2663 ---- + + if (what == AL_ADD) + { +! alist_add_list(exp_count, exp_files, after, will_edit); + vim_free(exp_files); + } + else /* what == AL_SET */ +! alist_set(ALIST(curwin), exp_count, exp_files, will_edit, NULL, 0); + } + + alist_check_arg_idx(); +*************** +*** 2932,2938 **** + { + if (*eap->arg != NUL) /* redefine file list */ + { +! if (do_arglist(eap->arg, AL_SET, 0) == FAIL) + return; + i = 0; + } +--- 2933,2939 ---- + { + if (*eap->arg != NUL) /* redefine file list */ + { +! if (do_arglist(eap->arg, AL_SET, 0, TRUE) == FAIL) + return; + i = 0; + } +*************** +*** 2952,2958 **** + // Whether curbuf will be reused, curbuf->b_ffname will be set. + int curbuf_is_reusable = curbuf_reusable(); + +! if (do_arglist(eap->arg, AL_ADD, i) == FAIL) + return; + #ifdef FEAT_TITLE + maketitle(); +--- 2953,2959 ---- + // Whether curbuf will be reused, curbuf->b_ffname will be set. + int curbuf_is_reusable = curbuf_reusable(); + +! if (do_arglist(eap->arg, AL_ADD, i, TRUE) == FAIL) + return; + #ifdef FEAT_TITLE + maketitle(); +*************** +*** 2974,2980 **** + ex_argadd(exarg_T *eap) + { + do_arglist(eap->arg, AL_ADD, +! eap->addr_count > 0 ? (int)eap->line2 : curwin->w_arg_idx + 1); + #ifdef FEAT_TITLE + maketitle(); + #endif +--- 2975,2982 ---- + ex_argadd(exarg_T *eap) + { + do_arglist(eap->arg, AL_ADD, +! eap->addr_count > 0 ? (int)eap->line2 : curwin->w_arg_idx + 1, +! FALSE); + #ifdef FEAT_TITLE + maketitle(); + #endif +*************** +*** 3024,3030 **** + else if (*eap->arg == NUL) + EMSG(_(e_argreq)); + else +! do_arglist(eap->arg, AL_DEL, 0); + #ifdef FEAT_TITLE + maketitle(); + #endif +--- 3026,3032 ---- + else if (*eap->arg == NUL) + EMSG(_(e_argreq)); + else +! do_arglist(eap->arg, AL_DEL, 0, FALSE); + #ifdef FEAT_TITLE + maketitle(); + #endif +*************** +*** 3269,3281 **** + * Add files[count] to the arglist of the current window after arg "after". + * The file names in files[count] must have been allocated and are taken over. + * Files[] itself is not taken over. +- * Returns index of first added argument. Returns -1 when failed (out of mem). + */ +! static int + alist_add_list( + int count, + char_u **files, +! int after) /* where to add: 0 = before first one */ + { + int i; + int old_argcount = ARGCOUNT; +--- 3271,3283 ---- + * Add files[count] to the arglist of the current window after arg "after". + * The file names in files[count] must have been allocated and are taken over. + * Files[] itself is not taken over. + */ +! static void + alist_add_list( + int count, + char_u **files, +! int after, // where to add: 0 = before first one +! int will_edit) // will edit adding argument + { + int i; + int old_argcount = ARGCOUNT; +*************** +*** 3291,3309 **** + (ARGCOUNT - after) * sizeof(aentry_T)); + for (i = 0; i < count; ++i) + { + ARGLIST[after + i].ae_fname = files[i]; +! ARGLIST[after + i].ae_fnum = +! buflist_add(files[i], BLN_LISTED | BLN_CURBUF); + } + ALIST(curwin)->al_ga.ga_len += count; + if (old_argcount > 0 && curwin->w_arg_idx >= after) + curwin->w_arg_idx += count; +! return after; + } + + for (i = 0; i < count; ++i) + vim_free(files[i]); +- return -1; + } + + #if defined(FEAT_CMDL_COMPL) || defined(PROTO) +--- 3293,3311 ---- + (ARGCOUNT - after) * sizeof(aentry_T)); + for (i = 0; i < count; ++i) + { ++ int flags = BLN_LISTED | (will_edit ? BLN_CURBUF : 0); ++ + ARGLIST[after + i].ae_fname = files[i]; +! ARGLIST[after + i].ae_fnum = buflist_add(files[i], flags); + } + ALIST(curwin)->al_ga.ga_len += count; + if (old_argcount > 0 && curwin->w_arg_idx >= after) + curwin->w_arg_idx += count; +! return; + } + + for (i = 0; i < count; ++i) + vim_free(files[i]); + } + + #if defined(FEAT_CMDL_COMPL) || defined(PROTO) +*** ../vim-8.1.0340/src/testdir/test_arglist.vim 2018-04-24 21:54:38.000000000 +0200 +--- src/testdir/test_arglist.vim 2018-08-31 22:42:29.649222626 +0200 +*************** +*** 80,85 **** +--- 80,103 ---- + call assert_equal(0, len(argv())) + endfunc + ++ func Test_argadd_empty_curbuf() ++ new ++ let curbuf = bufnr('%') ++ call writefile(['test', 'Xargadd'], 'Xargadd') ++ " must not re-use the current buffer. ++ argadd Xargadd ++ call assert_equal(curbuf, bufnr('%')) ++ call assert_equal('', bufname('%')) ++ call assert_equal(1, line('$')) ++ rew ++ call assert_notequal(curbuf, bufnr('%')) ++ call assert_equal('Xargadd', bufname('%')) ++ call assert_equal(2, line('$')) ++ ++ %argd ++ bwipe! ++ endfunc ++ + func Init_abc() + args a b c + next +*** ../vim-8.1.0340/src/testdir/test_command_count.vim 2018-04-24 21:47:12.000000000 +0200 +--- src/testdir/test_command_count.vim 2018-08-31 23:01:54.967036898 +0200 +*************** +*** 158,164 **** + func Test_command_count_4() + %argd + let bufnr = bufnr('$') +! arga aa bb cc dd ee ff + 3argu + let args = [] + .,$-argdo call add(args, expand('%')) +--- 158,166 ---- + func Test_command_count_4() + %argd + let bufnr = bufnr('$') +! next aa bb cc dd ee ff +! call assert_equal(bufnr, bufnr('%')) +! + 3argu + let args = [] + .,$-argdo call add(args, expand('%')) +*** ../vim-8.1.0340/src/version.c 2018-08-31 22:26:49.210912007 +0200 +--- src/version.c 2018-08-31 22:44:55.551715626 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 341, + /**/ + +-- +login: yes +password: I don't know, please tell me +password is incorrect +login: yes +password: incorrect + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0342 b/data/vim/patches/8.1.0342 new file mode 100644 index 000000000..3ea1ac3f5 --- /dev/null +++ b/data/vim/patches/8.1.0342 @@ -0,0 +1,239 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0342 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0342 +Problem: Crash when a callback deletes a window that is being used. +Solution: Do not unload a buffer that is being displayed while redrawing the + screen. Also avoid invoking callbacks while redrawing. + (closes #2107) +Files: src/buffer.c, src/misc2.c + + +*** ../vim-8.1.0341/src/buffer.c 2018-08-21 18:50:11.153501902 +0200 +--- src/buffer.c 2018-09-01 15:16:57.753412395 +0200 +*************** +*** 412,418 **** + hash_remove(&buf_hashtab, hi); + } + +! static char *e_buflocked = N_("E937: Attempt to delete a buffer that is in use"); + + /* + * Close the link to a buffer. +--- 412,439 ---- + hash_remove(&buf_hashtab, hi); + } + +! /* +! * Return TRUE when buffer "buf" can be unloaded. +! * Give an error message and return FALSE when the buffer is locked or the +! * screen is being redrawn and the buffer is in a window. +! */ +! static int +! can_unload_buffer(buf_T *buf) +! { +! int can_unload = !buf->b_locked; +! +! if (can_unload && updating_screen) +! { +! win_T *wp; +! +! FOR_ALL_WINDOWS(wp) +! if (wp->w_buffer == buf) +! can_unload = FALSE; +! } +! if (!can_unload) +! EMSG(_("E937: Attempt to delete a buffer that is in use")); +! return can_unload; +! } + + /* + * Close the link to a buffer. +*************** +*** 474,484 **** + { + if (wipe_buf || unload_buf) + { +! if (buf->b_locked) +! { +! EMSG(_(e_buflocked)); + return; +! } + /* Wiping out or unloading a terminal buffer kills the job. */ + free_terminal(buf); + } +--- 495,503 ---- + { + if (wipe_buf || unload_buf) + { +! if (!can_unload_buffer(buf)) + return; +! + /* Wiping out or unloading a terminal buffer kills the job. */ + free_terminal(buf); + } +*************** +*** 501,511 **** + + /* Disallow deleting the buffer when it is locked (already being closed or + * halfway a command that relies on it). Unloading is allowed. */ +! if (buf->b_locked > 0 && (del_buf || wipe_buf)) +! { +! EMSG(_(e_buflocked)); + return; +- } + + /* check no autocommands closed the window */ + if (win != NULL && win_valid_any_tab(win)) +--- 520,527 ---- + + /* Disallow deleting the buffer when it is locked (already being closed or + * halfway a command that relies on it). Unloading is allowed. */ +! if ((del_buf || wipe_buf) && !can_unload_buffer(buf)) + return; + + /* check no autocommands closed the window */ + if (win != NULL && win_valid_any_tab(win)) +*************** +*** 1196,1203 **** + return errormsg; + } + +- static int empty_curbuf(int close_others, int forceit, int action); +- + /* + * Make the current buffer empty. + * Used when it is wiped out and it's the last buffer. +--- 1212,1217 ---- +*************** +*** 1238,1243 **** +--- 1252,1258 ---- + need_fileinfo = FALSE; + return retval; + } ++ + /* + * Implementation of the commands for the buffer list. + * +*************** +*** 1359,1369 **** + int forward; + bufref_T bufref; + +! if (buf->b_locked) +! { +! EMSG(_(e_buflocked)); + return FAIL; +- } + + set_bufref(&bufref, buf); + +--- 1374,1381 ---- + int forward; + bufref_T bufref; + +! if (!can_unload_buffer(buf)) + return FAIL; + + set_bufref(&bufref, buf); + +*** ../vim-8.1.0341/src/misc2.c 2018-07-29 16:09:14.636945607 +0200 +--- src/misc2.c 2018-09-01 15:07:10.019535433 +0200 +*************** +*** 6366,6398 **** + { + win_T *old_curwin = curwin; + +! /* For Win32 mch_breakcheck() does not check for input, do it here. */ + # if defined(WIN32) && defined(FEAT_JOB_CHANNEL) + channel_handle_events(FALSE); + # endif + + # ifdef FEAT_NETBEANS_INTG +! /* Process the queued netbeans messages. */ + netbeans_parse_messages(); + # endif + # ifdef FEAT_JOB_CHANNEL +! /* Write any buffer lines still to be written. */ + channel_write_any_lines(); + +! /* Process the messages queued on channels. */ + channel_parse_messages(); + # endif + # if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11) +! /* Process the queued clientserver messages. */ + server_parse_messages(); + # endif + # ifdef FEAT_JOB_CHANNEL +! /* Check if any jobs have ended. */ + job_check_ended(); + # endif + +! /* If the current window changed we need to bail out of the waiting loop. +! * E.g. when a job exit callback closes the terminal window. */ + if (curwin != old_curwin) + ins_char_typebuf(K_IGNORE); + } +--- 6366,6403 ---- + { + win_T *old_curwin = curwin; + +! // Do not handle messages while redrawing, because it may cause buffers to +! // change or be wiped while they are being redrawn. +! if (updating_screen) +! return; +! +! // For Win32 mch_breakcheck() does not check for input, do it here. + # if defined(WIN32) && defined(FEAT_JOB_CHANNEL) + channel_handle_events(FALSE); + # endif + + # ifdef FEAT_NETBEANS_INTG +! // Process the queued netbeans messages. + netbeans_parse_messages(); + # endif + # ifdef FEAT_JOB_CHANNEL +! // Write any buffer lines still to be written. + channel_write_any_lines(); + +! // Process the messages queued on channels. + channel_parse_messages(); + # endif + # if defined(FEAT_CLIENTSERVER) && defined(FEAT_X11) +! // Process the queued clientserver messages. + server_parse_messages(); + # endif + # ifdef FEAT_JOB_CHANNEL +! // Check if any jobs have ended. + job_check_ended(); + # endif + +! // If the current window changed we need to bail out of the waiting loop. +! // E.g. when a job exit callback closes the terminal window. + if (curwin != old_curwin) + ins_char_typebuf(K_IGNORE); + } +*** ../vim-8.1.0341/src/version.c 2018-08-31 23:06:18.735841246 +0200 +--- src/version.c 2018-09-01 15:02:16.242604587 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 342, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +5. You find yourself brainstorming for new subjects to search. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0343 b/data/vim/patches/8.1.0343 new file mode 100644 index 000000000..db9bbf2d7 --- /dev/null +++ b/data/vim/patches/8.1.0343 @@ -0,0 +1,62 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0343 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0343 +Problem: 'shellslash' is not used for getcwd() with local directory. + (Daniel Hahler) +Solution: Call slash_adjust() later. (closes #3399) +Files: src/evalfunc.c + + +*** ../vim-8.1.0342/src/evalfunc.c 2018-08-21 20:28:49.888006612 +0200 +--- src/evalfunc.c 2018-09-02 14:23:21.103760517 +0200 +*************** +*** 4955,4965 **** + vim_free(cwd); + } + } + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif +- } + } + + /* +--- 4955,4965 ---- + vim_free(cwd); + } + } ++ } + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif + } + + /* +*** ../vim-8.1.0342/src/version.c 2018-09-01 15:29:58.754429402 +0200 +--- src/version.c 2018-09-02 14:24:17.503225353 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 343, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +7. You finally do take that vacation, but only after buying a USB modem + and a laptop. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0344 b/data/vim/patches/8.1.0344 new file mode 100644 index 000000000..a41f532af --- /dev/null +++ b/data/vim/patches/8.1.0344 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0344 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0344 +Problem: 'hlsearch' highlighting has a gap after /$. +Solution: Remove suspicious code. (Ricky Zhou, closes #3400) +Files: src/screen.c, src/testdir/test_hlsearch.vim + + +*** ../vim-8.1.0343/src/screen.c 2018-08-26 21:23:03.400383307 +0200 +--- src/screen.c 2018-09-02 15:01:39.828954706 +0200 +*************** +*** 5496,5510 **** + if (c == NUL) + { + #ifdef FEAT_SYN_HL +- if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol +- && lnum == wp->w_cursor.lnum) +- { +- /* highlight last char after line */ +- --col; +- --off; +- --vcol; +- } +- + /* Highlight 'cursorcolumn' & 'colorcolumn' past end of the line. */ + if (wp->w_p_wrap) + v = wp->w_skipcol; +--- 5496,5501 ---- +*** ../vim-8.1.0343/src/testdir/test_hlsearch.vim 2017-06-17 20:28:35.000000000 +0200 +--- src/testdir/test_hlsearch.vim 2018-09-02 15:00:49.269446213 +0200 +*************** +*** 4,10 **** + new + call setline(1, repeat(['aaa'], 10)) + set hlsearch nolazyredraw +- let r=[] + " redraw is needed to make hlsearch highlight the matches + exe "normal! /aaa\" | redraw + let r1 = screenattr(1, 1) +--- 4,9 ---- +*************** +*** 51,53 **** +--- 50,65 ---- + set nohlsearch redrawtime& + bwipe! + endfunc ++ ++ func Test_hlsearch_eol_highlight() ++ new ++ call append(1, repeat([''], 9)) ++ set hlsearch nolazyredraw ++ exe "normal! /$\" | redraw ++ let attr = screenattr(1, 1) ++ for row in range(2, 10) ++ call assert_equal(attr, screenattr(row, 1), 'in line ' . row) ++ endfor ++ set nohlsearch ++ bwipe! ++ endfunc +*** ../vim-8.1.0343/src/version.c 2018-09-02 14:25:02.330801508 +0200 +--- src/version.c 2018-09-02 14:58:34.506763279 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 344, + /**/ + +-- +"How is your new girlfriend?" +"90-60-90 man!" +"What, pale purple?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0345 b/data/vim/patches/8.1.0345 new file mode 100644 index 000000000..70cae5c1d --- /dev/null +++ b/data/vim/patches/8.1.0345 @@ -0,0 +1,286 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0345 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0345 +Problem: Cannot get the window id associated with the location list. +Solution: Add the "filewinid" argument to getloclist(). (Yegappan + Lakshmanan, closes #3202) +Files: runtime/doc/eval.txt, src/quickfix.c, + src/testdir/test_quickfix.vim + + +*** ../vim-8.1.0344/runtime/doc/eval.txt 2018-08-21 21:09:02.598739663 +0200 +--- runtime/doc/eval.txt 2018-09-02 15:13:00.638419373 +0200 +*************** +*** 4721,4726 **** +--- 4729,4738 ---- + If the optional {what} dictionary argument is supplied, then + returns the items listed in {what} as a dictionary. Refer to + |getqflist()| for the supported items in {what}. ++ If {what} contains 'filewinid', then returns the id of the ++ window used to display files from the location list. This ++ field is applicable only when called from a location list ++ window. + + getmatches() *getmatches()* + Returns a |List| with all matches previously defined by +*** ../vim-8.1.0344/src/quickfix.c 2018-08-28 22:07:38.574120540 +0200 +--- src/quickfix.c 2018-09-02 15:13:00.638419373 +0200 +*************** +*** 5670,5676 **** + QF_GETLIST_IDX = 0x40, + QF_GETLIST_SIZE = 0x80, + QF_GETLIST_TICK = 0x100, +! QF_GETLIST_ALL = 0x1FF, + }; + + /* +--- 5670,5677 ---- + QF_GETLIST_IDX = 0x40, + QF_GETLIST_SIZE = 0x80, + QF_GETLIST_TICK = 0x100, +! QF_GETLIST_FILEWINID = 0x200, +! QF_GETLIST_ALL = 0x3FF, + }; + + /* +*************** +*** 5744,5755 **** + * Convert the keys in 'what' to quickfix list property flags. + */ + static int +! qf_getprop_keys2flags(dict_T *what) + { + int flags = QF_GETLIST_NONE; + + if (dict_find(what, (char_u *)"all", -1) != NULL) + flags |= QF_GETLIST_ALL; + + if (dict_find(what, (char_u *)"title", -1) != NULL) + flags |= QF_GETLIST_TITLE; +--- 5745,5761 ---- + * Convert the keys in 'what' to quickfix list property flags. + */ + static int +! qf_getprop_keys2flags(dict_T *what, int loclist) + { + int flags = QF_GETLIST_NONE; + + if (dict_find(what, (char_u *)"all", -1) != NULL) ++ { + flags |= QF_GETLIST_ALL; ++ if (!loclist) ++ // File window ID is applicable only to location list windows ++ flags &= ~ QF_GETLIST_FILEWINID; ++ } + + if (dict_find(what, (char_u *)"title", -1) != NULL) + flags |= QF_GETLIST_TITLE; +*************** +*** 5778,5783 **** +--- 5784,5792 ---- + if (dict_find(what, (char_u *)"changedtick", -1) != NULL) + flags |= QF_GETLIST_TICK; + ++ if (loclist && dict_find(what, (char_u *)"filewinid", -1) != NULL) ++ flags |= QF_GETLIST_FILEWINID; ++ + return flags; + } + +*************** +*** 5870,5875 **** +--- 5879,5886 ---- + status = dict_add_number(retdict, "size", 0); + if ((status == OK) && (flags & QF_GETLIST_TICK)) + status = dict_add_number(retdict, "changedtick", 0); ++ if ((status == OK) && (qi != &ql_info) && (flags & QF_GETLIST_FILEWINID)) ++ status = dict_add_number(retdict, "filewinid", 0); + + return status; + } +*************** +*** 5884,5889 **** +--- 5895,5920 ---- + } + + /* ++ * Returns the identifier of the window used to display files from a location ++ * list. If there is no associated window, then returns 0. Useful only when ++ * called from a location list window. ++ */ ++ static int ++ qf_getprop_filewinid(win_T *wp, qf_info_T *qi, dict_T *retdict) ++ { ++ int winid = 0; ++ ++ if (wp != NULL && IS_LL_WINDOW(wp)) ++ { ++ win_T *ll_wp = qf_find_win_with_loclist(qi); ++ if (ll_wp != NULL) ++ winid = ll_wp->w_id; ++ } ++ ++ return dict_add_number(retdict, "filewinid", winid); ++ } ++ ++ /* + * Return the quickfix list items/entries as 'items' in retdict + */ + static int +*************** +*** 5963,5969 **** + if (wp != NULL) + qi = GET_LOC_LIST(wp); + +! flags = qf_getprop_keys2flags(what); + + if (qi != NULL && qi->qf_listcount != 0) + qf_idx = qf_getprop_qfidx(qi, what); +--- 5994,6000 ---- + if (wp != NULL) + qi = GET_LOC_LIST(wp); + +! flags = qf_getprop_keys2flags(what, (wp != NULL)); + + if (qi != NULL && qi->qf_listcount != 0) + qf_idx = qf_getprop_qfidx(qi, what); +*************** +*** 5992,5997 **** +--- 6023,6030 ---- + if ((status == OK) && (flags & QF_GETLIST_TICK)) + status = dict_add_number(retdict, "changedtick", + qi->qf_lists[qf_idx].qf_changedtick); ++ if ((status == OK) && (wp != NULL) && (flags & QF_GETLIST_FILEWINID)) ++ status = qf_getprop_filewinid(wp, qi, retdict); + + return status; + } +*** ../vim-8.1.0344/src/testdir/test_quickfix.vim 2018-08-30 15:58:23.244944556 +0200 +--- src/testdir/test_quickfix.vim 2018-09-02 15:13:00.638419373 +0200 +*************** +*** 1973,1978 **** +--- 1973,1990 ---- + call g:Xsetlist([], 'r', {'items' : [{'filename' : 'F1', 'lnum' : 10, 'text' : 'L10'}]}) + call assert_equal('TestTitle', g:Xgetlist({'title' : 1}).title) + ++ " Test for getting id of window associated with a location list window ++ if a:cchar == 'l' ++ only ++ call assert_equal(0, g:Xgetlist({'all' : 1}).filewinid) ++ let wid = win_getid() ++ Xopen ++ call assert_equal(wid, g:Xgetlist({'filewinid' : 1}).filewinid) ++ wincmd w ++ call assert_equal(0, g:Xgetlist({'filewinid' : 1}).filewinid) ++ only ++ endif ++ + " The following used to crash Vim with address sanitizer + call g:Xsetlist([], 'f') + call g:Xsetlist([], 'a', {'items' : [{'filename':'F1', 'lnum':10}]}) +*************** +*** 3000,3006 **** + call assert_equal('', g:Xgetlist({'title' : 0}).title) + call assert_equal(0, g:Xgetlist({'winid' : 0}).winid) + call assert_equal(0, g:Xgetlist({'changedtick' : 0}).changedtick) +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, 'changedtick': 0}, g:Xgetlist({'all' : 0})) + + " Quickfix window with empty stack + silent! Xopen +--- 3012,3028 ---- + call assert_equal('', g:Xgetlist({'title' : 0}).title) + call assert_equal(0, g:Xgetlist({'winid' : 0}).winid) + call assert_equal(0, g:Xgetlist({'changedtick' : 0}).changedtick) +! if a:cchar == 'c' +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, +! \ 'items' : [], 'nr' : 0, 'size' : 0, +! \ 'title' : '', 'winid' : 0, 'changedtick': 0}, +! \ g:Xgetlist({'all' : 0})) +! else +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, +! \ 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', +! \ 'winid' : 0, 'changedtick': 0, 'filewinid' : 0}, +! \ g:Xgetlist({'all' : 0})) +! endif + + " Quickfix window with empty stack + silent! Xopen +*************** +*** 3033,3039 **** + call assert_equal('', g:Xgetlist({'id' : qfid, 'title' : 0}).title) + call assert_equal(0, g:Xgetlist({'id' : qfid, 'winid' : 0}).winid) + call assert_equal(0, g:Xgetlist({'id' : qfid, 'changedtick' : 0}).changedtick) +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, 'changedtick' : 0}, g:Xgetlist({'id' : qfid, 'all' : 0})) + + " Non-existing quickfix list number + call assert_equal('', g:Xgetlist({'nr' : 5, 'context' : 0}).context) +--- 3055,3070 ---- + call assert_equal('', g:Xgetlist({'id' : qfid, 'title' : 0}).title) + call assert_equal(0, g:Xgetlist({'id' : qfid, 'winid' : 0}).winid) + call assert_equal(0, g:Xgetlist({'id' : qfid, 'changedtick' : 0}).changedtick) +! if a:cchar == 'c' +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], +! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, +! \ 'changedtick' : 0}, g:Xgetlist({'id' : qfid, 'all' : 0})) +! else +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], +! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, +! \ 'changedtick' : 0, 'filewinid' : 0}, +! \ g:Xgetlist({'id' : qfid, 'all' : 0})) +! endif + + " Non-existing quickfix list number + call assert_equal('', g:Xgetlist({'nr' : 5, 'context' : 0}).context) +*************** +*** 3045,3051 **** + call assert_equal('', g:Xgetlist({'nr' : 5, 'title' : 0}).title) + call assert_equal(0, g:Xgetlist({'nr' : 5, 'winid' : 0}).winid) + call assert_equal(0, g:Xgetlist({'nr' : 5, 'changedtick' : 0}).changedtick) +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, 'changedtick' : 0}, g:Xgetlist({'nr' : 5, 'all' : 0})) + endfunc + + func Test_getqflist() +--- 3076,3091 ---- + call assert_equal('', g:Xgetlist({'nr' : 5, 'title' : 0}).title) + call assert_equal(0, g:Xgetlist({'nr' : 5, 'winid' : 0}).winid) + call assert_equal(0, g:Xgetlist({'nr' : 5, 'changedtick' : 0}).changedtick) +! if a:cchar == 'c' +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], +! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, +! \ 'changedtick' : 0}, g:Xgetlist({'nr' : 5, 'all' : 0})) +! else +! call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], +! \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, +! \ 'changedtick' : 0, 'filewinid' : 0}, +! \ g:Xgetlist({'nr' : 5, 'all' : 0})) +! endif + endfunc + + func Test_getqflist() +*** ../vim-8.1.0344/src/version.c 2018-09-02 15:07:21.977655529 +0200 +--- src/version.c 2018-09-02 15:14:57.573305935 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 345, + /**/ + +-- +The Feynman problem solving Algorithm: + 1) Write down the problem + 2) Think real hard + 3) Write down the answer + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0346 b/data/vim/patches/8.1.0346 new file mode 100644 index 000000000..49215092c --- /dev/null +++ b/data/vim/patches/8.1.0346 @@ -0,0 +1,1530 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0346 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0346 +Problem: Building with Aap is outdated and unused. +Solution: Remove the Aap build files. +Files: Filelist, src/main.aap, src/testdir/main.aap, src/config.aap.in, + runtime/macros/maze/main.aap + + +*** ../vim-8.1.0345/Filelist 2018-07-07 17:21:49.120140280 +0200 +--- Filelist 2018-09-02 15:24:34.374543708 +0200 +*************** +*** 1,5 **** + # List of distributed Vim files. +! # Used by Makefile and upload.aap. + + # source files for all source archives + SRC_ALL = \ +--- 1,5 ---- + # List of distributed Vim files. +! # Used by Makefile. + + # source files for all source archives + SRC_ALL = \ +*************** +*** 101,109 **** + src/window.c \ + src/tee/tee.c \ + src/xxd/xxd.c \ +- src/main.aap \ + src/testdir/gen_opt_test.vim \ +- src/testdir/main.aap \ + src/testdir/README.txt \ + src/testdir/Make_all.mak \ + src/testdir/*.in \ +--- 101,107 ---- +*************** +*** 291,297 **** + src/INSTALLx.txt \ + src/Makefile \ + src/auto/configure \ +- src/config.aap.in \ + src/config.h.in \ + src/config.mk.dist \ + src/config.mk.in \ +--- 289,294 ---- +*************** +*** 612,618 **** + runtime/macros/matchit.vim \ + runtime/macros/maze/README.txt \ + runtime/macros/maze/[mM]akefile \ +- runtime/macros/maze/main.aap \ + runtime/macros/maze/maze.c \ + runtime/macros/maze/maze_5.78 \ + runtime/macros/maze/maze_mac \ +--- 609,614 ---- +*************** +*** 640,645 **** +--- 636,642 ---- + runtime/tutor/tutor \ + runtime/tutor/tutor.vim \ + runtime/vimrc_example.vim \ ++ runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \ + runtime/pack/dist/opt/dvorak/plugin/dvorak.vim \ + runtime/pack/dist/opt/dvorak/dvorak/enable.vim \ + runtime/pack/dist/opt/dvorak/dvorak/disable.vim \ +*** ../vim-8.1.0345/src/main.aap 2016-11-12 20:10:45.000000000 +0100 +--- src/main.aap 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,1228 **** +- # A-A-P recipe for building Vim +- # +- # There are no user choices in here! +- # Put configure arguments in the file config.arg. +- # Later there will be a config.txt file that contains examples and +- # explanations. +- # +- # Optional arguments: +- # PREFIX=dir Overrules the install directory. +- # Can be specified when installing only. +- # Example: aap install PREFIX=$HOME +- # +- @if os.name != "posix": +- :error Sorry, this recipe only works for Unix-like systems. +- +- # Skip the configure stuff when "link.sh" is executing this recipe recursively +- # to build pathdef.c or not building something and auto/config.aap does exist. +- @if ((_no.TARGETARG != "pathdef" and has_build_target()) +- @ or not os.path.exists("auto/config.aap")): +- +- # +- # A U T O C O N F +- # +- +- # Run autoconf when configure.ac has been changed since it was last run. +- # This is skipped when the signatures in "mysign" are up-to-date. When +- # there is no autoconf program skip this (the signature is often the only +- # thing that's outdated) +- auto/configure {signfile = mysign} : configure.ac +- @if not program_path("autoconf"): +- :print Can't find autoconf, using existing configure script. +- @else: +- # Move configure aside, autoconf would overwrite it +- :move {exist} configure configure.save +- :sys autoconf +- :cat configure | :eval re.sub('\\./config.log', 'auto/config.log', stdin) | :eval re.sub('>config.log', '>auto/config.log', stdin) >! auto/configure +- :chmod 755 auto/configure +- :move configure.save configure +- :del {force} auto/config.cache auto/config.status +- +- # Change the configure script to produce config.aap instead of config.mk. +- auto/configure.aap : auto/configure +- :print Adjusting auto/configure for A-A-P. +- :cat auto/configure | :eval re.sub("config.mk", "config.aap", stdin) +- >! auto/configure.aap +- :chmod 755 auto/configure.aap +- +- # The configure script uses the directory where it's located, use a link. +- configure.aap: {buildcheck=} +- :symlink {f} auto/configure.aap configure.aap +- +- # Dependency: run configure.aap to update config.h and config.aap in the +- # "auto" directory. +- # NOTE: we can only build for one architecture, because -MM doesn't work +- # when building for both. +- config {virtual} auto/config.h auto/config.aap : +- auto/configure.aap configure.aap +- config.arg config.h.in config.aap.in +- # Use "uname -a" to detect the architecture of the system. +- @ok, uname = redir_system('uname -a', 0) +- @if string.find(uname, "i386") >= 0: +- @ arch = "i386" +- @else: +- @ arch = "ppc" +- :print Building for $arch system +- config_args = `file2string("config.arg")` +- :sys CONFIG_STATUS=auto/config.status +- ./configure.aap $config_args +- --with-mac-arch=$arch +- --cache-file=auto/config.cache +- +- # Configure arguments: create an empty "config.arg" file when it's missing +- config.arg: +- :touch {exist} config.arg +- +- # "auto/config.aap" contains a lot of settings, such as the name of the +- # executable "Target". +- # First update it, forcefully if the "reconfig" target was used. +- @if _no.TARGETARG != "comment" and _no.TARGETARG != "make": +- @if "reconfig" in var2list(_no.TARGETARG): +- :del {force} auto/config.cache auto/config.status +- :update {force} auto/config.aap +- @else: +- :update auto/config.aap +- +- # Include the recipe that autoconf generated. +- :include auto/config.aap +- +- # Unfortunately "-M" doesn't work when building for two architectures. Switch +- # back to PPC only. +- @if string.find(_no.CPPFLAGS, "-arch i386 -arch ppc") >= 0: +- CPPFLAGS = `string.replace(_no.CPPFLAGS, "-arch i386 -arch ppc", "-arch ppc")` +- +- # A "PREFIX=dir" argument overrules the value of $prefix +- # But don't use the default "/usr/local". +- @if _no.get("PREFIX") and _no.get("PREFIX") != '/usr/local': +- prefix = $PREFIX +- +- # Don't want "~/" in prefix. +- prefix = `os.path.expanduser(prefix)` +- +- # For Mac. +- APPDIR = $(VIMNAME).app +- +- ### Names of the programs and targets +- VIMTARGET = $VIMNAME$EXESUF +- EXTARGET = $EXNAME$LNKSUF +- VIEWTARGET = $VIEWNAME$LNKSUF +- GVIMNAME = g$VIMNAME +- GVIMTARGET = $GVIMNAME$LNKSUF +- GVIEWNAME = g$VIEWNAME +- GVIEWTARGET = $GVIEWNAME$LNKSUF +- RVIMNAME = r$VIMNAME +- RVIMTARGET = $RVIMNAME$LNKSUF +- RVIEWNAME = r$VIEWNAME +- RVIEWTARGET = $RVIEWNAME$LNKSUF +- RGVIMNAME = r$GVIMNAME +- RGVIMTARGET = $RGVIMNAME$LNKSUF +- RGVIEWNAME = r$GVIEWNAME +- RGVIEWTARGET = $RGVIEWNAME$LNKSUF +- VIMDIFFNAME = $(VIMNAME)diff +- GVIMDIFFNAME = g$VIMDIFFNAME +- VIMDIFFTARGET = $VIMDIFFNAME$LNKSUF +- GVIMDIFFTARGET = $GVIMDIFFNAME$LNKSUF +- EVIMNAME = e$VIMNAME +- EVIMTARGET = $EVIMNAME$LNKSUF +- EVIEWNAME = e$VIEWNAME +- EVIEWTARGET = $EVIEWNAME$LNKSUF +- +- # +- # G U I variant +- # +- # The GUI is selected by configure, a lot of other things depend on it. +- # +- :variant GUI +- GTK +- GUI_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_beval.c +- gui_gtk_f.c +- GUI_OBJ = +- GUI_DEFS = -DFEAT_GUI_GTK $NARROW_PROTO +- GUI_IPATH = $GUI_INC_LOC +- GUI_LIBS_DIR = $GUI_LIB_LOC +- GUI_LIBS1 = +- GUI_LIBS2 = $GTK_LIBNAME +- GUI_INSTALL = install_normal +- GUI_TARGETS = installglinks +- GUI_MAN_TARGETS = yes +- GUI_TESTTARGET = gui +- GUI_BUNDLE = +- GUI_TESTARG = +- MOTIF +- GUI_SRC = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c +- gui_xmdlg.c gui_xmebw.c +- GUI_OBJ = +- GUI_DEFS = -DFEAT_GUI_MOTIF $NARROW_PROTO +- GUI_IPATH = $GUI_INC_LOC +- GUI_LIBS_DIR = $GUI_LIB_LOC +- GUI_LIBS1 = +- GUI_LIBS2 = $MOTIF_LIBNAME -lXt +- GUI_INSTALL = install_normal +- GUI_TARGETS = installglinks +- GUI_MAN_TARGETS = yes +- GUI_TESTTARGET = gui +- GUI_BUNDLE = +- GUI_TESTARG = +- ATHENA +- # XAW_LIB et al. can be overruled to use Xaw3d widgets +- XAW_LIB ?= -lXaw +- GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c \ +- gui_at_sb.c gui_at_fs.c +- GUI_OBJ = +- GUI_DEFS = -DFEAT_GUI_ATHENA $NARROW_PROTO +- GUI_IPATH = $GUI_INC_LOC +- GUI_LIBS_DIR = $GUI_LIB_LOC +- GUI_LIBS1 = $XAW_LIB +- GUI_LIBS2 = -lXt +- GUI_INSTALL = install_normal +- GUI_TARGETS = installglinks +- GUI_MAN_TARGETS = yes +- GUI_TESTTARGET = gui +- GUI_BUNDLE = +- GUI_TESTARG = +- NEXTAW +- # XAW_LIB et al. can be overruled to use Xaw3d widgets +- XAW_LIB ?= -lXaw +- GUI_SRC = gui.c gui_athena.c gui_x11.c pty.c gui_beval.c +- gui_at_fs.c +- GUI_OBJ = +- GUI_DEFS = -DFEAT_GUI_ATHENA -DFEAT_GUI_NEXTAW $NARROW_PROTO +- GUI_IPATH = $GUI_INC_LOC +- GUI_LIBS_DIR = $GUI_LIB_LOC +- GUI_LIBS1 = $NEXTAW_LIB +- GUI_LIBS2 = -lXt +- GUI_INSTALL = install_normal +- GUI_TARGETS = installglinks +- GUI_MAN_TARGETS = yes +- GUI_TESTTARGET = gui +- GUI_BUNDLE = +- GUI_TESTARG = +- CARBONGUI +- GUI_SRC = gui.c gui_mac.c pty.c +- GUI_OBJ = +- GUI_DEFS = -DFEAT_GUI_MAC -fno-common -fpascal-strings \ +- -Wall -Wno-unknown-pragmas -mdynamic-no-pic -pipe +- GUI_IPATH = $GUI_INC_LOC +- GUI_LIBS_DIR = $GUI_LIB_LOC +- GUI_LIBS1 = -framework Carbon +- GUI_LIBS2 = +- GUI_INSTALL = install_macosx +- GUI_TARGETS = installglinks +- GUI_MAN_TARGETS = yes +- GUI_TESTTARGET = gui +- GUI_BUNDLE = gui_bundle +- GUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET) +- PHOTONGUI +- GUI_SRC = gui.c gui_photon.c pty.c +- GUI_OBJ = +- GUI_DEFS = -DFEAT_GUI_PHOTON +- GUI_IPATH = +- GUI_LIBS_DIR = +- GUI_LIBS1 = -lph -lphexlib +- GUI_LIBS2 = +- GUI_INSTALL = install_normal +- GUI_TARGETS = installglinks +- GUI_MAN_TARGETS = yes +- GUI_TESTTARGET = gui +- GUI_BUNDLE = +- GUI_TESTARG = +- * +- GUI_SRC = +- GUI_OBJ = +- GUI_DEFS = +- GUI_IPATH = +- GUI_LIBS_DIR = +- GUI_LIBS1 = +- GUI_LIBS2 = +- GUI_INSTALL = install_normal +- GUI_TARGETS = +- GUI_MAN_TARGETS = +- GUI_TESTTARGET = +- GUI_BUNDLE = +- GUI_TESTARG = +- +- +- PRE_DEFS = -Iproto -I. $DEFS $GUI_DEFS $GUI_IPATH $CPPFLAGS $?(EXTRA_IPATHS) +- POST_DEFS = $X_CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $?(EXTRA_DEFS) +- CFLAGS = $PRE_DEFS $CONF_CFLAGS $?(PROFILE_CFLAGS) $POST_DEFS +- CPPFLAGS = +- +- ALL_LIB_DIRS = $GUI_LIBS_DIR $X_LIBS_DIR +- LDFLAGS = $ALL_LIB_DIRS $CONF_LDFLAGS +- LIBS = $GUI_LIBS1 $GUI_X_LIBS $GUI_LIBS2 $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $CONF_LIBS $?(EXTRA_LIBS) $LUA_LIBS $MZSCHEME_LIBS $PERL_LIBS $PYTHON_LIBS $TCL_LIBS $RUBY_LIBS $?(PROFILE_LIBS) +- +- Target = $VIMNAME +- +- # reconfig target also builds Vim (reconfiguration is handled above). +- reconfig {virtual}: $Target +- +- distclean: clean +- :del {force} auto/config.h auto/config.aap +- :del {force} auto/config.cache auto/config.status +- +- +- # Execute the test scripts. Run these after compiling Vim, before installing. +- # +- # This will produce a lot of garbage on your screen, including a few error +- # messages. Don't worry about that. +- # If there is a real error, there will be a difference between "test.out" and +- # a "test99.ok" file. +- # If everything is alright, the final message will be "ALL DONE". If not you +- # get "TEST FAILURE". +- # +- test check: +- VimProg = ../$Target +- :execute testdir/main.aap $GUI_TESTTARGET $GUI_TESTARG +- +- testclean {virtual}: +- :del {force} testdir/*.out testdir/test.log +- +- # When no fetch target exists we are not a child of the ../main.aap recipe, +- # Use ../main.aap to do the fetching. +- # --- If you get an error here for wrong number of arguments, you need to +- # update to a newer version of A-A-P. +- @if not has_target("fetch"): +- fetch: +- :execute ../main.aap fetch +- +- +- # All the source files that need to be compiled. +- # Some are optional and depend on configure. +- # "version.c" is missing, it's always compiled (see below). +- Source = +- blowfish.c +- buffer.c +- charset.c +- diff.c +- digraph.c +- edit.c +- eval.c +- ex_cmds.c +- ex_cmds2.c +- ex_docmd.c +- ex_eval.c +- ex_getln.c +- fileio.c +- fold.c +- getchar.c +- hardcopy.c +- hashtab.c +- if_cscope.c +- if_xcmdsrv.c +- main.c +- mark.c +- memfile.c +- memline.c +- menu.c +- message.c +- misc1.c +- misc2.c +- move.c +- mbyte.c +- normal.c +- ops.c +- option.c +- os_unix.c +- auto/pathdef.c +- popupmnu.c +- quickfix.c +- regexp.c +- screen.c +- search.c +- sha256.c +- spell.c +- syntax.c +- tag.c +- term.c +- ui.c +- undo.c +- window.c +- $OS_EXTRA_SRC +- $GUI_SRC +- $HANGULIN_SRC +- $LUA_SRC +- $MZSCHEME_SRC +- $PERL_SRC +- $NETBEANS_SRC +- $PYTHON_SRC +- $TCL_SRC +- $RUBY_SRC +- $WORKSHOP_SRC +- +- Objects = +- $GUI_OBJ +- +- # TODO: make is still used for subdirectories, need to write a recipe. +- MAKE ?= make +- +- all: $Target $GUI_BUNDLE +- +- # This dependency is required to build auto/osdef.h before automatic +- # dependencies are generated. +- $Source version.c : auto/osdef.h +- +- # Need to mention that the target also depends on version.c, since it's not +- # included in $Source +- $Target : version.c +- +- # Some sources are to be found in the "auto" directory. +- SRCPATH += auto +- +- # When building Vim always compile version.c to get the timestamp. +- :filetype +- declare my_prog +- :attr {filetype = my_prog} $Target +- +- :program $Target : $Source $Objects +- +- :action build my_prog object +- version_obj = `src2obj("version.c")` +- :do compile {target = $version_obj} version.c +- #:do build {target = $target {filetype = program}} $source $version_obj +- link_sed = $BDIR/link.sed +- @if os.path.exists(link_sed): +- :move {force} $link_sed auto/link.sed +- @else: +- :del {force} auto/link.sed +- :update link2.sh +- :sys LINK="$?(PURIFY) $?(SHRPENV) $CC $LDFLAGS \ +- -o $target $source $version_obj $LIBS" \ +- MAKE="aap" sh ./link2.sh +- :copy {force} auto/link.sed $BDIR/link.sed +- +- # "link.sh" must be modified for A-A-P +- link2.sh : link.sh +- :print Adjusting $-source for A-A-P. +- :cat $source | :eval re.sub("objects/pathdef.o", "pathdef", stdin) +- >! $target +- +- xxd/xxd$EXESUF: xxd/xxd.c +- :sys cd xxd; CC="$CC" CFLAGS="$CPPFLAGS $CFLAGS" \ +- $MAKE -f Makefile +- +- # Build the language specific files if they were unpacked. +- # Generate the converted .mo files separately, it's no problem if this fails. +- languages {virtual}: +- @if _no.MAKEMO: +- :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix +- @try: +- :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix converted +- @except: +- :print Generated converted language files failed, continuing +- +- # Update the *.po files for changes in the sources. Only run manually. +- update-po {virtual}: +- cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix update-po +- +- auto/if_perl.c: if_perl.xs +- :sys $PERL -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $target +- :sys $PERL $PERLLIB/ExtUtils/xsubpp -prototypes -typemap \ +- $PERLLIB/ExtUtils/typemap if_perl.xs >> $target +- +- auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in +- :sys CC="$CC $CFLAGS" srcdir=$srcdir sh $srcdir/osdef.sh +- +- pathdef {virtual} : $BDIR/auto/pathdef$OBJSUF +- +- auto/pathdef.c: auto/config.aap +- :print Creating $target +- :print >! $target /* pathdef.c */ +- :print >> $target /* This file is automatically created by main.aap */ +- :print >> $target /* DO NOT EDIT! Change main.aap only. */ +- :print >> $target $#include "vim.h" +- :print >> $target char_u *default_vim_dir = (char_u *)"$VIMRCLOC"; +- :print >> $target char_u *default_vimruntime_dir = (char_u *)"$?VIMRUNTIMEDIR"; +- v = $CC -c -I$srcdir $CFLAGS +- @v = string.replace(v, '"', '\\"') +- :print >> $target char_u *all_cflags = (char_u *)"$v"; +- linkcmd = $CC $LDFLAGS -o $VIMTARGET $LIBS +- link_sed = $BDIR/link.sed +- @if os.path.exists(link_sed): +- # filter $linkcmd through $BDIR/link.sed +- :print $linkcmd | :syseval sed -f $link_sed | :eval re.sub("\n", "", stdin) | :assign linkcmd +- @linkcmd = string.replace(linkcmd, '"', '\\"') +- :print >> $target char_u *all_lflags = (char_u *)"$linkcmd"; +- @if _no.get("COMPILEDBY"): +- who = $COMPILEDBY +- where = +- @else: +- :syseval whoami | :eval re.sub("\n", "", stdin) | :assign who +- +- :syseval hostname | :eval re.sub("\n", "", stdin) | :assign where +- @who = string.replace(who, '"', '\\"') +- @where = string.replace(where, '"', '\\"') +- :print >> $target char_u *compiled_user = (char_u *)"$who"; +- :print >> $target char_u *compiled_sys = (char_u *)"$where"; +- +- +- ### Names of the tools that are also made +- TOOLS = xxd/xxd$EXESUF +- +- # Root of the installation tree. Empty for a normal install, set to an +- # existing path to install into a special place (for generating a package). +- DESTDIR ?= +- +- ### Location of man pages under $MANTOPDIR +- MAN1DIR = /man1 +- +- ### Location of Vim files (should not need to be changed, and +- ### some things might not work when they are changed!) +- VIMDIR = /vim +- @r = re.compile('.*VIM_VERSION_NODOT\\s*"(vim\\d\\d[^"]*)".*', re.S) +- VIMRTDIR = /`r.match(open("version.h").read()).group(1)` +- HELPSUBDIR = /doc +- COLSUBDIR = /colors +- SYNSUBDIR = /syntax +- INDSUBDIR = /indent +- AUTOSUBDIR = /autoload +- PLUGSUBDIR = /plugin +- FTPLUGSUBDIR = /ftplugin +- LANGSUBDIR = /lang +- COMPSUBDIR = /compiler +- KMAPSUBDIR = /keymap +- MACROSUBDIR = /macros +- TOOLSSUBDIR = /tools +- TUTORSUBDIR = /tutor +- SPELLSUBDIR = /spell +- PRINTSUBDIR = /print +- PODIR = po +- +- ### VIMLOC common root of the Vim files (all versions) +- ### VIMRTLOC common root of the runtime Vim files (this version) +- ### VIMRCLOC compiled-in location for global [g]vimrc files (all versions) +- ### VIMRUNTIMEDIR compiled-in location for runtime files (optional) +- ### HELPSUBLOC location for help files +- ### COLSUBLOC location for colorscheme files +- ### SYNSUBLOC location for syntax files +- ### INDSUBLOC location for indent files +- ### AUTOSUBLOC location for standard autoload files +- ### PLUGSUBLOC location for standard plugin files +- ### FTPLUGSUBLOC location for ftplugin files +- ### LANGSUBLOC location for language files +- ### COMPSUBLOC location for compiler files +- ### KMAPSUBLOC location for keymap files +- ### MACROSUBLOC location for macro files +- ### TOOLSSUBLOC location for tools files +- ### TUTORSUBLOC location for tutor files +- ### PRINTSUBLOC location for print files +- ### SCRIPTLOC location for script files (menu.vim, bugreport.vim, ..) +- ### You can override these if you want to install them somewhere else. +- ### Edit feature.h for compile-time settings. +- VIMLOC = $DATADIR$VIMDIR +- @if not _no.get("VIMRTLOC"): +- VIMRTLOC = $DATADIR$VIMDIR$VIMRTDIR +- VIMRCLOC = $VIMLOC +- HELPSUBLOC = $VIMRTLOC$HELPSUBDIR +- COLSUBLOC = $VIMRTLOC$COLSUBDIR +- SYNSUBLOC = $VIMRTLOC$SYNSUBDIR +- INDSUBLOC = $VIMRTLOC$INDSUBDIR +- AUTOSUBLOC = $VIMRTLOC$AUTOSUBDIR +- PLUGSUBLOC = $VIMRTLOC$PLUGSUBDIR +- FTPLUGSUBLOC = $VIMRTLOC$FTPLUGSUBDIR +- LANGSUBLOC = $VIMRTLOC$LANGSUBDIR +- COMPSUBLOC = $VIMRTLOC$COMPSUBDIR +- KMAPSUBLOC = $VIMRTLOC$KMAPSUBDIR +- MACROSUBLOC = $VIMRTLOC$MACROSUBDIR +- TOOLSSUBLOC = $VIMRTLOC$TOOLSSUBDIR +- TUTORSUBLOC = $VIMRTLOC$TUTORSUBDIR +- SPELLSUBLOC = $VIMRTLOC$SPELLSUBDIR +- PRINTSUBLOC = $VIMRTLOC$PRINTSUBDIR +- SCRIPTLOC = $VIMRTLOC +- +- ### Only set VIMRUNTIMEDIR when VIMRTLOC is set to a different location and +- ### the runtime directory is not below it. +- #VIMRUNTIMEDIR = $VIMRTLOC +- +- ### Name of the evim file target. +- EVIM_FILE = $DESTDIR$SCRIPTLOC/evim.vim +- MSWIN_FILE = $DESTDIR$SCRIPTLOC/mswin.vim +- +- ### Name of the menu file target. +- SYS_MENU_FILE = $DESTDIR$SCRIPTLOC/menu.vim +- SYS_SYNMENU_FILE = $DESTDIR$SCRIPTLOC/synmenu.vim +- SYS_DELMENU_FILE = $DESTDIR$SCRIPTLOC/delmenu.vim +- +- ### Name of the bugreport file target. +- SYS_BUGR_FILE = $DESTDIR$SCRIPTLOC/bugreport.vim +- +- ### Name of the file type detection file target. +- SYS_FILETYPE_FILE = $DESTDIR$SCRIPTLOC/filetype.vim +- +- ### Name of the file type detection file target. +- SYS_FTOFF_FILE = $DESTDIR$SCRIPTLOC/ftoff.vim +- +- ### Name of the file type detection script file target. +- SYS_SCRIPTS_FILE = $DESTDIR$SCRIPTLOC/scripts.vim +- +- ### Name of the ftplugin-on file target. +- SYS_FTPLUGIN_FILE = $DESTDIR$SCRIPTLOC/ftplugin.vim +- +- ### Name of the ftplugin-off file target. +- SYS_FTPLUGOF_FILE = $DESTDIR$SCRIPTLOC/ftplugof.vim +- +- ### Name of the indent-on file target. +- SYS_INDENT_FILE = $DESTDIR$SCRIPTLOC/indent.vim +- +- ### Name of the indent-off file target. +- SYS_INDOFF_FILE = $DESTDIR$SCRIPTLOC/indoff.vim +- +- ### Name of the option window script file target. +- SYS_OPTWIN_FILE = $DESTDIR$SCRIPTLOC/optwin.vim +- +- ### Permissions for binaries +- BINMOD = 755 +- +- ### Permissions for man page +- MANMOD = 644 +- +- ### Permissions for help files +- HELPMOD = 644 +- +- ### Permissions for Perl and shell scripts +- SCRIPTMOD = 755 +- +- ### Permission for Vim script files (menu.vim, bugreport.vim, ..) +- VIMSCRIPTMOD = 644 +- +- ### Permissions for all directories that are created +- DIRMOD = 755 +- +- ### Permissions for all other files that are created +- FILEMOD = 644 +- +- # Where to copy the man and help files from +- HELPSOURCE = ../runtime/doc +- +- # Where to copy the script files from (menu, bugreport) +- SCRIPTSOURCE = ../runtime +- +- # Where to copy the colorscheme files from +- COLSOURCE = ../runtime/colors +- +- # Where to copy the syntax files from +- SYNSOURCE = ../runtime/syntax +- +- # Where to copy the indent files from +- INDSOURCE = ../runtime/indent +- +- # Where to copy the standard plugin files from +- AUTOSOURCE = ../runtime/autoload +- +- # Where to copy the standard plugin files from +- PLUGSOURCE = ../runtime/plugin +- +- # Where to copy the ftplugin files from +- FTPLUGSOURCE = ../runtime/ftplugin +- +- # Where to copy the macro files from +- MACROSOURCE = ../runtime/macros +- +- # Where to copy the tools files from +- TOOLSSOURCE = ../runtime/tools +- +- # Where to copy the tutor files from +- TUTORSOURCE = ../runtime/tutor +- +- # Where to copy the spell files from +- SPELLSOURCE = ../runtime/spell +- +- # Where to look for language specific files +- LANGSOURCE = ../runtime/lang +- +- # Where to look for compiler files +- COMPSOURCE = ../runtime/compiler +- +- # Where to look for keymap files +- KMAPSOURCE = ../runtime/keymap +- +- # Where to look for print resource files +- PRINTSOURCE = ../runtime/print +- +- # abbreviations +- DEST_BIN = $DESTDIR$BINDIR +- DEST_VIM = $DESTDIR$VIMLOC +- DEST_RT = $DESTDIR$VIMRTLOC +- DEST_HELP = $DESTDIR$HELPSUBLOC +- DEST_COL = $DESTDIR$COLSUBLOC +- DEST_SYN = $DESTDIR$SYNSUBLOC +- DEST_IND = $DESTDIR$INDSUBLOC +- DEST_AUTO = $DESTDIR$AUTOSUBLOC +- DEST_PLUG = $DESTDIR$PLUGSUBLOC +- DEST_FTP = $DESTDIR$FTPLUGSUBLOC +- DEST_LANG = $DESTDIR$LANGSUBLOC +- DEST_COMP = $DESTDIR$COMPSUBLOC +- DEST_KMAP = $DESTDIR$KMAPSUBLOC +- DEST_MACRO = $DESTDIR$MACROSUBLOC +- DEST_TOOLS = $DESTDIR$TOOLSSUBLOC +- DEST_TUTOR = $DESTDIR$TUTORSUBLOC +- DEST_SPELL = $DESTDIR$SPELLSUBLOC +- DEST_SCRIPT = $DESTDIR$SCRIPTLOC +- DEST_PRINT = $DESTDIR$PRINTSUBLOC +- DEST_MAN_TOP = $DESTDIR$?(MANDIR) +- +- # We assume that the ".../man/xx/man1/" directory is for latin1 manual pages. +- # Some systems use UTF-8, but these should find the ".../man/xx.UTF-8/man1/" +- # directory first. +- # FreeBSD uses ".../man/xx.ISO8859-1/man1" for latin1, use that one too. +- DEST_MAN = $(DEST_MAN_TOP)$(MAN1DIR) +- DEST_MAN_FR = $(DEST_MAN_TOP)/fr$(MAN1DIR) +- DEST_MAN_FR_I = $(DEST_MAN_TOP)/fr.ISO8859-1$(MAN1DIR) +- DEST_MAN_FR_U = $(DEST_MAN_TOP)/fr.UTF-8$(MAN1DIR) +- DEST_MAN_IT = $(DEST_MAN_TOP)/it$(MAN1DIR) +- DEST_MAN_IT_I = $(DEST_MAN_TOP)/it.ISO8859-1$(MAN1DIR) +- DEST_MAN_IT_U = $(DEST_MAN_TOP)/it.UTF-8$(MAN1DIR) +- DEST_MAN_PL = $(DEST_MAN_TOP)/pl.ISO8859-2$(MAN1DIR) +- DEST_MAN_PL_U = $(DEST_MAN_TOP)/pl.UTF-8$(MAN1DIR) +- DEST_MAN_RU = $(DEST_MAN_TOP)/ru.KOI8-R$(MAN1DIR) +- DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR) +- +- # These are directories, create them when needed. +- :attr {directory = $DIRMOD} $DEST_BIN $DEST_VIM $DEST_RT $DEST_HELP $DEST_COL +- $DEST_SYN $DEST_IND $DEST_AUTO $DEST_AUTO/xml $DEST_PLUG +- $DEST_FTP $DEST_LANG +- $DEST_COMP $DEST_KMAP $DEST_MACRO $DEST_TOOLS $DEST_TUTOR +- $DEST_SCRIPT $DEST_PRINT $DEST_MAN $DEST_SPELL +- $DEST_MAN_FR $DEST_MAN_FR_I $DEST_MAN_FR_U $DEST_MAN_IT +- $DEST_MAN_IT_I $DEST_MAN_IT_U +- $DEST_MAN_PL $DEST_MAN_PL_U +- $DEST_MAN_RU $DEST_MAN_RU_U +- +- # +- # I N S T A L L +- # +- install: $GUI_INSTALL +- +- install_normal: +- @if not os.path.isdir(_no.DEST_BIN): +- @try: +- :mkdir $DEST_BIN +- @except: +- @ pass +- @if os.access(_no.DEST_BIN, os.W_OK): +- # Bin directory is writable, install directly. +- :update installvim installtools $INSTALL_LANGS install-icons +- @else: +- # Bin directory is not writable, need to become root. +- :print The destination directory "$DEST_BIN" is not writable. +- :print If this is the wrong directory, use PREFIX to specify another one. +- :print Otherwise, type the root password to continue installing. +- :asroot $AAP install +- +- installvim {virtual}: installvimbin installtutorbin \ +- installruntime installlinks installmanlinks +- +- installvimbin {virtual}{force}: $Target $DEST_BIN +- exe = $DEST_BIN/$VIMTARGET +- @if os.path.exists(exe): +- # Move the old executable aside and delete it. Any other method +- # may cause a crash if the executable is currently being used. +- :move {force} $exe $(exe).rm +- :del {force} $(exe).rm +- :copy $VIMTARGET $DEST_BIN +- :do strip $exe +- :chmod $BINMOD $DEST_BIN/$VIMTARGET +- # may create a link to the new executable from /usr/bin/vi +- @if _no.get("LINKIT"): +- :sys $LINKIT +- +- # Long list of arguments for the shell script that installs the manual pages +- # for one language. +- INSTALLMANARGS = $(VIMLOC) $(SCRIPTLOC) $(VIMRCLOC) $(HELPSOURCE) $(MANMOD) \ +- $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME) +- +- # Install most of the runtime files +- installruntime {virtual}: installrtbase installmacros installtutor installspell +- +- # install the help files; first adjust the contents for the location +- installrtbase {virtual}{force}: $HELPSOURCE/vim.1 $DEST_VIM +- $DEST_RT $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND +- $DEST_FTP $DEST_AUTO $DEST_AUTO/xml $DEST_PLUG $DEST_TUTOR +- $DEST_COMP $DEST_SPELL $DEST_PRINT +- :chmod 755 installman.sh +- :sys ./installman.sh install $(DEST_MAN) "" $(INSTALLMANARGS) +- +- :cd $HELPSOURCE +- @try: +- XTRA = `glob.glob("*.??x")` `glob.glob("tags-??")` +- @except: +- XTRA = # It's OK if there are no matches. +- :copy *.txt tags $XTRA $DEST_HELP +- :cd - +- :cd $DEST_HELP +- :chmod $HELPMOD *.txt tags $XTRA +- :cd - +- :copy $HELPSOURCE/*.pl $DEST_HELP +- :chmod $SCRIPTMOD $DEST_HELP/*.pl +- # install the menu files +- :copy $SCRIPTSOURCE/menu.vim $SYS_MENU_FILE +- :chmod $VIMSCRIPTMOD $SYS_MENU_FILE +- :copy $SCRIPTSOURCE/synmenu.vim $SYS_SYNMENU_FILE +- :chmod $VIMSCRIPTMOD $SYS_SYNMENU_FILE +- :copy $SCRIPTSOURCE/delmenu.vim $SYS_DELMENU_FILE +- :chmod $VIMSCRIPTMOD $SYS_DELMENU_FILE +- # install the evim file +- :copy $SCRIPTSOURCE/mswin.vim $MSWIN_FILE +- :chmod $VIMSCRIPTMOD $MSWIN_FILE +- :copy $SCRIPTSOURCE/evim.vim $EVIM_FILE +- :chmod $VIMSCRIPTMOD $EVIM_FILE +- # install the bugreport file +- :copy $SCRIPTSOURCE/bugreport.vim $SYS_BUGR_FILE +- :chmod $VIMSCRIPTMOD $SYS_BUGR_FILE +- # install the example vimrc files +- :copy $SCRIPTSOURCE/vimrc_example.vim $DEST_SCRIPT +- :chmod $VIMSCRIPTMOD $DEST_SCRIPT/vimrc_example.vim +- :copy $SCRIPTSOURCE/gvimrc_example.vim $DEST_SCRIPT +- :chmod $VIMSCRIPTMOD $DEST_SCRIPT/gvimrc_example.vim +- # install the file type detection files +- :copy $SCRIPTSOURCE/filetype.vim $SYS_FILETYPE_FILE +- :chmod $VIMSCRIPTMOD $SYS_FILETYPE_FILE +- :copy $SCRIPTSOURCE/ftoff.vim $SYS_FTOFF_FILE +- :chmod $VIMSCRIPTMOD $SYS_FTOFF_FILE +- :copy $SCRIPTSOURCE/scripts.vim $SYS_SCRIPTS_FILE +- :chmod $VIMSCRIPTMOD $SYS_SCRIPTS_FILE +- :copy $SCRIPTSOURCE/ftplugin.vim $SYS_FTPLUGIN_FILE +- :chmod $VIMSCRIPTMOD $SYS_FTPLUGIN_FILE +- :copy $SCRIPTSOURCE/ftplugof.vim $SYS_FTPLUGOF_FILE +- :chmod $VIMSCRIPTMOD $SYS_FTPLUGOF_FILE +- :copy $SCRIPTSOURCE/indent.vim $SYS_INDENT_FILE +- :chmod $VIMSCRIPTMOD $SYS_INDENT_FILE +- :copy $SCRIPTSOURCE/indoff.vim $SYS_INDOFF_FILE +- :chmod $VIMSCRIPTMOD $SYS_INDOFF_FILE +- :copy $SCRIPTSOURCE/optwin.vim $SYS_OPTWIN_FILE +- :chmod $VIMSCRIPTMOD $SYS_OPTWIN_FILE +- # install the print resource files +- :copy $PRINTSOURCE/*.ps $DEST_PRINT +- :chmod $FILEMOD $DEST_PRINT/*.ps +- # install the colorscheme files +- :copy $COLSOURCE/*.vim $COLSOURCE/README.txt $DEST_COL +- :chmod $HELPMOD $DEST_COL/*.vim $DEST_COL/README.txt +- # install the syntax files +- :copy $SYNSOURCE/*.vim $SYNSOURCE/README.txt $DEST_SYN +- :chmod $HELPMOD $DEST_SYN/*.vim $DEST_SYN/README.txt +- # install the indent files +- :copy $INDSOURCE/*.vim $INDSOURCE/README.txt $DEST_IND +- :chmod $HELPMOD $DEST_IND/*.vim +- # install the standard autoload files +- :copy $AUTOSOURCE/*.vim $AUTOSOURCE/README.txt $DEST_AUTO +- :chmod $HELPMOD $DEST_AUTO/*.vim $DEST_AUTO/README.txt +- :copy $AUTOSOURCE/xml/*.vim $DEST_AUTO/xml +- :chmod $HELPMOD $DEST_AUTO/xml/*.vim +- # install the standard plugin files +- :copy $PLUGSOURCE/*.vim $PLUGSOURCE/README.txt $DEST_PLUG +- :chmod $HELPMOD $DEST_PLUG/*.vim $DEST_PLUG/README.txt +- # install the ftplugin files +- :copy $FTPLUGSOURCE/*.vim $FTPLUGSOURCE/README.txt $DEST_FTP +- :chmod $HELPMOD $DEST_FTP/*.vim $DEST_FTP/README.txt +- # install the compiler files +- :copy $COMPSOURCE/*.vim $COMPSOURCE/README.txt $DEST_COMP +- :chmod $HELPMOD $DEST_COMP/*.vim $DEST_COMP/README.txt +- +- installmacros {virtual}{force}: $MACROSOURCE $DEST_VIM $DEST_RT $DEST_MACRO +- :copy {recursive}{force} $MACROSOURCE/* $DEST_MACRO +- # Delete any CVS and AAPDIR directories. +- # Use the ":tree" command if possible. It was added later, fall back +- # to using "find" when it doesn't work. +- @try: +- :tree $DEST_MACRO {dirname = CVS} +- :del {recursive} $name +- :tree $DEST_MACRO {dirname = AAPDIR} +- :del {recursive} $name +- :tree $DEST_MACRO {dirname = .*} +- :chmod $DIRMOD $name +- :tree $DEST_MACRO {filename = .*} +- :chmod $FILEMOD $name +- @except: +- @ ok, cvsdirs = redir_system('find %s -name CVS -print' % _no.DEST_MACRO) +- @ if ok and cvsdirs: +- :del {recursive} $cvsdirs +- :sys chmod $DIRMOD ``find $DEST_MACRO -type d -print`` +- :sys chmod $FILEMOD ``find $DEST_MACRO -type f -print`` +- :chmod $SCRIPTMOD $DEST_MACRO/less.sh +- +- # install the tutor files +- installtutorbin {virtual}{force}: $DEST_VIM +- :copy vimtutor $DEST_BIN/$(VIMNAME)tutor +- :chmod $SCRIPTMOD $DEST_BIN/$(VIMNAME)tutor +- +- installtutor {virtual}{force}: $DEST_RT $DEST_TUTOR +- :copy $TUTORSOURCE/tutor* $TUTORSOURCE/README* $DEST_TUTOR +- :chmod $HELPMOD $DEST_TUTOR/* +- +- # Install the spell files, if they exist. This assumes at least the English +- # spell file is there. +- installspell {virtual}: $(DEST_VIM) $(DEST_RT) $(DEST_SPELL) +- enspl = $(SPELLSOURCE)/en.latin1.spl +- @if os.path.exists(enspl): +- :copy $(SPELLSOURCE)/*.spl $(SPELLSOURCE)/*.vim $(DEST_SPELL) +- :chmod $(HELPMOD) $(DEST_SPELL)/*.spl $(DEST_SPELL)/*.vim +- @try: +- :copy $(SPELLSOURCE)/*.sug $(DEST_SPELL) +- :chmod $(HELPMOD) $(DEST_SPELL)/*.sug +- @except: +- @ pass +- +- # install helper program xxd +- installtools {virtual}{force}: $TOOLS $DEST_BIN $DEST_MAN \ +- $TOOLSSOURCE $DEST_VIM $DEST_RT $DEST_TOOLS \ +- $INSTALL_TOOL_LANGS +- xxd = $DEST_BIN/xxd$EXESUF +- @if os.path.exists(xxd): +- :move {force} $xxd $(xxd).rm +- :del $(xxd).rm +- :copy xxd/xxd$EXESUF $DEST_BIN +- :do strip $DEST_BIN/xxd$EXESUF +- :chmod $BINMOD $DEST_BIN/xxd$EXESUF +- :chmod 755 installman.sh +- :sys ./installman.sh xxd $(DEST_MAN) "" $(INSTALLMANARGS) +- # +- # install the runtime tools +- @try: +- @ if aap_has(":tree"): +- # New method: copy everything and delete CVS and AAPDIR dirs +- :copy {recursive} $TOOLSSOURCE/* $DEST_TOOLS +- :tree $DEST_TOOLS {dirname = CVS} +- :delete {recursive} $name +- :tree $DEST_TOOLS {dirname = AAPDIR} +- :delete {recursive} $name +- @except: +- # Old method: copy only specific files and directories. +- :copy {recursive} $TOOLSSOURCE/README.txt $TOOLSSOURCE/[a-z]* $DEST_TOOLS +- :chmod $FILEMOD $DEST_TOOLS/* +- # replace the path in some tools +- :progsearch perlpath perl +- @if perlpath: +- :cat $TOOLSSOURCE/efm_perl.pl | +- :eval re.sub("/usr/bin/perl", perlpath, stdin) +- >! $DEST_TOOLS/efm_perl.pl +- @else: +- :copy $TOOLSSOURCE/efm_perl.pl $DEST_TOOLS +- +- :progsearch awkpath nawk gawk awk +- @if awkpath: +- :cat $TOOLSSOURCE/mve.awk | +- :eval re.sub("/usr/bin/nawk", awkpath, stdin) +- >! $DEST_TOOLS/mve.awk +- @else: +- :copy $TOOLSSOURCE/mve.awk $DEST_TOOLS +- +- :sys chmod $SCRIPTMOD ``grep -l "^#!" $DEST_TOOLS/*`` +- +- # install the language specific files for tools, if they were unpacked +- install-tool-languages: +- :chmod 755 installman.sh +- :sys ./installman.sh xxd $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_IT) "-it" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) +- :sys ./installman.sh xxd $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) +- +- # install the language specific files, if they were unpacked +- install-languages {virtual}{force}: languages $DEST_LANG $DEST_KMAP +- :chmod 755 installman.sh +- :sys ./installman.sh install $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_IT) "-it" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_PL) "-pl" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_PL_U) "-pl.UTF-8" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS) +- :sys ./installman.sh install $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS) +- :chmod 755 installml.sh +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_FR) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_FR_I) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_FR_U) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_IT) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_IT_I) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_IT_U) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_PL) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_PL_U) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_RU) $(INSTALLMLARGS) +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_RU_U) $(INSTALLMLARGS) +- +- @if _no.MAKEMO: +- :sys cd $PODIR; $MAKE prefix=$DESTDIR$prefix \ +- LOCALEDIR=$DEST_LANG INSTALL_DATA=cp FILEMOD=$FILEMOD install +- @if os.path.exists(_no.LANGSOURCE): +- :print installing language files +- :copy $LANGSOURCE/README.txt $LANGSOURCE/*.vim $DEST_LANG +- :chmod $FILEMOD $DEST_LANG/*.vim +- @if os.path.exists(_no.KMAPSOURCE): +- :copy $KMAPSOURCE/README.txt $KMAPSOURCE/*.vim $DEST_KMAP +- :chmod $FILEMOD $DEST_KMAP/*.vim +- +- # install the icons for KDE, if the directory exists and the icon doesn't. +- ICON48PATH = $DESTDIR$DATADIR/icons/hicolor/48x48/apps +- ICON32PATH = $DESTDIR$DATADIR/icons/locolor/32x32/apps +- ICON16PATH = $DESTDIR$DATADIR/icons/locolor/16x16/apps +- KDEPATH = $HOME/.kde/share/icons +- install-icons {virtual}: +- gp = $ICON48PATH/gvim.png +- @if os.path.isdir(_no.ICON48PATH) and not os.path.exists(gp): +- :copy $SCRIPTSOURCE/vim48x48.png $gp +- gp = $ICON32PATH/gvim.png +- @if os.path.isdir(_no.ICON32PATH) and not os.path.exists(gp): +- :copy $SCRIPTSOURCE/vim32x32.png $gp +- gp = $ICON16PATH/gvim.png +- @if os.path.isdir(_no.ICON16PATH) and not os.path.exists(gp): +- :copy $SCRIPTSOURCE/vim16x16.png $gp +- +- +- $HELPSOURCE/vim.1 $MACROSOURCE $TOOLSSOURCE: +- @if not os.path.exists(_no.TOOLSSOURCE): +- :print Runtime files not found. +- :error You need to unpack the runtime archive before running "make install". +- +- # create links from various names to vim. This is only done when the links +- # (or executables with the same name) don't exist yet. +- installlinks {virtual}: $GUI_TARGETS \ +- $DEST_BIN/$EXTARGET \ +- $DEST_BIN/$VIEWTARGET \ +- $DEST_BIN/$RVIMTARGET \ +- $DEST_BIN/$RVIEWTARGET \ +- $INSTALLVIMDIFF +- +- installglinks {virtual}: $DEST_BIN/$GVIMTARGET \ +- $DEST_BIN/$GVIEWTARGET \ +- $DEST_BIN/$RGVIMTARGET \ +- $DEST_BIN/$RGVIEWTARGET \ +- $DEST_BIN/$EVIMTARGET \ +- $DEST_BIN/$EVIEWTARGET \ +- $INSTALLGVIMDIFF +- +- installvimdiff {virtual}: $DEST_BIN/$VIMDIFFTARGET +- installgvimdiff {virtual}: $DEST_BIN/$GVIMDIFFTARGET +- +- # These dependencies use an empty buildcheck so that they are only done when +- # the target doesn't exist. +- $DEST_BIN/$EXTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $EXTARGET +- +- $DEST_BIN/$VIEWTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $VIEWTARGET +- +- $DEST_BIN/$GVIMTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMTARGET +- +- $DEST_BIN/$GVIEWTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIEWTARGET +- +- $DEST_BIN/$RVIMTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIMTARGET +- +- $DEST_BIN/$RVIEWTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $RVIEWTARGET +- +- $DEST_BIN/$RGVIMTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIMTARGET +- +- $DEST_BIN/$RGVIEWTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $RGVIEWTARGET +- +- $DEST_BIN/$VIMDIFFTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $VIMDIFFTARGET +- +- $DEST_BIN/$GVIMDIFFTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $GVIMDIFFTARGET +- +- $DEST_BIN/$EVIMTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIMTARGET +- +- $DEST_BIN/$EVIEWTARGET: {buildcheck = } +- :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIEWTARGET +- +- # create links for the manual pages with various names to vim. This is only +- # done when the links (or manpages with the same name) don't exist yet. +- INSTALLMLARGS = $(VIMNAME) $(VIMDIFFNAME) $(EVIMNAME) \ +- $(EXNAME) $(VIEWNAME) $(RVIMNAME) $(RVIEWNAME) \ +- $(GVIMNAME) $(GVIEWNAME) $(RGVIMNAME) $(RGVIEWNAME) \ +- $(GVIMDIFFNAME) $(EVIEWNAME) +- +- installmanlinks {virtual}: +- :chmod 755 installml.sh +- :sys ./installml.sh install "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN) $(INSTALLMLARGS) +- +- # +- # U N I N S T A L L +- # +- uninstall {virtual}{force}: uninstall_runtime +- :del {force} $DEST_BIN/$VIMTARGET +- :del {force} $DEST_BIN/vimtutor +- :del {force} $DEST_BIN/$EXTARGET $DEST_BIN/$VIEWTARGET +- :del {force} $DEST_BIN/$GVIMTARGET $DEST_BIN/$GVIEWTARGET +- :del {force} $DEST_BIN/$RVIMTARGET $DEST_BIN/$RVIEWTARGET +- :del {force} $DEST_BIN/$RGVIMTARGET $DEST_BIN/$RGVIEWTARGET +- :del {force} $DEST_BIN/$VIMDIFFTARGET $DEST_BIN/$GVIMDIFFTARGET +- :del {force} $DEST_BIN/$EVIMTARGET $DEST_BIN/$EVIEWTARGET +- :del {force} $DEST_BIN/xxd$EXESUF +- +- # Note: "deldir" will fail if any files were added after "make install", that +- # is intentionally: Keep files the user added. +- uninstall_runtime {virtual}{force}: +- :chmod 755 installman.sh +- :sys ./installman.sh uninstall $(DEST_MAN) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_FR) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_FR_I) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_FR_U) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_IT) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_IT_I) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_IT_U) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_PL) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_PL_U) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_RU) "" $(INSTALLMANARGS) +- :sys ./installman.sh uninstall $(DEST_MAN_RU_U) "" $(INSTALLMANARGS) +- :chmod 755 installml.sh +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_FR) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_FR_I) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_FR_U) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_IT) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_IT_I) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_IT_U) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_PL) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_PL_U) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_RU) $(INSTALLMLARGS) +- :sys ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \ +- $(DEST_MAN_RU_U) $(INSTALLMLARGS) +- :del {force} $DEST_MAN/xxd.1 +- :del {force} $(DEST_MAN_FR)/xxd.1 $(DEST_MAN_FR_I)/xxd.1 $(DEST_MAN_FR_U)/xxd.1 +- :del {force} $(DEST_MAN_IT)/xxd.1 $(DEST_MAN_IT_I)/xxd.1 $(DEST_MAN_IT_U)/xxd.1 +- :del {force} $(DEST_MAN_PL)/xxd.1 $(DEST_MAN_PL_U)/xxd.1 +- :del {force} $(DEST_MAN_RU)/xxd.1 $(DEST_MAN_RU_U)/xxd.1 +- +- :del {force} $DEST_HELP/*.txt $DEST_HELP/tags $DEST_HELP/*.pl +- :del {force} $SYS_MENU_FILE $SYS_SYNMENU_FILE $SYS_DELMENU_FILE +- :del {force} $SYS_BUGR_FILE $EVIM_FILE $MSWIN_FILE +- :del {force} $DEST_SCRIPT/gvimrc_example.vim $DEST_SCRIPT/vimrc_example.vim +- :del {force} $SYS_FILETYPE_FILE $SYS_FTOFF_FILE $SYS_SCRIPTS_FILE +- :del {force} $SYS_INDOFF_FILE $SYS_INDENT_FILE +- :del {force} $SYS_FTPLUGOF_FILE $SYS_FTPLUGIN_FILE +- :del {force} $SYS_OPTWIN_FILE +- :del {force} $DEST_COL/*.vim $DEST_COL/README.txt +- :del {force} $DEST_SYN/*.vim $DEST_SYN/README.txt +- :del {force} $DEST_IND/*.vim $DEST_IND/README.txt +- :del {force} $DEST_PRINT/*.ps +- :del {force}{recursive} $DEST_MACRO +- :del {force}{recursive} $DEST_TUTOR +- :del {force}{recursive} $DEST_SPELL +- :del {force}{recursive} $DEST_TOOLS +- :del {force}{recursive} $DEST_LANG +- :del {force}{recursive} $DEST_KMAP +- :del {force}{recursive} $DEST_COMP +- :deldir {force} $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND +- :del {force}{recursive} $DEST_FTP/*.vim $DEST_FTP/README.txt +- :del {force} $DEST_AUTO/*.vim $DEST_AUTO/README.txt $DEST_AUTO/xml/*.vim +- :del {force} $DEST_PLUG/*.vim $DEST_PLUG/README.txt +- :deldir {force} $DEST_FTP $DEST_AUTO/xml $DEST_AUTO $DEST_PLUG $DEST_PRINT $DEST_RT +- # This will fail when other Vim versions are installed, no worries. +- @try: +- :deldir $DEST_VIM +- @except: +- :print Cannot delete $DEST_VIM +- +- ############################################################################### +- ### MacOS X installation +- ### +- ### This installs a runnable Vim.app in $(prefix) +- +- REZ = /Developer/Tools/Rez +- RESDIR = $(APPDIR)/Contents/Resources +- @r = re.compile('.*VIM_VERSION_SHORT\\s*"(\\d[^"]*)".*', re.S) +- VERSION = /`r.match(open("version.h").read()).group(1)` +- +- ### Common flags +- M4FLAGSX = $?(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \ +- -DAPP_VER=$(VERSION) +- +- # Resources used for the Mac are in one directory. +- RSRC_DIR = os_mac_rsrc +- +- :attr {directory = $DIRMOD} $RESDIR +- +- install_macosx {virtual}: gui_bundle +- # Remove the link to the runtime dir, don't want to copy all of that. +- :delete {force} $(RESDIR)/vim/runtime +- :copy {r} $APPDIR $DESTDIR$prefix +- :tree $DESTDIR$prefix {dirname = AAPDIR} +- :delete {recursive} $name +- # Install the runtime files. Recursive! +- :mkdir {r}{f} $DESTDIR$prefix/$RESDIR/vim/runtime +- # :mkdir $(DESTDIR)$(prefix)/$(APPDIR)/bin +- :execute main.aap PREFIX=$DESTDIR$prefix/$RESDIR/vim VIMRTLOC=$DESTDIR$prefix/$RESDIR/vim/runtime installruntime +- # Put the link back. +- :symlink `os.getcwd()`/../runtime $RESDIR/vim/runtime +- # TODO: Create the vimtutor application. +- +- gui_bundle {virtual}: $(RESDIR) bundle-dir bundle-executable bundle-info \ +- bundle-resource bundle-language +- +- bundle-dir {virtual}: $(APPDIR)/Contents $(VIMTARGET) +- # Make a link to the runtime directory, so that we can try out the executable +- # without installing it. +- :mkdir {r}{f} $(RESDIR)/vim +- :symlink {quiet} `os.getcwd()`/../runtime $(RESDIR)/vim/runtime +- +- bundle-executable {virtual}: $(VIMTARGET) +- :mkdir {r}{f} $(APPDIR)/Contents/MacOS +- :copy $(VIMTARGET) $(APPDIR)/Contents/MacOS/$(VIMTARGET) +- +- bundle-info {virtual}: bundle-dir +- :print Creating PkgInfo +- :print "APPLVIM!" >! $(APPDIR)/Contents/PkgInfo +- :print Creating Info.plist +- :sys m4 $(M4FLAGSX) infplist.xml > $(APPDIR)/Contents/Info.plist +- +- bundle-resource {virtual}: bundle-dir bundle-rsrc +- :copy {force} $(RSRC_DIR)/*.icns $(RESDIR) +- +- ### Classic resources +- # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9) +- # This file is also required for OS X Vim. +- bundle-rsrc {virtual}: os_mac.rsr.hqx +- :print Creating resource fork +- :sys python dehqx.py $source +- :del {force} gui_mac.rsrc +- :move gui_mac.rsrc.rsrcfork $(RESDIR)/$(VIMNAME).rsrc +- +- # po/Make_osx.pl says something about generating a Mac message file +- # for Ukrainian. Would somebody using Mac OS X in Ukrainian +- # *really* be upset that Carbon Vim was not localised in +- # Ukrainian? +- # +- #bundle-language: bundle-dir po/Make_osx.pl +- # cd po && perl Make_osx.pl --outdir ../$(RESDIR) $(MULTILANG) +- bundle-language {virtual}: bundle-dir +- +- $(APPDIR)/Contents: +- :mkdir {r} $(APPDIR)/Contents/MacOS +- :mkdir {r} $(RESDIR)/English.lproj +- +- +- # vim: sts=4 sw=4 : +--- 0 ---- +*** ../vim-8.1.0345/src/testdir/main.aap 2018-01-31 19:23:08.000000000 +0100 +--- src/testdir/main.aap 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,57 **** +- # +- # Makefile to run all tests for Vim +- # +- +- VimProg ?= ../vim +- +- Scripts = test1.out test2.out test3.out test6.out +- test11.out +- test13.out test14.out test17.out +- test18.out test21.out +- test27.out test29.out test30.out +- test37.out +- test39.out test42.out +- test44.out test46.out test47.out +- test48.out test49.out test74.out +- +- ScriptsGUI = test16.out +- +- # Build "nongui" when no target was specified. +- nongui: newlog $Scripts +- :print +- :cat test.log +- :print ALL DONE +- +- # Build "ngui" when specified. +- gui: newlog $Scripts $ScriptsGUI +- :print +- :cat test.log +- :print ALL DONE +- +- $Scripts $ScriptsGUI: $VimProg +- +- clean: +- :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* +- +- # test1 is special, it checks for features +- test1.out: test1.in +- :del {force} test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim +- :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in +- @if os.system("diff test.out test1.ok") != 0: +- :error test1 FAILED - Something basic is wrong +- :move {force} test.out test1.out +- :del {r}{force} X* +- +- :rule %.out : %.in +- :del {force} $(match).failed test.ok +- :copy $(match).ok test.ok +- :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in $(match).in +- @if os.system("diff test.out " + match + ".ok") != 0: +- :print $match FAILED >>test.log +- :move {force} test.out $(match).failed +- @else: +- :move {force} test.out $(match).out +- :del {r}{force} X* test.ok +- +- newlog: +- :print Test results: >! test.log +--- 0 ---- +*** ../vim-8.1.0345/src/config.aap.in 2018-04-11 22:14:38.000000000 +0200 +--- src/config.aap.in 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,129 **** +- # config.aap.in: recipe transformed into auto/config.aap by configure. +- +- VIMNAME = @VIMNAME@ +- EXNAME = @EXNAME@ +- VIEWNAME = @VIEWNAME@ +- +- CC = @CC@ +- DEFS = @DEFS@ +- CONF_CFLAGS = @CFLAGS@ +- CPPFLAGS = @CPPFLAGS@ +- srcdir = @srcdir@ +- VPATH = @srcdir@ +- CONF_LDFLAGS = @LDFLAGS@ +- CONF_LIBS = @LIBS@ +- TAGPRG = @TAGPRG@ +- +- CPP = @CPP@ +- CPP_MM = @CPP_MM@ +- X_CFLAGS = @X_CFLAGS@ +- X_LIBS_DIR = @X_LIBS@ +- X_PRE_LIBS = @X_PRE_LIBS@ +- X_EXTRA_LIBS = @X_EXTRA_LIBS@ +- X_LIBS = @X_LIB@ +- +- LUA_LIBS = @LUA_LIBS@ +- LUA_SRC = @LUA_SRC@ +- LUA_OBJ = @LUA_OBJ@ +- LUA_CFLAGS = @LUA_CFLAGS@ +- LUA_PRO = @LUA_PRO@ +- +- MZSCHEME_LIBS = @MZSCHEME_LIBS@ +- MZSCHEME_SRC = @MZSCHEME_SRC@ +- MZSCHEME_OBJ = @MZSCHEME_OBJ@ +- MZSCHEME_CFLAGS = @MZSCHEME_CFLAGS@ +- MZSCHEME_PRO = @MZSCHEME_PRO@ +- +- PERL = @vi_cv_path_perl@ +- PERLLIB = @vi_cv_perllib@ +- PERL_LIBS = @PERL_LIBS@ +- SHRPENV = @shrpenv@ +- PERL_SRC = @PERL_SRC@ +- PERL_OBJ = @PERL_OBJ@ +- PERL_PRO = @PERL_PRO@ +- PERL_CFLAGS = @PERL_CFLAGS@ +- +- PYTHON_SRC = @PYTHON_SRC@ +- PYTHON_OBJ = @PYTHON_OBJ@ +- PYTHON_CFLAGS = @PYTHON_CFLAGS@ +- PYTHON_LIBS = @PYTHON_LIBS@ +- +- TCL = @vi_cv_path_tcl@ +- TCL_SRC = @TCL_SRC@ +- TCL_OBJ = @TCL_OBJ@ +- TCL_PRO = @TCL_PRO@ +- TCL_CFLAGS = @TCL_CFLAGS@ +- TCL_LIBS = @TCL_LIBS@ +- +- HANGULIN_SRC = @HANGULIN_SRC@ +- HANGULIN_OBJ = @HANGULIN_OBJ@ +- +- WORKSHOP_SRC = @WORKSHOP_SRC@ +- WORKSHOP_OBJ = @WORKSHOP_OBJ@ +- +- NETBEANS_SRC = @NETBEANS_SRC@ +- NETBEANS_OBJ = @NETBEANS_OBJ@ +- CHANNEL_SRC = @CHANNEL_SRC@ +- CHANNEL_OBJ = @CHANNEL_OBJ@ +- +- RUBY = @vi_cv_path_ruby@ +- RUBY_SRC = @RUBY_SRC@ +- RUBY_OBJ = @RUBY_OBJ@ +- RUBY_PRO = @RUBY_PRO@ +- RUBY_CFLAGS = @RUBY_CFLAGS@ +- RUBY_LIBS = @RUBY_LIBS@ +- +- AWK = @AWK@ +- +- STRIP = @STRIP@ +- +- EXEEXT = @EXEEXT@ +- +- COMPILEDBY = @compiledby@ +- +- INSTALLVIMDIFF = @dovimdiff@ +- INSTALLGVIMDIFF = @dogvimdiff@ +- INSTALL_LANGS = @INSTALL_LANGS@ +- INSTALL_TOOL_LANGS = @INSTALL_TOOL_LANGS@ +- +- ### Line break character as octal number for "tr" +- NL = @line_break@ +- +- ### Top directory for everything +- # Can be overruled with "PREFIX=dir", thus delay using it. +- prefix = @prefix@ +- +- ### Top directory for the binary +- exec_prefix $= @exec_prefix@ +- +- ### Prefix for location of data files +- BINDIR $= @bindir@ +- +- ### For autoconf 2.60 and later (avoid a warning) +- datarootdir $= @datarootdir@ +- +- ### Prefix for location of data files +- DATADIR $= @datadir@ +- +- ### Prefix for location of man pages +- MANDIR $= @mandir@ +- +- ### Do we have a GUI +- GUI = @GUITYPE@ +- NARROW_PROTO = @NARROW_PROTO@ +- GTK_LIBNAME = @GTK_LIBNAME@ +- MOTIF_LIBNAME = @MOTIF_LIBNAME@ +- GUI_INC_LOC = @GUI_INC_LOC@ +- GUI_LIB_LOC = @GUI_LIB_LOC@ +- GUI_X_LIBS = @GUI_X_LIBS@ +- +- ### Any OS dependent extra source and object file +- OS_EXTRA_SRC = @OS_EXTRA_SRC@ +- OS_EXTRA_OBJ = @OS_EXTRA_OBJ@ +- +- ### If the *.po files are to be translated to *.mo files. +- MAKEMO = @MAKEMO@ +- +- # Make sure that "make first" will run "make all" once configure has done its +- # work. This is needed when using the Makefile in the top directory. +- first: all +--- 0 ---- +*** ../vim-8.1.0345/runtime/macros/maze/main.aap 2010-05-15 13:04:01.000000000 +0200 +--- runtime/macros/maze/main.aap 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,4 **** +- # Aap recipe to build the maze program +- :program maze : mazeansi.c +- +- :program mazeclean : mazeclean.c +--- 0 ---- +*** ../vim-8.1.0345/src/version.c 2018-09-02 15:18:38.910627833 +0200 +--- src/version.c 2018-09-02 15:25:50.977703769 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 346, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +11. You find yourself typing "com" after every period when using a word + processor.com + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0347 b/data/vim/patches/8.1.0347 new file mode 100644 index 000000000..4c45fdef8 --- /dev/null +++ b/data/vim/patches/8.1.0347 @@ -0,0 +1,174 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0347 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0347 +Problem: Some tests fail on Solaris. +Solution: Skip writefile test. Fix path to libc.so. Improve test for Turkish + case change. (Libor Bukata, Bjorn Linse, closes #3403) +Files: src/testdir/test_functions.vim, src/testdir/test_normal.vim, + src/testdir/test_writefile.vim + + +*** ../vim-8.1.0346/src/testdir/test_functions.vim 2018-08-20 22:53:00.210105086 +0200 +--- src/testdir/test_functions.vim 2018-09-03 22:05:48.870072965 +0200 +*************** +*** 1,4 **** +--- 1,5 ---- + " Tests for various functions. ++ source shared.vim + + " Must be done first, since the alternate buffer must be unset. + func Test_00_bufexists() +*************** +*** 1006,1011 **** +--- 1007,1023 ---- + let libc = 'msvcrt.dll' + elseif has('mac') + let libc = 'libSystem.B.dylib' ++ elseif system('uname -s') =~ 'SunOS' ++ " Set the path to libc.so according to the architecture. ++ let test_bits = system('file ' . GetVimProg()) ++ let test_arch = system('uname -p') ++ if test_bits =~ '64-bit' && test_arch =~ 'sparc' ++ let libc = '/usr/lib/sparcv9/libc.so' ++ elseif test_bits =~ '64-bit' && test_arch =~ 'i386' ++ let libc = '/usr/lib/amd64/libc.so' ++ else ++ let libc = '/usr/lib/libc.so' ++ endif + else + " On Unix, libc.so can be in various places. + " Interestingly, using an empty string for the 1st argument of libcall +*** ../vim-8.1.0346/src/testdir/test_normal.vim 2018-08-24 22:07:54.094796047 +0200 +--- src/testdir/test_normal.vim 2018-09-03 22:02:34.495974021 +0200 +*************** +*** 1630,1641 **** + norm! V~ + call assert_equal('THIS IS A simple test: äüöss', getline('.')) + +! " Turkish ASCII turns to multi-byte. On Mac the Turkish locale is available +! " but toupper()/tolower() don't do the right thing. +! if !has('mac') && !has('osx') +! try +! lang tr_TR.UTF-8 +! set casemap= + call setline(1, 'iI') + 1normal gUU + call assert_equal("\u0130I", getline(1)) +--- 1630,1642 ---- + norm! V~ + call assert_equal('THIS IS A simple test: äüöss', getline('.')) + +! " Turkish ASCII turns to multi-byte. On some systems Turkish locale +! " is available but toupper()/tolower() don't do the right thing. +! try +! lang tr_TR.UTF-8 +! set casemap= +! let iupper = toupper('i') +! if iupper == "\u0130" + call setline(1, 'iI') + 1normal gUU + call assert_equal("\u0130I", getline(1)) +*************** +*** 1645,1652 **** + 1normal guu + call assert_equal("i\u0131", getline(1)) + call assert_equal("i\u0131", tolower("iI")) +! +! set casemap& + call setline(1, 'iI') + 1normal gUU + call assert_equal("II", getline(1)) +--- 1646,1652 ---- + 1normal guu + call assert_equal("i\u0131", getline(1)) + call assert_equal("i\u0131", tolower("iI")) +! elseif iupper == "I" + call setline(1, 'iI') + 1normal gUU + call assert_equal("II", getline(1)) +*************** +*** 1656,1668 **** + 1normal guu + call assert_equal("ii", getline(1)) + call assert_equal("ii", tolower("iI")) +! +! lang en_US.UTF-8 +! catch /E197:/ +! " can't use Turkish locale +! throw 'Skipped: Turkish locale not available' +! endtry +! endif + + " clean up + bw! +--- 1656,1680 ---- + 1normal guu + call assert_equal("ii", getline(1)) + call assert_equal("ii", tolower("iI")) +! else +! call assert_true(false, "expected toupper('i') to be either 'I' or '\u0130'") +! endif +! set casemap& +! call setline(1, 'iI') +! 1normal gUU +! call assert_equal("II", getline(1)) +! call assert_equal("II", toupper("iI")) +! +! call setline(1, 'iI') +! 1normal guu +! call assert_equal("ii", getline(1)) +! call assert_equal("ii", tolower("iI")) +! +! lang en_US.UTF-8 +! catch /E197:/ +! " can't use Turkish locale +! throw 'Skipped: Turkish locale not available' +! endtry + + " clean up + bw! +*** ../vim-8.1.0346/src/testdir/test_writefile.vim 2018-08-30 13:07:12.026033864 +0200 +--- src/testdir/test_writefile.vim 2018-09-03 22:02:34.495974021 +0200 +*************** +*** 33,39 **** + endfunc + + func Test_writefile_fails_conversion() +! if !has('multi_byte') || !has('iconv') + return + endif + set nobackup nowritebackup +--- 33,39 ---- + endfunc + + func Test_writefile_fails_conversion() +! if !has('multi_byte') || !has('iconv') || system('uname -s') =~ 'SunOS' + return + endif + set nobackup nowritebackup +*** ../vim-8.1.0346/src/version.c 2018-09-02 15:26:53.829022193 +0200 +--- src/version.c 2018-09-03 22:04:32.654818113 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 347, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +17. You turn on your intercom when leaving the room so you can hear if new + e-mail arrives. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0348 b/data/vim/patches/8.1.0348 new file mode 100644 index 000000000..dd8c83709 --- /dev/null +++ b/data/vim/patches/8.1.0348 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0348 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0348 +Problem: On Travis the slowest build is run last. (Dominique Pelle) +Solution: Reorder the build entries. +Files: .travis.yml + + +*** ../vim-8.1.0347/.travis.yml 2018-07-01 21:12:49.765572778 +0200 +--- .travis.yml 2018-09-05 22:23:08.543266993 +0200 +*************** +*** 10,28 **** + - gcc + + env: + - BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" + - BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes + - BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no + - BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no +- - BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + # Mac OSX build + - BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" +- # ASAN build +- - BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer" +- FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt" +- "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" + + sudo: false + +--- 10,28 ---- + - gcc + + env: ++ - BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no ++ # ASAN build ++ - BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer" ++ FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt" ++ "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" + - BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" + - BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes + - BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no + - BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + # Mac OSX build + - BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" + + sudo: false + +*** ../vim-8.1.0347/src/version.c 2018-09-03 22:08:05.676736128 +0200 +--- src/version.c 2018-09-05 22:24:12.503252094 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 348, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +24. You realize there is not a sound in the house and you have no idea where + your children are. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0349 b/data/vim/patches/8.1.0349 new file mode 100644 index 000000000..bf71803cb --- /dev/null +++ b/data/vim/patches/8.1.0349 @@ -0,0 +1,187 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0349 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0349 +Problem: Crash when wiping buffer in a callback. +Solution: Do not handle messages when only peeking for a character. + (closes #2107) Add "redraw_flag" to test_override(). +Files: src/os_unix.c, src/os_win32.c, src/screen.c, src/evalfunc.c, + src/globals.h, runtime/doc/eval.txt + + +*** ../vim-8.1.0348/src/os_unix.c 2018-08-27 23:24:13.064009239 +0200 +--- src/os_unix.c 2018-09-06 13:12:40.441556794 +0200 +*************** +*** 417,426 **** + handle_resize(); + + #ifdef MESSAGE_QUEUE +! parse_queued_messages(); +! /* If input was put directly in typeahead buffer bail out here. */ +! if (typebuf_changed(tb_change_cnt)) +! return 0; + #endif + if (wtime < 0 && did_start_blocking) + /* blocking and already waited for p_ut */ +--- 417,430 ---- + handle_resize(); + + #ifdef MESSAGE_QUEUE +! // Only process messages when waiting. +! if (wtime != 0) +! { +! parse_queued_messages(); +! // If input was put directly in typeahead buffer bail out here. +! if (typebuf_changed(tb_change_cnt)) +! return 0; +! } + #endif + if (wtime < 0 && did_start_blocking) + /* blocking and already waited for p_ut */ +*** ../vim-8.1.0348/src/os_win32.c 2018-08-30 17:47:01.949560920 +0200 +--- src/os_win32.c 2018-09-06 12:12:22.506417572 +0200 +*************** +*** 1529,1543 **** + */ + for (;;) + { + #ifdef MESSAGE_QUEUE +! parse_queued_messages(); + #endif + #ifdef FEAT_MZSCHEME +! mzvim_check_threads(); + #endif + #ifdef FEAT_CLIENTSERVER +! serverProcessPendingMessages(); + #endif + + if (0 + #ifdef FEAT_MOUSE +--- 1529,1547 ---- + */ + for (;;) + { ++ // Only process messages when waiting. ++ if (msec != 0) ++ { + #ifdef MESSAGE_QUEUE +! parse_queued_messages(); + #endif + #ifdef FEAT_MZSCHEME +! mzvim_check_threads(); + #endif + #ifdef FEAT_CLIENTSERVER +! serverProcessPendingMessages(); + #endif ++ } + + if (0 + #ifdef FEAT_MOUSE +*** ../vim-8.1.0348/src/screen.c 2018-09-02 15:07:21.977655529 +0200 +--- src/screen.c 2018-09-06 12:37:10.783837405 +0200 +*************** +*** 10819,10826 **** + return 0; + else + #endif +! return (!RedrawingDisabled +! && !(p_lz && char_avail() && !KeyTyped && !do_redraw)); + } + + /* +--- 10819,10829 ---- + return 0; + else + #endif +! return ((!RedrawingDisabled +! #ifdef FEAT_EVAL +! || ignore_redraw_flag_for_testing +! #endif +! ) && !(p_lz && char_avail() && !KeyTyped && !do_redraw)); + } + + /* +*** ../vim-8.1.0348/src/evalfunc.c 2018-09-02 14:25:02.330801508 +0200 +--- src/evalfunc.c 2018-09-06 12:38:22.375337484 +0200 +*************** +*** 13073,13078 **** +--- 13073,13080 ---- + + if (STRCMP(name, (char_u *)"redraw") == 0) + disable_redraw_for_testing = val; ++ else if (STRCMP(name, (char_u *)"redraw_flag") == 0) ++ ignore_redraw_flag_for_testing = val; + else if (STRCMP(name, (char_u *)"char_avail") == 0) + disable_char_avail_for_testing = val; + else if (STRCMP(name, (char_u *)"starting") == 0) +*************** +*** 13095,13100 **** +--- 13097,13103 ---- + { + disable_char_avail_for_testing = FALSE; + disable_redraw_for_testing = FALSE; ++ ignore_redraw_flag_for_testing = FALSE; + nfa_fail_for_testing = FALSE; + if (save_starting >= 0) + { +*** ../vim-8.1.0348/src/globals.h 2018-08-21 19:47:44.720053833 +0200 +--- src/globals.h 2018-09-06 12:38:43.019189178 +0200 +*************** +*** 1633,1641 **** + EXTERN int alloc_fail_repeat INIT(= 0); + + /* flags set by test_override() */ +! EXTERN int disable_char_avail_for_testing INIT(= 0); +! EXTERN int disable_redraw_for_testing INIT(= 0); +! EXTERN int nfa_fail_for_testing INIT(= 0); + + EXTERN int in_free_unref_items INIT(= FALSE); + #endif +--- 1633,1642 ---- + EXTERN int alloc_fail_repeat INIT(= 0); + + /* flags set by test_override() */ +! EXTERN int disable_char_avail_for_testing INIT(= FALSE); +! EXTERN int disable_redraw_for_testing INIT(= FALSE); +! EXTERN int ignore_redraw_flag_for_testing INIT(= FALSE); +! EXTERN int nfa_fail_for_testing INIT(= FALSE); + + EXTERN int in_free_unref_items INIT(= FALSE); + #endif +*** ../vim-8.1.0348/runtime/doc/eval.txt 2018-09-02 15:18:38.906627880 +0200 +--- runtime/doc/eval.txt 2018-09-06 12:34:54.793088505 +0200 +*************** +*** 8728,8733 **** +--- 8737,8743 ---- + + name effect when {val} is non-zero ~ + redraw disable the redrawing() function ++ redraw_flag ignore the RedrawingDisabled flag + char_avail disable the char_avail() function + starting reset the "starting" variable, see below + nfa_fail makes the NFA regexp engine fail to force a +*** ../vim-8.1.0348/src/version.c 2018-09-05 22:25:45.999112143 +0200 +--- src/version.c 2018-09-06 12:36:05.184408056 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 349, + /**/ + +-- +Anyone who is capable of getting themselves made President should on no +account be allowed to do the job. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0350 b/data/vim/patches/8.1.0350 new file mode 100644 index 000000000..1206f9c18 --- /dev/null +++ b/data/vim/patches/8.1.0350 @@ -0,0 +1,219 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0350 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0350 +Problem: Vim may block on ch_sendraw() when the job is sending data back to + Vim, which isn't read yet. (Nate Bosch) +Solution: Add the "noblock" option to job_start(). (closes #2548) +Files: src/channel.c, src/structs.h, src/testdir/test_channel.vim, + runtime/doc/channel.txt + + +*** ../vim-8.1.0349/src/channel.c 2018-08-09 22:15:30.042856715 +0200 +--- src/channel.c 2018-09-06 16:08:40.193230860 +0200 +*************** +*** 1180,1185 **** +--- 1180,1186 ---- + channel->ch_part[PART_OUT].ch_mode = opt->jo_out_mode; + if (opt->jo_set & JO_ERR_MODE) + channel->ch_part[PART_ERR].ch_mode = opt->jo_err_mode; ++ channel->ch_nonblock = opt->jo_noblock; + + if (opt->jo_set & JO_TIMEOUT) + for (part = PART_SOCK; part < PART_COUNT; ++part) +*************** +*** 3677,3683 **** + channel_set_nonblock(channel_T *channel, ch_part_T part) + { + chanpart_T *ch_part = &channel->ch_part[part]; +! int fd = ch_part->ch_fd; + + if (fd != INVALID_FD) + { +--- 3678,3684 ---- + channel_set_nonblock(channel_T *channel, ch_part_T part) + { + chanpart_T *ch_part = &channel->ch_part[part]; +! int fd = ch_part->ch_fd; + + if (fd != INVALID_FD) + { +*************** +*** 3722,3727 **** +--- 3723,3731 ---- + return FAIL; + } + ++ if (channel->ch_nonblock && !ch_part->ch_nonblocking) ++ channel_set_nonblock(channel, part); ++ + if (ch_log_active()) + { + ch_log_lead("SEND ", channel, part); +*************** +*** 4553,4558 **** +--- 4557,4568 ---- + == FAIL) + return FAIL; + } ++ else if (STRCMP(hi->hi_key, "noblock") == 0) ++ { ++ if (!(supported & JO_MODE)) ++ break; ++ opt->jo_noblock = get_tv_number(item); ++ } + else if (STRCMP(hi->hi_key, "in_io") == 0 + || STRCMP(hi->hi_key, "out_io") == 0 + || STRCMP(hi->hi_key, "err_io") == 0) +*** ../vim-8.1.0349/src/structs.h 2018-06-30 18:27:59.897025143 +0200 +--- src/structs.h 2018-09-06 15:30:31.063357009 +0200 +*************** +*** 1651,1656 **** +--- 1651,1657 ---- + partial_T *ch_close_partial; + int ch_drop_never; + int ch_keep_open; /* do not close on read error */ ++ int ch_nonblock; + + job_T *ch_job; /* Job that uses this channel; this does not + * count as a reference to avoid a circular +*************** +*** 1729,1734 **** +--- 1730,1736 ---- + ch_mode_T jo_in_mode; + ch_mode_T jo_out_mode; + ch_mode_T jo_err_mode; ++ int jo_noblock; + + job_io_T jo_io[4]; /* PART_OUT, PART_ERR, PART_IN */ + char_u jo_io_name_buf[4][NUMBUFLEN]; +*** ../vim-8.1.0349/src/testdir/test_channel.vim 2018-04-28 21:07:37.000000000 +0200 +--- src/testdir/test_channel.vim 2018-09-06 16:05:43.771212320 +0200 +*************** +*** 47,54 **** +--- 47,57 ---- + func Ch_communicate(port) + " Avoid dropping messages, since we don't use a callback here. + let s:chopt.drop = 'never' ++ " Also add the noblock flag to try it out. ++ let s:chopt.noblock = 1 + let handle = ch_open('localhost:' . a:port, s:chopt) + unlet s:chopt.drop ++ unlet s:chopt.noblock + if ch_status(handle) == "fail" + call assert_report("Can't open channel") + return +*************** +*** 451,458 **** + call ch_log('Test_raw_pipe()') + " Add a dummy close callback to avoid that messages are dropped when calling + " ch_canread(). + let job = job_start(s:python . " test_channel_pipe.py", +! \ {'mode': 'raw', 'drop': 'never'}) + call assert_equal(v:t_job, type(job)) + call assert_equal("run", job_status(job)) + +--- 454,462 ---- + call ch_log('Test_raw_pipe()') + " Add a dummy close callback to avoid that messages are dropped when calling + " ch_canread(). ++ " Also test the non-blocking option. + let job = job_start(s:python . " test_channel_pipe.py", +! \ {'mode': 'raw', 'drop': 'never', 'noblock': 1}) + call assert_equal(v:t_job, type(job)) + call assert_equal("run", job_status(job)) + +*************** +*** 1349,1354 **** +--- 1353,1386 ---- + endfunc + + """""""""" ++ ++ function ExitCbWipe(job, status) ++ exe g:wipe_buf 'bw!' ++ endfunction ++ ++ " This caused a crash, because messages were handled while peeking for a ++ " character. ++ func Test_exit_cb_wipes_buf() ++ if !has('timers') ++ return ++ endif ++ set cursorline lazyredraw ++ call test_override('redraw_flag', 1) ++ new ++ let g:wipe_buf = bufnr('') ++ ++ let job = job_start(['true'], {'exit_cb': 'ExitCbWipe'}) ++ let timer = timer_start(300, {-> feedkeys("\", 'nt')}, {'repeat': 5}) ++ call feedkeys(repeat('g', 1000) . 'o', 'ntx!') ++ call WaitForAssert({-> assert_equal("dead", job_status(job))}) ++ call timer_stop(timer) ++ ++ set nocursorline nolazyredraw ++ unlet g:wipe_buf ++ call test_override('ALL', 0) ++ endfunc ++ ++ """""""""" + + let g:Ch_unletResponse = '' + func s:UnletHandler(handle, msg) +*** ../vim-8.1.0349/runtime/doc/channel.txt 2018-06-03 14:42:17.824505143 +0200 +--- runtime/doc/channel.txt 2018-09-06 16:14:07.501586039 +0200 +*************** +*** 163,168 **** +--- 163,171 ---- + The "close_cb" is also considered for this. + "never" All messages will be kept. + ++ *channel-noblock* ++ "noblock" Same effect as |job-noblock|. Only matters for writing. ++ + *waittime* + "waittime" The time to wait for the connection to be made in + milliseconds. A negative number waits forever. +*************** +*** 594,599 **** +--- 597,613 ---- + Note: when writing to a file or buffer and when + reading from a buffer NL mode is used by default. + ++ *job-noblock* ++ "noblock": 1 When writing use a non-blocking write call. This ++ avoids getting stuck if Vim should handle other ++ messages in between, e.g. when a job sends back data ++ to Vim. It implies that when `ch_sendraw()` returns ++ not all data may have been written yet. ++ This option was added in patch 8.1.0350, test with: > ++ if has("patch-8.1.350") ++ let options['noblock'] = 1 ++ endif ++ < + *job-callback* + "callback": handler Callback for something to read on any part of the + channel. +*** ../vim-8.1.0349/src/version.c 2018-09-06 13:14:39.148722497 +0200 +--- src/version.c 2018-09-06 16:25:42.981907095 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 350, + /**/ + +-- +I have a drinking problem -- I can't afford it. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0351 b/data/vim/patches/8.1.0351 new file mode 100644 index 000000000..d4427da21 --- /dev/null +++ b/data/vim/patches/8.1.0351 @@ -0,0 +1,194 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0351 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0351 +Problem: 'incsearch' for :/foo/s// changes last search pattern. +Solution: Save the last search pattern earlier. +Files: src/ex_docmd.c, src/ex_getln.c, src/testdir/test_search.vim + + +*** ../vim-8.1.0350/src/ex_docmd.c 2018-08-30 15:58:23.244944556 +0200 +--- src/ex_docmd.c 2018-09-06 21:39:52.646486318 +0200 +*************** +*** 2911,2916 **** +--- 2911,2917 ---- + + /* + * Parse the address range, if any, in "eap". ++ * May set the last search pattern. + * Return FAIL and set "errormsg" or return OK. + */ + int +*************** +*** 4436,4445 **** + } + + /* +! * get a single EX address + * + * Set ptr to the next character after the part that was interpreted. + * Set ptr to NULL when an error is encountered. + * + * Return MAXLNUM when no Ex address was found. + */ +--- 4437,4447 ---- + } + + /* +! * Get a single EX address. + * + * Set ptr to the next character after the part that was interpreted. + * Set ptr to NULL when an error is encountered. ++ * This may set the last used search pattern. + * + * Return MAXLNUM when no Ex address was found. + */ +*** ../vim-8.1.0350/src/ex_getln.c 2018-08-31 22:09:31.561549259 +0200 +--- src/ex_getln.c 2018-09-06 21:39:30.638725276 +0200 +*************** +*** 271,276 **** +--- 271,277 ---- + /* + * Return TRUE when 'incsearch' highlighting is to be done. + * Sets search_first_line and search_last_line to the address range. ++ * May change the last search pattern. + */ + static int + do_incsearch_highlighting(int firstc, incsearch_state_T *is_state, +*************** +*** 470,477 **** +--- 471,482 ---- + int next_char; + int use_last_pat; + ++ // Parsing range may already set the last search pattern. ++ save_last_search_pattern(); ++ + if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) + { ++ restore_last_search_pattern(); + finish_incsearch_highlighting(FALSE, is_state, TRUE); + return; + } +*************** +*** 479,484 **** +--- 484,490 ---- + // If there is a character waiting, search and redraw later. + if (char_avail()) + { ++ restore_last_search_pattern(); + is_state->incsearch_postponed = TRUE; + return; + } +*************** +*** 493,499 **** + curwin->w_cursor.lnum = search_first_line; + curwin->w_cursor.col = 0; + } +- save_last_search_pattern(); + + // Use the previous pattern for ":s//". + next_char = ccline.cmdbuff[skiplen + patlen]; +--- 499,504 ---- +*************** +*** 627,636 **** +--- 632,650 ---- + int i; + int save; + ++ // Parsing range may already set the last search pattern. ++ save_last_search_pattern(); ++ + if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) ++ { ++ restore_last_search_pattern(); + return OK; ++ } + if (patlen == 0 && ccline.cmdbuff[skiplen] == NUL) ++ { ++ restore_last_search_pattern(); + return FAIL; ++ } + + if (firstc == ccline.cmdbuff[skiplen]) + { +*************** +*** 641,647 **** + else + pat = ccline.cmdbuff + skiplen; + +- save_last_search_pattern(); + cursor_off(); + out_flush(); + if (c == Ctrl_G) +--- 655,660 ---- +*************** +*** 721,728 **** +--- 734,747 ---- + { + int skiplen, patlen; + ++ // Parsing range may already set the last search pattern. ++ save_last_search_pattern(); ++ + if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen)) ++ { ++ restore_last_search_pattern(); + return FAIL; ++ } + + // Add a character from under the cursor for 'incsearch'. + if (is_state->did_incsearch) +*** ../vim-8.1.0350/src/testdir/test_search.vim 2018-08-31 22:09:31.561549259 +0200 +--- src/testdir/test_search.vim 2018-09-06 21:36:42.844553891 +0200 +*************** +*** 1043,1048 **** +--- 1043,1065 ---- + call delete('Xis_vimgrep_script') + endfunc + ++ func Test_keep_last_search_pattern() ++ if !exists('+incsearch') ++ return ++ endif ++ new ++ call setline(1, ['foo', 'foo', 'foo']) ++ set incsearch ++ call test_override("char_avail", 1) ++ let @/ = 'bar' ++ call feedkeys(":/foo/s//\", 'ntx') ++ call assert_equal('bar', @/) ++ ++ bwipe! ++ call test_override("ALL", 0) ++ set noincsearch ++ endfunc ++ + func Test_search_undefined_behaviour() + if !has("terminal") + return +*** ../vim-8.1.0350/src/version.c 2018-09-06 16:27:20.664831945 +0200 +--- src/version.c 2018-09-06 21:33:45.218506207 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 351, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +3. Every time someone asks you to do something, ask if they want fries + with that. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0352 b/data/vim/patches/8.1.0352 new file mode 100644 index 000000000..75ff41085 --- /dev/null +++ b/data/vim/patches/8.1.0352 @@ -0,0 +1,179 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0352 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0352 +Problem: Browsing compressed tar files does not always work. +Solution: Use the "file" command to get the compression type. +Files: runtime/autoload/tar.vim + + +*** ../vim-8.1.0351/runtime/autoload/tar.vim 2016-09-25 21:41:24.000000000 +0200 +--- runtime/autoload/tar.vim 2018-09-08 15:09:32.841486806 +0200 +*************** +*** 152,161 **** + " assuming cygwin + let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') + endif + let curlast= line("$") + if tarfile =~# '\.\(gz\|tgz\)$' + " call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") +! exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " + elseif tarfile =~# '\.lrp' + " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") + exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " +--- 152,163 ---- + " assuming cygwin + let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') + endif ++ + let curlast= line("$") + if tarfile =~# '\.\(gz\|tgz\)$' ++ let gzip_command = s:get_gzip_command(tarfile) + " call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") +! exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " + elseif tarfile =~# '\.lrp' + " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") + exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " +*************** +*** 287,298 **** + else + let tar_secure= " " + endif + if tarfile =~# '\.bz2$' + " call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) + exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + elseif tarfile =~# '\.\(gz\|tgz\)$' + " call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1)) +! exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + elseif tarfile =~# '\.lrp$' + " call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) + exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp +--- 289,302 ---- + else + let tar_secure= " " + endif ++ + if tarfile =~# '\.bz2$' + " call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) + exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + elseif tarfile =~# '\.\(gz\|tgz\)$' ++ let gzip_command = s:get_gzip_command(tarfile) + " call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1)) +! exe "sil! r! " . gzip_command . " -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + elseif tarfile =~# '\.lrp$' + " call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) + exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp +*************** +*** 389,394 **** +--- 393,400 ---- + let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','') + let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','') + ++ let gzip_command = s:get_gzip_command(tarfile) ++ + " handle compressed archives + if tarfile =~# '\.bz2' + call system("bzip2 -d -- ".shellescape(tarfile,0)) +*************** +*** 396,407 **** + let compress= "bzip2 -- ".shellescape(tarfile,0) + " call Decho("compress<".compress.">") + elseif tarfile =~# '\.gz' +! call system("gzip -d -- ".shellescape(tarfile,0)) + let tarfile = substitute(tarfile,'\.gz','','e') + let compress= "gzip -- ".shellescape(tarfile,0) + " call Decho("compress<".compress.">") + elseif tarfile =~# '\.tgz' +! call system("gzip -d -- ".shellescape(tarfile,0)) + let tarfile = substitute(tarfile,'\.tgz','.tar','e') + let compress= "gzip -- ".shellescape(tarfile,0) + let tgz = 1 +--- 402,413 ---- + let compress= "bzip2 -- ".shellescape(tarfile,0) + " call Decho("compress<".compress.">") + elseif tarfile =~# '\.gz' +! call system(gzip_command . " -d -- ".shellescape(tarfile,0)) + let tarfile = substitute(tarfile,'\.gz','','e') + let compress= "gzip -- ".shellescape(tarfile,0) + " call Decho("compress<".compress.">") + elseif tarfile =~# '\.tgz' +! call system(gzip_command . " -d -- ".shellescape(tarfile,0)) + let tarfile = substitute(tarfile,'\.tgz','.tar','e') + let compress= "gzip -- ".shellescape(tarfile,0) + let tgz = 1 +*************** +*** 581,587 **** + + " if necessary, decompress the tarball; then, extract it + if tartail =~ '\.tgz' +! if executable("gunzip") + silent exe "!gunzip ".shellescape(tartail) + elseif executable("gzip") + silent exe "!gzip -d ".shellescape(tartail) +--- 587,596 ---- + + " if necessary, decompress the tarball; then, extract it + if tartail =~ '\.tgz' +! let gzip_command = s:get_gzip_command(tarfile) +! if executable(gzip_command) +! silent exe "!" . gzip_command . " -d ".shellescape(tartail) +! elseif executable("gunzip") + silent exe "!gunzip ".shellescape(tartail) + elseif executable("gzip") + silent exe "!gzip -d ".shellescape(tartail) +*************** +*** 619,624 **** +--- 628,655 ---- + " call Dret("tar#Vimuntar") + endfun + ++ func s:get_gzip_command(file) ++ " Try using the "file" command to get the actual compression type, since ++ " there is no standard way for the naming: ".tgz", ".tbz", ".txz", etc. ++ " If the "file" command doesn't work fall back to just using the file name. ++ if a:file =~# 'z$' ++ let filetype = system('file ' . a:file) ++ if filetype =~ 'bzip2 compressed' && executable('bzip2') ++ return 'bzip2' ++ endif ++ if filetype =~ 'XZ compressed' && executable('xz') ++ return 'xz' ++ endif ++ endif ++ if a:file =~# 'bz2$' ++ return 'bzip2' ++ endif ++ if a:file =~# 'xz$' ++ return 'xz' ++ endif ++ return 'gzip' ++ endfunc ++ + " ===================================================================== + " Modelines And Restoration: {{{1 + let &cpo= s:keepcpo +*** ../vim-8.1.0351/src/version.c 2018-09-06 21:44:13.660006996 +0200 +--- src/version.c 2018-09-08 14:57:29.304425238 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 352, + /**/ + +-- +If Pacman had affected us as kids we'd be running around in dark rooms, +munching pills and listening to repetitive music. + -- Marcus Brigstocke + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0353 b/data/vim/patches/8.1.0353 new file mode 100644 index 000000000..842e839c8 --- /dev/null +++ b/data/vim/patches/8.1.0353 @@ -0,0 +1,283 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0353 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0353 +Problem: An "after" directory of a package is appended to 'rtp', which + will be after the user's "after" directory. () +Solution: Insert the package "after" directory before any other "after" + directory in 'rtp'. (closes #3409) +Files: src/ex_cmds2.c, src/testdir/test_packadd.vim + + +*** ../vim-8.1.0352/src/ex_cmds2.c 2018-08-31 23:06:18.735841246 +0200 +--- src/ex_cmds2.c 2018-09-08 18:03:22.848808156 +0200 +*************** +*** 3691,3704 **** + add_pack_dir_to_rtp(char_u *fname) + { + char_u *p4, *p3, *p2, *p1, *p; +! char_u *insp; + int c; + char_u *new_rtp; + int keep; + size_t oldlen; + size_t addlen; + char_u *afterdir = NULL; + size_t afterlen = 0; + char_u *ffname = NULL; + size_t fname_len; + char_u *buf = NULL; +--- 3691,3707 ---- + add_pack_dir_to_rtp(char_u *fname) + { + char_u *p4, *p3, *p2, *p1, *p; +! char_u *entry; +! char_u *insp = NULL; + int c; + char_u *new_rtp; + int keep; + size_t oldlen; + size_t addlen; ++ size_t new_rtp_len; + char_u *afterdir = NULL; + size_t afterlen = 0; ++ char_u *after_insp = NULL; + char_u *ffname = NULL; + size_t fname_len; + char_u *buf = NULL; +*************** +*** 3725,3778 **** + if (ffname == NULL) + return FAIL; + +! /* Find "ffname" in "p_rtp", ignoring '/' vs '\' differences. */ + fname_len = STRLEN(ffname); +- insp = p_rtp; + buf = alloc(MAXPATHL); + if (buf == NULL) + goto theend; +! while (*insp != NUL) + { +! copy_option_part(&insp, buf, MAXPATHL, ","); +! add_pathsep(buf); +! rtp_ffname = fix_fname(buf); +! if (rtp_ffname == NULL) +! goto theend; +! match = vim_fnamencmp(rtp_ffname, ffname, fname_len) == 0; +! vim_free(rtp_ffname); +! if (match) + break; + } + +! if (*insp == NUL) +! /* not found, append at the end */ + insp = p_rtp + STRLEN(p_rtp); +- else +- /* append after the matching directory. */ +- --insp; + +! /* check if rtp/pack/name/start/name/after exists */ + afterdir = concat_fnames(fname, (char_u *)"after", TRUE); + if (afterdir != NULL && mch_isdir(afterdir)) +! afterlen = STRLEN(afterdir) + 1; /* add one for comma */ + + oldlen = STRLEN(p_rtp); +! addlen = STRLEN(fname) + 1; /* add one for comma */ +! new_rtp = alloc((int)(oldlen + addlen + afterlen + 1)); +! /* add one for NUL */ + if (new_rtp == NULL) + goto theend; + keep = (int)(insp - p_rtp); + mch_memmove(new_rtp, p_rtp, keep); +! new_rtp[keep] = ','; +! mch_memmove(new_rtp + keep + 1, fname, addlen); + if (p_rtp[keep] != NUL) +! mch_memmove(new_rtp + keep + addlen, p_rtp + keep, oldlen - keep + 1); +! if (afterlen > 0) + { + STRCAT(new_rtp, ","); + STRCAT(new_rtp, afterdir); + } + set_option_value((char_u *)"rtp", 0L, new_rtp, 0); + vim_free(new_rtp); + retval = OK; +--- 3728,3826 ---- + if (ffname == NULL) + return FAIL; + +! // Find "ffname" in "p_rtp", ignoring '/' vs '\' differences. +! // Also stop at the first "after" directory. + fname_len = STRLEN(ffname); + buf = alloc(MAXPATHL); + if (buf == NULL) + goto theend; +! for (entry = p_rtp; *entry != NUL; ) + { +! char_u *cur_entry = entry; +! +! copy_option_part(&entry, buf, MAXPATHL, ","); +! if (insp == NULL) +! { +! add_pathsep(buf); +! rtp_ffname = fix_fname(buf); +! if (rtp_ffname == NULL) +! goto theend; +! match = vim_fnamencmp(rtp_ffname, ffname, fname_len) == 0; +! vim_free(rtp_ffname); +! if (match) +! // Insert "ffname" after this entry (and comma). +! insp = entry; +! } +! +! if ((p = (char_u *)strstr((char *)buf, "after")) != NULL +! && p > buf +! && vim_ispathsep(p[-1]) +! && (vim_ispathsep(p[5]) || p[5] == NUL || p[5] == ',')) +! { +! if (insp == NULL) +! // Did not find "ffname" before the first "after" directory, +! // insert it before this entry. +! insp = cur_entry; +! after_insp = cur_entry; + break; ++ } + } + +! if (insp == NULL) +! // Both "fname" and "after" not found, append at the end. + insp = p_rtp + STRLEN(p_rtp); + +! // check if rtp/pack/name/start/name/after exists + afterdir = concat_fnames(fname, (char_u *)"after", TRUE); + if (afterdir != NULL && mch_isdir(afterdir)) +! afterlen = STRLEN(afterdir) + 1; // add one for comma + + oldlen = STRLEN(p_rtp); +! addlen = STRLEN(fname) + 1; // add one for comma +! new_rtp = alloc((int)(oldlen + addlen + afterlen + 1)); // add one for NUL + if (new_rtp == NULL) + goto theend; ++ ++ // We now have 'rtp' parts: {keep}{keep_after}{rest}. ++ // Create new_rtp, first: {keep},{fname} + keep = (int)(insp - p_rtp); + mch_memmove(new_rtp, p_rtp, keep); +! new_rtp_len = keep; +! if (*insp == NUL) +! new_rtp[new_rtp_len++] = ','; // add comma before +! mch_memmove(new_rtp + new_rtp_len, fname, addlen - 1); +! new_rtp_len += addlen - 1; +! if (*insp != NUL) +! new_rtp[new_rtp_len++] = ','; // add comma after +! +! if (afterlen > 0 && after_insp != NULL) +! { +! int keep_after = (int)(after_insp - p_rtp); +! +! // Add to new_rtp: {keep},{fname}{keep_after},{afterdir} +! mch_memmove(new_rtp + new_rtp_len, p_rtp + keep, +! keep_after - keep); +! new_rtp_len += keep_after - keep; +! mch_memmove(new_rtp + new_rtp_len, afterdir, afterlen - 1); +! new_rtp_len += afterlen - 1; +! new_rtp[new_rtp_len++] = ','; +! keep = keep_after; +! } +! + if (p_rtp[keep] != NUL) +! // Append rest: {keep},{fname}{keep_after},{afterdir}{rest} +! mch_memmove(new_rtp + new_rtp_len, p_rtp + keep, oldlen - keep + 1); +! else +! new_rtp[new_rtp_len] = NUL; +! +! if (afterlen > 0 && after_insp == NULL) + { ++ // Append afterdir when "after" was not found: ++ // {keep},{fname}{rest},{afterdir} + STRCAT(new_rtp, ","); + STRCAT(new_rtp, afterdir); + } ++ + set_option_value((char_u *)"rtp", 0L, new_rtp, 0); + vim_free(new_rtp); + retval = OK; +*** ../vim-8.1.0352/src/testdir/test_packadd.vim 2018-04-18 21:56:13.000000000 +0200 +--- src/testdir/test_packadd.vim 2018-09-08 18:16:43.969062182 +0200 +*************** +*** 12,17 **** +--- 12,22 ---- + endfunc + + func Test_packadd() ++ if !exists('s:plugdir') ++ echomsg 'when running this test manually, call SetUp() first' ++ return ++ endif ++ + call mkdir(s:plugdir . '/plugin/also', 'p') + call mkdir(s:plugdir . '/ftdetect', 'p') + call mkdir(s:plugdir . '/after', 'p') +*************** +*** 19,24 **** +--- 24,37 ---- + let rtp = &rtp + filetype on + ++ let rtp_entries = split(rtp, ',') ++ for entry in rtp_entries ++ if entry =~? '\' ++ let first_after_entry = entry ++ break ++ endif ++ endfor ++ + exe 'split ' . s:plugdir . '/plugin/test.vim' + call setline(1, 'let g:plugin_works = 42') + wq +*************** +*** 38,44 **** + call assert_equal(17, g:ftdetect_works) + call assert_true(len(&rtp) > len(rtp)) + call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp) +! call assert_match('/testdir/Xdir/pack/mine/opt/mytest/after$', &rtp) + + " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest' + call mkdir(fnamemodify(s:plugdir, ':h') . '/myte', 'p') +--- 51,62 ---- + call assert_equal(17, g:ftdetect_works) + call assert_true(len(&rtp) > len(rtp)) + call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp) +! +! let new_after = match(&rtp, '/testdir/Xdir/pack/mine/opt/mytest/after,') +! let old_after = match(&rtp, ',' . first_after_entry . '\>') +! call assert_true(new_after > 0, 'rtp is ' . &rtp) +! call assert_true(old_after > 0, 'rtp is ' . &rtp) +! call assert_true(new_after < old_after, 'rtp is ' . &rtp) + + " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest' + call mkdir(fnamemodify(s:plugdir, ':h') . '/myte', 'p') +*** ../vim-8.1.0352/src/version.c 2018-09-08 15:10:14.405097082 +0200 +--- src/version.c 2018-09-08 17:01:12.259798047 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 353, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +14. Put mosquito netting around your work area. Play a tape of jungle + sounds all day. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0354 b/data/vim/patches/8.1.0354 new file mode 100644 index 000000000..fb5a442de --- /dev/null +++ b/data/vim/patches/8.1.0354 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0354 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0354 (after 8.1.0353) +Problem: Packadd test fails on MS-Windows. +Solution: Ignore difference between forward and backward slashes. +Files: src/testdir/test_packadd.vim + + +*** ../vim-8.1.0353/src/testdir/test_packadd.vim 2018-09-08 18:21:10.438503190 +0200 +--- src/testdir/test_packadd.vim 2018-09-08 19:07:32.684241713 +0200 +*************** +*** 53,61 **** + call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp) + + let new_after = match(&rtp, '/testdir/Xdir/pack/mine/opt/mytest/after,') +! let old_after = match(&rtp, ',' . first_after_entry . '\>') + call assert_true(new_after > 0, 'rtp is ' . &rtp) +! call assert_true(old_after > 0, 'rtp is ' . &rtp) + call assert_true(new_after < old_after, 'rtp is ' . &rtp) + + " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest' +--- 53,62 ---- + call assert_match('/testdir/Xdir/pack/mine/opt/mytest\($\|,\)', &rtp) + + let new_after = match(&rtp, '/testdir/Xdir/pack/mine/opt/mytest/after,') +! let forwarded = substitute(first_after_entry, '\\', '[/\\\\]', 'g') +! let old_after = match(&rtp, ',' . forwarded . '\>') + call assert_true(new_after > 0, 'rtp is ' . &rtp) +! call assert_true(old_after > 0, 'match ' . forwarded . ' in ' . &rtp) + call assert_true(new_after < old_after, 'rtp is ' . &rtp) + + " NOTE: '/.../opt/myte' forwardly matches with '/.../opt/mytest' +*** ../vim-8.1.0353/src/version.c 2018-09-08 18:21:10.438503190 +0200 +--- src/version.c 2018-09-08 18:31:17.896550895 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 354, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +16. Have your coworkers address you by your wrestling name, Rock Hard Kim. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0355 b/data/vim/patches/8.1.0355 new file mode 100644 index 000000000..97e4d3346 --- /dev/null +++ b/data/vim/patches/8.1.0355 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0355 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0355 +Problem: Incorrect adjusting the popup menu for the preview window. +Solution: Compute position and height properl. (Ronan Pigott) Also show at + least ten items. (closes #3414) +Files: src/popupmnu.c + + +*** ../vim-8.1.0354/src/popupmnu.c 2018-06-17 17:10:55.636590392 +0200 +--- src/popupmnu.c 2018-09-09 15:17:57.698993041 +0200 +*************** +*** 141,148 **** + if (p_ph > 0 && pum_height > p_ph) + pum_height = p_ph; + +! /* Put the pum below "pum_win_row" if possible. If there are few lines decide +! * on where there is more room. */ + if (pum_win_row + 2 >= below_row - pum_height + && pum_win_row - above_row > (below_row - above_row) / 2) + { +--- 141,148 ---- + if (p_ph > 0 && pum_height > p_ph) + pum_height = p_ph; + +! /* Put the pum below "pum_win_row" if possible. If there are few lines +! * decide on where there is more room. */ + if (pum_win_row + 2 >= below_row - pum_height + && pum_win_row - above_row > (below_row - above_row) / 2) + { +*************** +*** 196,206 **** + return; + + #if defined(FEAT_QUICKFIX) +! /* If there is a preview window at the above avoid drawing over it. */ +! if (pvwin != NULL && pum_row < above_row && pum_height > above_row) + { +! pum_row += above_row; +! pum_height -= above_row; + } + #endif + +--- 196,215 ---- + return; + + #if defined(FEAT_QUICKFIX) +! // If there is a preview window at the above avoid drawing over it. +! // Do keep at least 10 entries. +! if (pvwin != NULL && pum_row < above_row && pum_height > 10) + { +! if (pum_win_row - above_row < 10) +! { +! pum_row = pum_win_row - 10; +! pum_height = 10; +! } +! else +! { +! pum_row = above_row; +! pum_height = pum_win_row - above_row; +! } + } + #endif + +*** ../vim-8.1.0354/src/version.c 2018-09-08 19:12:09.333935467 +0200 +--- src/version.c 2018-09-09 15:19:36.357838496 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 355, + /**/ + +-- +In many of the more relaxed civilizations on the Outer Eastern Rim of the +Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the +great "Encyclopedia Galactica" as the standard repository of all knowledge +and wisdom, for though it has many omissions and contains much that is +apocryphal, or at least wildly inaccurate, it scores over the older, more +pedestrian work in two important respects. +First, it is slightly cheaper; and second, it has the words "DON'T PANIC" +inscribed in large friendly letters on its cover. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0356 b/data/vim/patches/8.1.0356 new file mode 100644 index 000000000..907ebef7e --- /dev/null +++ b/data/vim/patches/8.1.0356 @@ -0,0 +1,224 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0356 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0356 +Problem: Using :s with 'incsearch' prevents CTRL-R CTRL-W. (Boris Staletic) +Solution: When past the pattern put cursor back in the start position. + (closes #3413) +Files: src/ex_getln.c, src/testdir/test_search.vim + + +*** ../vim-8.1.0355/src/ex_getln.c 2018-09-06 21:44:13.660006996 +0200 +--- src/ex_getln.c 2018-09-09 15:53:37.117142011 +0200 +*************** +*** 462,468 **** + incsearch_state_T *is_state) + { + int skiplen, patlen; +! int i; + pos_T end_pos; + struct cmdline_info save_ccline; + #ifdef FEAT_RELTIME +--- 462,468 ---- + incsearch_state_T *is_state) + { + int skiplen, patlen; +! int found; // do_search() result + pos_T end_pos; + struct cmdline_info save_ccline; + #ifdef FEAT_RELTIME +*************** +*** 508,514 **** + // If there is no pattern, don't do anything. + if (patlen == 0 && !use_last_pat) + { +! i = 0; + set_no_hlsearch(TRUE); // turn off previous highlight + redraw_all_later(SOME_VALID); + } +--- 508,514 ---- + // If there is no pattern, don't do anything. + if (patlen == 0 && !use_last_pat) + { +! found = 0; + set_no_hlsearch(TRUE); // turn off previous highlight + redraw_all_later(SOME_VALID); + } +*************** +*** 528,534 **** + if (search_first_line != 0) + search_flags += SEARCH_START; + ccline.cmdbuff[skiplen + patlen] = NUL; +! i = do_search(NULL, firstc == ':' ? '/' : firstc, + ccline.cmdbuff + skiplen, count, search_flags, + #ifdef FEAT_RELTIME + &tm, NULL +--- 528,534 ---- + if (search_first_line != 0) + search_flags += SEARCH_START; + ccline.cmdbuff[skiplen + patlen] = NUL; +! found = do_search(NULL, firstc == ':' ? '/' : firstc, + ccline.cmdbuff + skiplen, count, search_flags, + #ifdef FEAT_RELTIME + &tm, NULL +*************** +*** 543,549 **** + || curwin->w_cursor.lnum > search_last_line) + { + // match outside of address range +! i = 0; + curwin->w_cursor = is_state->search_start; + } + +--- 543,549 ---- + || curwin->w_cursor.lnum > search_last_line) + { + // match outside of address range +! found = 0; + curwin->w_cursor = is_state->search_start; + } + +*************** +*** 552,564 **** + { + (void)vpeekc(); // remove from input stream + got_int = FALSE; // don't abandon the command line +! i = 0; + } + else if (char_avail()) + // cancelled searching because a char was typed + is_state->incsearch_postponed = TRUE; + } +! if (i != 0) + highlight_match = TRUE; // highlight position + else + highlight_match = FALSE; // remove highlight +--- 552,564 ---- + { + (void)vpeekc(); // remove from input stream + got_int = FALSE; // don't abandon the command line +! found = 0; + } + else if (char_avail()) + // cancelled searching because a char was typed + is_state->incsearch_postponed = TRUE; + } +! if (found != 0) + highlight_match = TRUE; // highlight position + else + highlight_match = FALSE; // remove highlight +*************** +*** 569,575 **** + changed_cline_bef_curs(); + update_topline(); + +! if (i != 0) + { + pos_T save_pos = curwin->w_cursor; + +--- 569,575 ---- + changed_cline_bef_curs(); + update_topline(); + +! if (found != 0) + { + pos_T save_pos = curwin->w_cursor; + +*************** +*** 604,611 **** + restore_cmdline(&save_ccline); + restore_last_search_pattern(); + +! // Leave it at the end to make CTRL-R CTRL-W work. +! if (i != 0) + curwin->w_cursor = end_pos; + + msg_starthere(); +--- 604,614 ---- + restore_cmdline(&save_ccline); + restore_last_search_pattern(); + +! // Leave it at the end to make CTRL-R CTRL-W work. But not when beyond the +! // end of the pattern, e.g. for ":s/pat/". +! if (ccline.cmdbuff[skiplen + patlen] != NUL) +! curwin->w_cursor = is_state->search_start; +! else if (found != 0) + curwin->w_cursor = end_pos; + + msg_starthere(); +*** ../vim-8.1.0355/src/testdir/test_search.vim 2018-09-06 21:44:13.660006996 +0200 +--- src/testdir/test_search.vim 2018-09-09 15:50:31.934618534 +0200 +*************** +*** 1060,1065 **** +--- 1060,1101 ---- + set noincsearch + endfunc + ++ func Test_word_under_cursor_after_match() ++ if !exists('+incsearch') ++ return ++ endif ++ new ++ call setline(1, 'foo bar') ++ set incsearch ++ call test_override("char_avail", 1) ++ try ++ call feedkeys("/foo\\\", 'ntx') ++ catch /E486:/ ++ endtry ++ call assert_equal('foobar', @/) ++ ++ bwipe! ++ call test_override("ALL", 0) ++ set noincsearch ++ endfunc ++ ++ func Test_subst_word_under_cursor() ++ if !exists('+incsearch') ++ return ++ endif ++ new ++ call setline(1, ['int SomeLongName;', 'for (xxx = 1; xxx < len; ++xxx)']) ++ set incsearch ++ call test_override("char_avail", 1) ++ call feedkeys("/LongName\", 'ntx') ++ call feedkeys(":%s/xxx/\\/g\", 'ntx') ++ call assert_equal('for (SomeLongName = 1; SomeLongName < len; ++SomeLongName)', getline(2)) ++ ++ bwipe! ++ call test_override("ALL", 0) ++ set noincsearch ++ endfunc ++ + func Test_search_undefined_behaviour() + if !has("terminal") + return +*** ../vim-8.1.0355/src/version.c 2018-09-09 15:27:54.812344748 +0200 +--- src/version.c 2018-09-09 15:52:51.437517050 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 356, + /**/ + +-- +"So this is it," said Arthur, "we are going to die." +"Yes," said Ford, "except...no! Wait a minute!" He suddenly lunged across +the chamber at something behind Arthur's line of vision. "What's this +switch?" he cried. +"What? Where?" cried Arthur, twisting around. +"No, I was only fooling," said Ford, "we are going to die after all." + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0357 b/data/vim/patches/8.1.0357 new file mode 100644 index 000000000..6b677046f --- /dev/null +++ b/data/vim/patches/8.1.0357 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0357 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0357 +Problem: Instructions for tests are outdated. (Jason Franklin) +Solution: Update the text. +Files: src/testdir/README.txt + + +*** ../vim-8.1.0356/src/testdir/README.txt 2018-02-20 15:36:03.000000000 +0100 +--- src/testdir/README.txt 2018-09-01 14:24:39.775264173 +0200 +*************** +*** 15,37 **** + + 1) Create a test_.vim file. + 2) Add test_.res to NEW_TESTS in Make_all.mak in alphabetical order. +! 3) Also add an entry in src/Makefile. + 4) Use make test_.res to run a single test in src/testdir/. + Use make test_ to run a single test in src/. + + What you can use (see test_assert.vim for an example): + - Call assert_equal(), assert_true(), assert_false(), etc. +! - Use try/catch to check for exceptions. +! - Use alloc_fail() to have memory allocation fail. This makes it possible +! to check memory allocation failures are handled gracefully. You need to +! change the source code to add an ID to the allocation. Update LAST_ID_USED +! above alloc_id() to the highest ID used. +! - Use disable_char_avail_for_testing(1) if char_avail() must return FALSE for +! a while. E.g. to trigger the CursorMovedI autocommand event. +! See test_cursor_func.vim for an example + - If the bug that is being tested isn't fixed yet, you can throw an exception +! so that it's clear this still needs work. E.g.: +! throw "Skipped: Bug with and popupmenu not fixed yet" + - See the start of runtest.vim for more help. + + +--- 15,54 ---- + + 1) Create a test_.vim file. + 2) Add test_.res to NEW_TESTS in Make_all.mak in alphabetical order. +! 3) Also add an entry "test_" in src/Make_all.mak. + 4) Use make test_.res to run a single test in src/testdir/. + Use make test_ to run a single test in src/. + ++ At 2), instead of running the test separately, it can be included in ++ "test_alot". Do this for quick tests without side effects. The test runs a ++ bit faster, because Vim doesn't have to be started, one Vim instance runs many ++ tests. ++ ++ + What you can use (see test_assert.vim for an example): ++ + - Call assert_equal(), assert_true(), assert_false(), etc. +! +! - Use assert_fails() to check for expected errors. +! +! - Use try/catch to avoid an exception aborts the test. +! +! - Use alloc_fail() to have memory allocation fail. This makes it possible to +! check memory allocation failures are handled gracefully. You need to change +! +! - the source code to add an ID to the allocation. Update LAST_ID_USED above +! alloc_id() to the highest ID used. +! +! - Use test_override() to make Vim behave differently, e.g. if char_avail() +! must return FALSE for a while. E.g. to trigger the CursorMovedI autocommand +! event. +! +! - See test_cursor_func.vim for an example. +! + - If the bug that is being tested isn't fixed yet, you can throw an exception +! with "Skipped" so that it's clear this still needs work. E.g.: throw +! "Skipped: Bug with and popupmenu not fixed yet" +! + - See the start of runtest.vim for more help. + + +*** ../vim-8.1.0356/src/version.c 2018-09-09 15:54:11.232857907 +0200 +--- src/version.c 2018-09-09 15:55:30.172188706 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 357, + /**/ + +-- +I am also told that there is a logical proof out there somewhere +that demonstrates that there is no task which duct tape cannot handle. + -- Paul Brannan + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0358 b/data/vim/patches/8.1.0358 new file mode 100644 index 000000000..7bc717a06 --- /dev/null +++ b/data/vim/patches/8.1.0358 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0358 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0358 +Problem: Crash when using term_dumpwrite() after the job finished. +Solution: Check for a finished job and give an error message. +Files: src/terminal.c + + +*** ../vim-8.1.0357/src/terminal.c 2018-08-24 21:30:24.818557489 +0200 +--- src/terminal.c 2018-09-09 18:24:15.762463460 +0200 +*************** +*** 3871,3876 **** +--- 3871,3881 ---- + if (buf == NULL) + return; + term = buf->b_term; ++ if (term->tl_vterm == NULL) ++ { ++ EMSG(_("E958: Job already finished")); ++ return; ++ } + + if (argvars[2].v_type != VAR_UNKNOWN) + { +*** ../vim-8.1.0357/src/version.c 2018-09-09 15:56:03.143904759 +0200 +--- src/version.c 2018-09-09 19:55:31.327054155 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 358, + /**/ + +-- +"Space is big. Really big. You just won't believe how vastly hugely mind- +bogglingly big it is. I mean, you may think it's a long way down the +road to the chemist, but that's just peanuts to space." + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0359 b/data/vim/patches/8.1.0359 new file mode 100644 index 000000000..d8d00d452 --- /dev/null +++ b/data/vim/patches/8.1.0359 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0359 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0359 +Problem: No clue what test failed when using a screendump twice. +Solution: Add an extra argument to VerifyScreenDump(). +Files: src/testdir/screendump.vim + + +*** ../vim-8.1.0358/src/testdir/screendump.vim 2018-06-04 19:11:06.604648995 +0200 +--- src/testdir/screendump.vim 2018-09-09 20:46:34.535736225 +0200 +*************** +*** 93,100 **** + " Verify that Vim running in terminal buffer "buf" matches the screen dump. + " "options" is passed to term_dumpwrite(). + " The file name used is "dumps/{filename}.dump". + " Will wait for up to a second for the screen dump to match. +! func VerifyScreenDump(buf, filename, options) + let reference = 'dumps/' . a:filename . '.dump' + let testfile = a:filename . '.dump.failed' + +--- 93,103 ---- + " Verify that Vim running in terminal buffer "buf" matches the screen dump. + " "options" is passed to term_dumpwrite(). + " The file name used is "dumps/{filename}.dump". ++ " Optionally an extra argument can be passed which is prepended to the error ++ " message. Use this when using the same dump file with different options. + " Will wait for up to a second for the screen dump to match. +! " Returns non-zero when verification fails. +! func VerifyScreenDump(buf, filename, options, ...) + let reference = 'dumps/' . a:filename . '.dump' + let testfile = a:filename . '.dump.failed' + +*************** +*** 108,117 **** + endif + if i == 100 + " Leave the test file around for inspection. +! call assert_report('See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")') +! break + endif + sleep 10m + let i += 1 + endwhile + endfunc +--- 111,125 ---- + endif + if i == 100 + " Leave the test file around for inspection. +! let msg = 'See dump file difference: call term_dumpdiff("' . testfile . '", "' . reference . '")' +! if a:0 == 1 +! let msg = a:1 . ': ' . msg +! endif +! call assert_report(msg) +! return 1 + endif + sleep 10m + let i += 1 + endwhile ++ return 0 + endfunc +*** ../vim-8.1.0358/src/version.c 2018-09-09 19:56:03.434838223 +0200 +--- src/version.c 2018-09-09 22:01:05.478507254 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 359, + /**/ + +-- +`The Guide says there is an art to flying,' said Ford, `or at least a +knack. The knack lies in learning how to throw yourself at the ground +and miss.' He smiled weakly. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0360 b/data/vim/patches/8.1.0360 new file mode 100644 index 000000000..df0fd10d6 --- /dev/null +++ b/data/vim/patches/8.1.0360 @@ -0,0 +1,6803 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0360 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0360 +Problem: Using an external diff program is slow and inflexible. +Solution: Include the xdiff library. (Christian Brabandt, closes #2732) + Use it by default. +Files: Filelist, runtime/doc/diff.txt, runtime/doc/options.txt, + src/Make_cyg_ming.mak, src/Make_mvc.mak, src/Makefile, src/diff.c, + src/structs.h, src/testdir/dumps/Test_diff_01.dump, + src/testdir/dumps/Test_diff_02.dump, + src/testdir/dumps/Test_diff_03.dump, + src/testdir/dumps/Test_diff_04.dump, + src/testdir/dumps/Test_diff_05.dump, + src/testdir/dumps/Test_diff_06.dump, + src/testdir/dumps/Test_diff_07.dump, + src/testdir/dumps/Test_diff_08.dump, + src/testdir/dumps/Test_diff_09.dump, + src/testdir/dumps/Test_diff_10.dump, + src/testdir/dumps/Test_diff_11.dump, + src/testdir/dumps/Test_diff_12.dump, + src/testdir/dumps/Test_diff_13.dump, + src/testdir/dumps/Test_diff_14.dump, + src/testdir/dumps/Test_diff_15.dump, + src/testdir/dumps/Test_diff_16.dump, + src/testdir/test_diffmode.vim, src/xdiff/COPYING, + src/xdiff/xdiff.h, src/xdiff/xdiffi.c, src/xdiff/xdiffi.h, + src/xdiff/xemit.c, src/xdiff/xemit.h, src/xdiff/xhistogram.c, + src/xdiff/xinclude.h, src/xdiff/xmacros.h, src/xdiff/xpatience.c, + src/xdiff/xprepare.c, src/xdiff/xprepare.h, src/xdiff/xtypes.h, + src/xdiff/xutils.c, src/xdiff/xutils.h, src/xdiff/README.txt + + +*** ../vim-8.1.0359/Filelist 2018-09-02 15:26:53.829022193 +0200 +--- Filelist 2018-09-10 17:23:29.323602967 +0200 +*************** +*** 273,278 **** +--- 273,292 ---- + src/libvterm/t/92lp1640917.test \ + src/libvterm/t/harness.c \ + src/libvterm/t/run-test.pl \ ++ src/xdiff/xdiff.h \ ++ src/xdiff/xdiffi.c \ ++ src/xdiff/xdiffi.h \ ++ src/xdiff/xemit.c \ ++ src/xdiff/xemit.h \ ++ src/xdiff/xhistogram.c \ ++ src/xdiff/xinclude.h \ ++ src/xdiff/xmacros.h \ ++ src/xdiff/xpatience.c \ ++ src/xdiff/xprepare.c \ ++ src/xdiff/xprepare.h \ ++ src/xdiff/xtypes.h \ ++ src/xdiff/xutils.c \ ++ src/xdiff/xutils.h \ + + + # source files for Unix only +*** ../vim-8.1.0359/runtime/doc/diff.txt 2018-05-17 13:40:51.000000000 +0200 +--- runtime/doc/diff.txt 2018-09-10 17:24:29.783082384 +0200 +*************** +*** 39,45 **** + then append the file name of the first argument to the directory name to find + the file. + +! This only works when a standard "diff" command is available. See 'diffexpr'. + + Diffs are local to the current tab page |tab-page|. You can't see diffs with + a window in another tab page. This does make it possible to have several +--- 39,47 ---- + then append the file name of the first argument to the directory name to find + the file. + +! By default an internal diff library will be used. When 'diffopt' or +! 'diffexpr' has been set an external "diff" command will be used. This only +! works when such a diff program is available. + + Diffs are local to the current tab page |tab-page|. You can't see diffs with + a window in another tab page. This does make it possible to have several +*************** +*** 344,351 **** + + The ">" is replaced with the value of 'shellredir'. + +! The output of "diff" must be a normal "ed" style diff. Do NOT use a context +! diff. This example explains the format that Vim expects: > + + 1a2 + > bbb +--- 346,354 ---- + + The ">" is replaced with the value of 'shellredir'. + +! The output of "diff" must be a normal "ed" style diff or a unified diff. Do +! NOT use a context diff. This example explains the format that Vim expects for +! the "ed" style diff: > + + 1a2 + > bbb +*************** +*** 384,395 **** +--- 387,402 ---- + endif + silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new . + \ " > " . v:fname_out ++ redraw! + endfunction + + The "-a" argument is used to force comparing the files as text, comparing as + binaries isn't useful. The "--binary" argument makes the files read in binary + mode, so that a CTRL-Z doesn't end the text on DOS. + ++ The `redraw!` command may not be needed, depending on whether executing a ++ shell command shows something on the display or not. ++ + *E810* *E97* + Vim will do a test if the diff output looks alright. If it doesn't, you will + get an error message. Possible causes: +*************** +*** 441,444 **** + directory are accidentally patched. Vim will also delete files starting with + v:fname_in and ending in ".rej" and ".orig". + +! vim:tw=78:ts=8:ft=help:norl: +--- 448,451 ---- + directory are accidentally patched. Vim will also delete files starting with + v:fname_in and ending in ".rej" and ".orig". + +! vim:tw=78:ts=8:noet:ft=help:norl: +*** ../vim-8.1.0359/runtime/doc/options.txt 2018-08-07 21:39:09.243060141 +0200 +--- runtime/doc/options.txt 2018-09-10 17:25:45.414250299 +0200 +*************** +*** 2605,2612 **** + {not in Vi} + {not available when compiled without the |+diff| + feature} +! Expression which is evaluated to obtain an ed-style diff file from two +! versions of a file. See |diff-diffexpr|. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + +--- 2609,2616 ---- + {not in Vi} + {not available when compiled without the |+diff| + feature} +! Expression which is evaluated to obtain a diff file (either ed-style +! or unified-style) from two versions of a file. See |diff-diffexpr|. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + +*************** +*** 2653,2663 **** + foldcolumn:{n} Set the 'foldcolumn' option to {n} when + starting diff mode. Without this 2 is used. + +! Examples: > + +! :set diffopt=filler,context:4 + :set diffopt= +! :set diffopt=filler,foldcolumn:3 + < + *'digraph'* *'dg'* *'nodigraph'* *'nodg'* + 'digraph' 'dg' boolean (default off) +--- 2657,2687 ---- + foldcolumn:{n} Set the 'foldcolumn' option to {n} when + starting diff mode. Without this 2 is used. + +! internal Use the internal diff library. This is +! ignored when 'diffexpr' is set. *E960* +! When running out of memory when writing a +! buffer this item will be ignored for diffs +! involving that buffer. Set the 'verbose' +! option to see when this happens. +! +! indent-heuristic +! Use the indent heuristic for the internal +! diff library. +! +! algorithm:{text} Use the specified diff algorithm with the +! internal diff engine. Currently supported +! algorithms are: +! myers the default algorithm +! minimal spend extra time to generate the +! smallest possible diff +! patience patience diff algorithm +! histogram histogram diff algorithm + +! Examples: > +! :set diffopt=internal,filler,context:4 + :set diffopt= +! :set diffopt=internal,filler,foldcolumn:3 +! :set diffopt-=internal " do NOT use the internal diff parser + < + *'digraph'* *'dg'* *'nodigraph'* *'nodg'* + 'digraph' 'dg' boolean (default off) +*** ../vim-8.1.0359/src/Make_cyg_ming.mak 2018-06-30 16:25:00.551755794 +0200 +--- src/Make_cyg_ming.mak 2018-09-10 17:29:26.599063750 +0200 +*************** +*** 166,171 **** +--- 166,190 ---- + ifndef CROSS_COMPILE + CROSS_COMPILE = + endif ++ ++ # About the "sh.exe" condition, as explained by Ken Takata: ++ # ++ # If the makefile is executed with mingw32-make and sh.exe is not found in ++ # $PATH, then $SHELL is set to "sh.exe" (without any path). In this case, ++ # unix-like commands might not work and a dos-style path is needed. ++ # ++ # If the makefile is executed with mingw32-make and sh.exe IS found in $PATH, ++ # then $SHELL is set with the actual path of sh.exe (e.g. ++ # "C:/msys64/usr/bin/sh.exe"). In this case, unix-like commands can be used. ++ # ++ # If it is executed by the "make" command from cmd.exe, $SHELL is set to ++ # "/bin/sh". If the "make" command is in the $PATH, other unix-like commands ++ # might also work. ++ # ++ # If it is executed by the "make" command from a unix-like shell, ++ # $SHELL is set with the unix-style path (e.g. "/bin/bash"). ++ # In this case, unix-like commands can be used. ++ # + ifneq (sh.exe, $(SHELL)) + DEL = rm + MKDIR = mkdir -p +*************** +*** 810,815 **** +--- 829,851 ---- + $(OUTDIR)/term_vterm.o + endif + ++ # Include xdiff ++ OBJ += $(OUTDIR)/xdiffi.o \ ++ $(OUTDIR)/xemit.o \ ++ $(OUTDIR)/xprepare.o \ ++ $(OUTDIR)/xutils.o \ ++ $(OUTDIR)/xhistogram.o \ ++ $(OUTDIR)/xpatience.o ++ ++ XDIFF_DEPS = \ ++ xdiff/xdiff.h \ ++ xdiff/xdiffi.h \ ++ xdiff/xemit.h \ ++ xdiff/xinclude.h \ ++ xdiff/xmacros.h \ ++ xdiff/xprepare.h \ ++ xdiff/xtypes.h \ ++ xdiff/xutils.h + + ifdef MZSCHEME + MZSCHEME_SUFFIX = Z +*************** +*** 1055,1060 **** +--- 1091,1113 ---- + $(OUTDIR)/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/vterm.c -o $@ + ++ $(OUTDIR)/xdiffi.o: xdiff/xdiffi.c $(XDIFF_DEPS) ++ $(CC) -c $(CFLAGS) xdiff/xdiffi.c -o $(OUTDIR)/xdiffi.o ++ ++ $(OUTDIR)/xemit.o: xdiff/xemit.c $(XDIFF_DEPS) ++ $(CC) -c $(CFLAGS) xdiff/xemit.c -o $(OUTDIR)/xemit.o ++ ++ $(OUTDIR)/xprepare.o: xdiff/xprepare.c $(XDIFF_DEPS) ++ $(CC) -c $(CFLAGS) xdiff/xprepare.c -o $(OUTDIR)/xprepare.o ++ ++ $(OUTDIR)/xutils.o: xdiff/xutils.c $(XDIFF_DEPS) ++ $(CC) -c $(CFLAGS) xdiff/xutils.c -o $(OUTDIR)/xutils.o ++ ++ $(OUTDIR)/xhistogram.o: xdiff/xhistogram.c $(XDIFF_DEPS) ++ $(CC) -c $(CFLAGS) xdiff/xhistogram.c -o $(OUTDIR)/xhistogram.o ++ ++ $(OUTDIR)/xpatience.o: xdiff/xpatience.c $(XDIFF_DEPS) ++ $(CC) -c $(CFLAGS) xdiff/xpatience.c -o $(OUTDIR)/xpatience.o + + pathdef.c: $(INCL) + ifneq (sh.exe, $(SHELL)) +*** ../vim-8.1.0359/src/Make_mvc.mak 2018-07-04 23:05:19.221931527 +0200 +--- src/Make_mvc.mak 2018-09-10 17:32:03.885044447 +0200 +*************** +*** 813,818 **** +--- 813,836 ---- + !endif + SUBSYSTEM_TOOLS = console + ++ XDIFF_OBJ = $(OBJDIR)/xdiffi.obj \ ++ $(OBJDIR)/xemit.obj \ ++ $(OBJDIR)/xprepare.obj \ ++ $(OBJDIR)/xutils.obj \ ++ $(OBJDIR)/xhistogram.obj \ ++ $(OBJDIR)/xpatience.obj ++ ++ XDIFF_DEPS = \ ++ xdiff/xdiff.h \ ++ xdiff/xdiffi.h \ ++ xdiff/xemit.h \ ++ xdiff/xinclude.h \ ++ xdiff/xmacros.h \ ++ xdiff/xprepare.h \ ++ xdiff/xtypes.h \ ++ xdiff/xutils.h ++ ++ + !if "$(SUBSYSTEM_VER)" != "" + SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) + SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER) +*************** +*** 1204,1215 **** + tee/tee.exe \ + GvimExt/gvimext.dll + +! $(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \ + $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \ + $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \ + version.c version.h + $(CC) $(CFLAGS_OUTDIR) version.c +! $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \ + $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ + $(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \ + $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) +--- 1222,1233 ---- + tee/tee.exe \ + GvimExt/gvimext.dll + +! $(VIM).exe: $(OUTDIR) $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \ + $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \ + $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \ + version.c version.h + $(CC) $(CFLAGS_OUTDIR) version.c +! $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \ + $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ + $(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \ + $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) +*************** +*** 1304,1309 **** +--- 1322,1328 ---- + $(MAKE) /NOLOGO -f Make_dos.mak nolog + $(MAKE) /NOLOGO -f Make_dos.mak $@.res + $(MAKE) /NOLOGO -f Make_dos.mak report ++ cat messages + cd .. + + ########################################################################### +*************** +*** 1344,1349 **** +--- 1363,1386 ---- + + $(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL) + ++ $(OUTDIR)/xdiffi.obj: $(OUTDIR) xdiff/xdiffi.c $(XDIFF_DEPS) ++ $(CC) $(CFLAGS_OUTDIR) xdiff/xdiffi.c ++ ++ $(OUTDIR)/xemit.obj: $(OUTDIR) xdiff/xemit.c $(XDIFF_DEPS) ++ $(CC) $(CFLAGS_OUTDIR) xdiff/xemit.c ++ ++ $(OUTDIR)/xprepare.obj: $(OUTDIR) xdiff/xprepare.c $(XDIFF_DEPS) ++ $(CC) $(CFLAGS_OUTDIR) xdiff/xprepare.c ++ ++ $(OUTDIR)/xutils.obj: $(OUTDIR) xdiff/xutils.c $(XDIFF_DEPS) ++ $(CC) $(CFLAGS_OUTDIR) xdiff/xutils.c ++ ++ $(OUTDIR)/xhistogram.obj: $(OUTDIR) xdiff/xhistogram.c $(XDIFF_DEPS) ++ $(CC) $(CFLAGS_OUTDIR) xdiff/xhistogram.c ++ ++ $(OUTDIR)/xpatience.obj: $(OUTDIR) xdiff/xpatience.c $(XDIFF_DEPS) ++ $(CC) $(CFLAGS_OUTDIR) xdiff/xpatience.c ++ + $(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL) + + $(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL) +*** ../vim-8.1.0359/src/Makefile 2018-07-07 22:26:49.306702821 +0200 +--- src/Makefile 2018-09-10 17:32:57.212394678 +0200 +*************** +*** 1400,1405 **** +--- 1400,1431 ---- + + TERM_SRC = libvterm/src/*.c + ++ XDIFF_SRC = \ ++ xdiff/xdiffi.c \ ++ xdiff/xemit.c \ ++ xdiff/xprepare.c \ ++ xdiff/xutils.c \ ++ xdiff/xhistogram.c \ ++ xdiff/xpatience.c \ ++ ++ XDIFF_OBJS = \ ++ objects/xdiffi.o \ ++ objects/xemit.o \ ++ objects/xprepare.o \ ++ objects/xutils.o \ ++ objects/xhistogram.o \ ++ objects/xpatience.o \ ++ ++ XDIFF_INCL = \ ++ xdiff/xdiff.h \ ++ xdiff/xdiffi.h \ ++ xdiff/xemit.h \ ++ xdiff/xinclude.h \ ++ xdiff/xmacros.h \ ++ xdiff/xprepare.h \ ++ xdiff/xtypes.h \ ++ xdiff/xutils.h \ ++ + ### Command to create dependencies based on #include "..." + ### prototype headers are ignored due to -DPROTO, system + ### headers #include <...> are ignored if we use the -MM option, as +*************** +*** 1611,1616 **** +--- 1637,1643 ---- + SRC = $(BASIC_SRC) \ + $(GUI_SRC) \ + $(TERM_SRC) \ ++ $(XDIFF_SRC) \ + $(HANGULIN_SRC) \ + $(LUA_SRC) \ + $(MZSCHEME_SRC) \ +*************** +*** 1728,1733 **** +--- 1755,1761 ---- + $(WORKSHOP_OBJ) \ + $(NETBEANS_OBJ) \ + $(CHANNEL_OBJ) \ ++ $(XDIFF_OBJS) \ + $(WSDEBUG_OBJ) + + # The files included by tests are not in OBJ_COMMON. +*************** +*** 2731,2737 **** + + shadow: runtime pixmaps + $(MKDIR_P) $(SHADOWDIR) +! cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak . + mkdir $(SHADOWDIR)/auto + cd $(SHADOWDIR)/auto; ln -s ../../auto/configure . + $(MKDIR_P) $(SHADOWDIR)/po +--- 2759,2765 ---- + + shadow: runtime pixmaps + $(MKDIR_P) $(SHADOWDIR) +! cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm ../gui_gtk_res.xml ../toolcheck ../proto ../xdiff ../libvterm ../vimtutor ../gvimtutor ../install-sh ../Make_all.mak . + mkdir $(SHADOWDIR)/auto + cd $(SHADOWDIR)/auto; ln -s ../../auto/configure . + $(MKDIR_P) $(SHADOWDIR)/po +*************** +*** 2915,2921 **** + objects/dict.o: dict.c + $(CCC) -o $@ dict.c + +! objects/diff.o: diff.c + $(CCC) -o $@ diff.c + + objects/digraph.o: digraph.c +--- 2943,2949 ---- + objects/dict.o: dict.c + $(CCC) -o $@ dict.c + +! objects/diff.o: diff.c $(XDIFF_INCL) + $(CCC) -o $@ diff.c + + objects/digraph.o: digraph.c +*************** +*** 3229,3234 **** +--- 3257,3283 ---- + objects/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS) + $(CCCTERM) -o $@ libvterm/src/vterm.c + ++ CCCDIFF = $(CCC_NF) $(ALL_CFLAGS) ++ ++ objects/xdiffi.o: xdiff/xdiffi.c $(XDIFF_INCL) ++ $(CCCDIFF) -o $@ xdiff/xdiffi.c ++ ++ objects/xprepare.o: xdiff/xprepare.c $(XDIFF_INCL) ++ $(CCCDIFF) -o $@ xdiff/xprepare.c ++ ++ objects/xutils.o: xdiff/xutils.c $(XDIFF_INCL) ++ $(CCCDIFF) -o $@ xdiff/xutils.c ++ ++ objects/xemit.o: xdiff/xemit.c $(XDIFF_INCL) ++ $(CCCDIFF) -o $@ xdiff/xemit.c ++ ++ objects/xhistogram.o: xdiff/xhistogram.c $(XDIFF_INCL) ++ $(CCCDIFF) -o $@ xdiff/xhistogram.c ++ ++ objects/xpatience.o: xdiff/xpatience.c $(XDIFF_INCL) ++ $(CCCDIFF) -o $@ xdiff/xpatience.c ++ ++ + ############################################################################### + ### MacOS X installation + ### +*** ../vim-8.1.0359/src/diff.c 2018-06-03 14:42:17.840505115 +0200 +--- src/diff.c 2018-09-10 17:36:06.542197741 +0200 +*************** +*** 9,31 **** + + /* + * diff.c: code for diff'ing two, three or four buffers. + */ + + #include "vim.h" + + #if defined(FEAT_DIFF) || defined(PROTO) + + static int diff_busy = FALSE; /* ex_diffgetput() is busy */ + + /* flags obtained from the 'diffopt' option */ +! #define DIFF_FILLER 1 /* display filler lines */ +! #define DIFF_ICASE 2 /* ignore case */ +! #define DIFF_IWHITE 4 /* ignore change in white space */ +! #define DIFF_HORIZONTAL 8 /* horizontal splits */ +! #define DIFF_VERTICAL 16 /* vertical splits */ +! #define DIFF_HIDDEN_OFF 32 /* diffoff when hidden */ + static int diff_flags = DIFF_FILLER; + + #define LBUFLEN 50 /* length of line in diff file */ + + static int diff_a_works = MAYBE; /* TRUE when "diff -a" works, FALSE when it +--- 9,40 ---- + + /* + * diff.c: code for diff'ing two, three or four buffers. ++ * ++ * There are three ways to diff: ++ * - Shell out to an external diff program, using files. ++ * - Use the compiled-in xdiff library. ++ * - Let 'diffexpr' do the work, using files. + */ + + #include "vim.h" ++ #include "xdiff/xdiff.h" + + #if defined(FEAT_DIFF) || defined(PROTO) + + static int diff_busy = FALSE; /* ex_diffgetput() is busy */ + + /* flags obtained from the 'diffopt' option */ +! #define DIFF_FILLER 1 // display filler lines +! #define DIFF_ICASE 2 // ignore case +! #define DIFF_IWHITE 4 // ignore change in white space +! #define DIFF_HORIZONTAL 8 // horizontal splits +! #define DIFF_VERTICAL 16 // vertical splits +! #define DIFF_HIDDEN_OFF 32 // diffoff when hidden +! #define DIFF_INTERNAL 64 // use internal xdiff algorithm + static int diff_flags = DIFF_FILLER; + ++ static long diff_algorithm = 0; ++ + #define LBUFLEN 50 /* length of line in diff file */ + + static int diff_a_works = MAYBE; /* TRUE when "diff -a" works, FALSE when it +*************** +*** 36,57 **** + checked yet */ + #endif + + static int diff_buf_idx(buf_T *buf); + static int diff_buf_idx_tp(buf_T *buf, tabpage_T *tp); + static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T line2, long amount, long amount_after); + static void diff_check_unchanged(tabpage_T *tp, diff_T *dp); + static int diff_check_sanity(tabpage_T *tp, diff_T *dp); + static void diff_redraw(int dofold); +! static int diff_write(buf_T *buf, char_u *fname); +! static void diff_file(char_u *tmp_orig, char_u *tmp_new, char_u *tmp_diff); + static int diff_equal_entry(diff_T *dp, int idx1, int idx2); + static int diff_cmp(char_u *s1, char_u *s2); + #ifdef FEAT_FOLDING + static void diff_fold_update(diff_T *dp, int skip_idx); + #endif +! static void diff_read(int idx_orig, int idx_new, char_u *fname); + static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, int idx_new); + static diff_T *diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp); + + #ifndef USE_CR + # define tag_fgets vim_fgets +--- 45,89 ---- + checked yet */ + #endif + ++ // used for diff input ++ typedef struct { ++ char_u *din_fname; // used for external diff ++ mmfile_t din_mmfile; // used for internal diff ++ } diffin_T; ++ ++ // used for diff result ++ typedef struct { ++ char_u *dout_fname; // used for external diff ++ garray_T dout_ga; // used for internal diff ++ } diffout_T; ++ ++ // two diff inputs and one result ++ typedef struct { ++ diffin_T dio_orig; // original file input ++ diffin_T dio_new; // new file input ++ diffout_T dio_diff; // diff result ++ int dio_internal; // using internal diff ++ } diffio_T; ++ + static int diff_buf_idx(buf_T *buf); + static int diff_buf_idx_tp(buf_T *buf, tabpage_T *tp); + static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T line2, long amount, long amount_after); + static void diff_check_unchanged(tabpage_T *tp, diff_T *dp); + static int diff_check_sanity(tabpage_T *tp, diff_T *dp); + static void diff_redraw(int dofold); +! static int check_external_diff(diffio_T *diffio); +! static int diff_file(diffio_T *diffio); + static int diff_equal_entry(diff_T *dp, int idx1, int idx2); + static int diff_cmp(char_u *s1, char_u *s2); + #ifdef FEAT_FOLDING + static void diff_fold_update(diff_T *dp, int skip_idx); + #endif +! static void diff_read(int idx_orig, int idx_new, diffout_T *fname); + static void diff_copy_entry(diff_T *dprev, diff_T *dp, int idx_orig, int idx_new); + static diff_T *diff_alloc_new(tabpage_T *tp, diff_T *dprev, diff_T *dp); ++ static int parse_diff_ed(char_u *line, linenr_T *lnum_orig, long *count_orig, linenr_T *lnum_new, long *count_new); ++ static int parse_diff_unified(char_u *line, linenr_T *lnum_orig, long *count_orig, linenr_T *lnum_new, long *count_new); ++ static int xdiff_out(void *priv, mmbuffer_t *mb, int nbuf); + + #ifndef USE_CR + # define tag_fgets vim_fgets +*************** +*** 631,711 **** + } + } + + /* +! * Write buffer "buf" to file "name". +! * Always use 'fileformat' set to "unix". +! * Return FAIL for failure + */ + static int +! diff_write(buf_T *buf, char_u *fname) + { + int r; + char_u *save_ff; + + save_ff = buf->b_p_ff; + buf->b_p_ff = vim_strsave((char_u *)FF_UNIX); +! r = buf_write(buf, fname, NULL, (linenr_T)1, buf->b_ml.ml_line_count, +! NULL, FALSE, FALSE, FALSE, TRUE); + free_string_option(buf->b_p_ff); + buf->b_p_ff = save_ff; + return r; + } + + /* + * Completely update the diffs for the buffers involved. + * This uses the ordinary "diff" command. + * The buffers are written to a file, also for unmodified buffers (the file + * could have been produced by autocommands, e.g. the netrw plugin). + */ + void +! ex_diffupdate( +! exarg_T *eap) /* can be NULL */ + { +- buf_T *buf; + int idx_orig; + int idx_new; +! char_u *tmp_orig; +! char_u *tmp_new; +! char_u *tmp_diff; +! FILE *fd; +! int ok; +! int io_error = FALSE; + +! /* Delete all diffblocks. */ + diff_clear(curtab); + curtab->tp_diff_invalid = FALSE; + +! /* Use the first buffer as the original text. */ + for (idx_orig = 0; idx_orig < DB_COUNT; ++idx_orig) + if (curtab->tp_diffbuf[idx_orig] != NULL) + break; + if (idx_orig == DB_COUNT) + return; + +! /* Only need to do something when there is another buffer. */ + for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) + if (curtab->tp_diffbuf[idx_new] != NULL) + break; + if (idx_new == DB_COUNT) + return; + +! /* We need three temp file names. */ +! tmp_orig = vim_tempname('o', TRUE); +! tmp_new = vim_tempname('n', TRUE); +! tmp_diff = vim_tempname('d', TRUE); +! if (tmp_orig == NULL || tmp_new == NULL || tmp_diff == NULL) +! goto theend; + +! /* +! * Do a quick test if "diff" really works. Otherwise it looks like there +! * are no differences. Can't use the return value, it's non-zero when +! * there are differences. +! * May try twice, first with "-a" and then without. +! */ + for (;;) + { + ok = FALSE; +! fd = mch_fopen((char *)tmp_orig, "w"); + if (fd == NULL) + io_error = TRUE; + else +--- 663,952 ---- + } + } + ++ static void ++ clear_diffin(diffin_T *din) ++ { ++ if (din->din_fname == NULL) ++ { ++ vim_free(din->din_mmfile.ptr); ++ din->din_mmfile.ptr = NULL; ++ } ++ else ++ mch_remove(din->din_fname); ++ } ++ ++ static void ++ clear_diffout(diffout_T *dout) ++ { ++ if (dout->dout_fname == NULL) ++ ga_clear_strings(&dout->dout_ga); ++ else ++ mch_remove(dout->dout_fname); ++ } ++ + /* +! * Write buffer "buf" to a memory buffer. +! * Return FAIL for failure. + */ + static int +! diff_write_buffer(buf_T *buf, diffin_T *din) +! { +! linenr_T lnum; +! char_u *s; +! long len = 0; +! char_u *ptr; +! +! // xdiff requires one big block of memory with all the text. +! for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum) +! len += STRLEN(ml_get_buf(buf, lnum, FALSE)) + 1; +! ptr = lalloc(len, TRUE); +! if (ptr == NULL) +! { +! // Allocating memory failed. This can happen, because we try to read +! // the whole buffer text into memory. Set the failed flag, the diff +! // will be retried with external diff. The flag is never reset. +! buf->b_diff_failed = TRUE; +! if (p_verbose > 0) +! { +! verbose_enter(); +! smsg((char_u *) +! _("Not enough memory to use internal diff for buffer \"%s\""), +! buf->b_fname); +! verbose_leave(); +! } +! return FAIL; +! } +! din->din_mmfile.ptr = (char *)ptr; +! din->din_mmfile.size = len; +! +! len = 0; +! for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum) +! { +! for (s = ml_get_buf(buf, lnum, FALSE); *s != NUL; ) +! { +! if (diff_flags & DIFF_ICASE) +! { +! int c; +! +! // xdiff doesn't support ignoring case, fold-case the text. +! #ifdef FEAT_MBYTE +! int orig_len; +! char_u cbuf[MB_MAXBYTES + 1]; +! +! c = PTR2CHAR(s); +! c = enc_utf8 ? utf_fold(c) : MB_TOLOWER(c); +! orig_len = MB_PTR2LEN(s); +! if (mb_char2bytes(c, cbuf) != orig_len) +! // TODO: handle byte length difference +! mch_memmove(ptr + len, s, orig_len); +! else +! mch_memmove(ptr + len, cbuf, orig_len); +! +! s += orig_len; +! len += orig_len; +! #else +! c = *s++; +! ptr[len++] = TOLOWER_LOC(c); +! #endif +! } +! else +! ptr[len++] = *s++; +! } +! ptr[len++] = NL; +! } +! return OK; +! } +! +! /* +! * Write buffer "buf" to file or memory buffer. +! * Return FAIL for failure. +! */ +! static int +! diff_write(buf_T *buf, diffin_T *din) + { + int r; + char_u *save_ff; + ++ if (din->din_fname == NULL) ++ return diff_write_buffer(buf, din); ++ ++ // Always use 'fileformat' set to "unix". + save_ff = buf->b_p_ff; + buf->b_p_ff = vim_strsave((char_u *)FF_UNIX); +! r = buf_write(buf, din->din_fname, NULL, +! (linenr_T)1, buf->b_ml.ml_line_count, +! NULL, FALSE, FALSE, FALSE, TRUE); + free_string_option(buf->b_p_ff); + buf->b_p_ff = save_ff; + return r; + } + + /* ++ * Update the diffs for all buffers involved. ++ */ ++ static void ++ diff_try_update( ++ diffio_T *dio, ++ int idx_orig, ++ exarg_T *eap) // "eap" can be NULL ++ { ++ buf_T *buf; ++ int idx_new; ++ ++ if (dio->dio_internal) ++ { ++ ga_init2(&dio->dio_diff.dout_ga, sizeof(char *), 1000); ++ } ++ else ++ { ++ // We need three temp file names. ++ dio->dio_orig.din_fname = vim_tempname('o', TRUE); ++ dio->dio_new.din_fname = vim_tempname('n', TRUE); ++ dio->dio_diff.dout_fname = vim_tempname('d', TRUE); ++ if (dio->dio_orig.din_fname == NULL ++ || dio->dio_new.din_fname == NULL ++ || dio->dio_diff.dout_fname == NULL) ++ goto theend; ++ } ++ ++ // Check external diff is actually working. ++ if (!dio->dio_internal && check_external_diff(dio) == FAIL) ++ goto theend; ++ ++ // :diffupdate! ++ if (eap != NULL && eap->forceit) ++ for (idx_new = idx_orig; idx_new < DB_COUNT; ++idx_new) ++ { ++ buf = curtab->tp_diffbuf[idx_new]; ++ if (buf_valid(buf)) ++ buf_check_timestamp(buf, FALSE); ++ } ++ ++ // Write the first buffer to a tempfile or mmfile_t. ++ buf = curtab->tp_diffbuf[idx_orig]; ++ if (diff_write(buf, &dio->dio_orig) == FAIL) ++ goto theend; ++ ++ // Make a difference between the first buffer and every other. ++ for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) ++ { ++ buf = curtab->tp_diffbuf[idx_new]; ++ if (buf == NULL || buf->b_ml.ml_mfp == NULL) ++ continue; // skip buffer that isn't loaded ++ ++ // Write the other buffer and diff with the first one. ++ if (diff_write(buf, &dio->dio_new) == FAIL) ++ continue; ++ if (diff_file(dio) == FAIL) ++ continue; ++ ++ // Read the diff output and add each entry to the diff list. ++ diff_read(idx_orig, idx_new, &dio->dio_diff); ++ ++ clear_diffin(&dio->dio_new); ++ clear_diffout(&dio->dio_diff); ++ } ++ clear_diffin(&dio->dio_orig); ++ ++ theend: ++ vim_free(dio->dio_orig.din_fname); ++ vim_free(dio->dio_new.din_fname); ++ vim_free(dio->dio_diff.dout_fname); ++ } ++ ++ /* ++ * Return TRUE if the options are set to use the internal diff library. ++ * Note that if the internal diff failed for one of the buffers, the external ++ * diff will be used anyway. ++ */ ++ static int ++ diff_internal(void) ++ { ++ return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL; ++ } ++ ++ /* ++ * Return TRUE if the internal diff failed for one of the diff buffers. ++ */ ++ static int ++ diff_internal_failed(void) ++ { ++ int idx; ++ ++ // Only need to do something when there is another buffer. ++ for (idx = 0; idx < DB_COUNT; ++idx) ++ if (curtab->tp_diffbuf[idx] != NULL ++ && curtab->tp_diffbuf[idx]->b_diff_failed) ++ return TRUE; ++ return FALSE; ++ } ++ ++ /* + * Completely update the diffs for the buffers involved. + * This uses the ordinary "diff" command. + * The buffers are written to a file, also for unmodified buffers (the file + * could have been produced by autocommands, e.g. the netrw plugin). + */ + void +! ex_diffupdate(exarg_T *eap) // "eap" can be NULL + { + int idx_orig; + int idx_new; +! diffio_T diffio; + +! // Delete all diffblocks. + diff_clear(curtab); + curtab->tp_diff_invalid = FALSE; + +! // Use the first buffer as the original text. + for (idx_orig = 0; idx_orig < DB_COUNT; ++idx_orig) + if (curtab->tp_diffbuf[idx_orig] != NULL) + break; + if (idx_orig == DB_COUNT) + return; + +! // Only need to do something when there is another buffer. + for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) + if (curtab->tp_diffbuf[idx_new] != NULL) + break; + if (idx_new == DB_COUNT) + return; + +! // Only use the internal method if it did not fail for one of the buffers. +! vim_memset(&diffio, 0, sizeof(diffio)); +! diffio.dio_internal = diff_internal() && !diff_internal_failed(); +! +! diff_try_update(&diffio, idx_orig, eap); +! if (diffio.dio_internal && diff_internal_failed()) +! { +! // Internal diff failed, use external diff instead. +! vim_memset(&diffio, 0, sizeof(diffio)); +! diff_try_update(&diffio, idx_orig, eap); +! } + +! // force updating cursor position on screen +! curwin->w_valid_cursor.lnum = 0; +! +! diff_redraw(TRUE); +! } +! +! /* +! * Do a quick test if "diff" really works. Otherwise it looks like there +! * are no differences. Can't use the return value, it's non-zero when +! * there are differences. +! */ +! static int +! check_external_diff(diffio_T *diffio) +! { +! FILE *fd; +! int ok; +! int io_error = FALSE; +! +! // May try twice, first with "-a" and then without. + for (;;) + { + ok = FALSE; +! fd = mch_fopen((char *)diffio->dio_orig.din_fname, "w"); + if (fd == NULL) + io_error = TRUE; + else +*************** +*** 713,719 **** + if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1) + io_error = TRUE; + fclose(fd); +! fd = mch_fopen((char *)tmp_new, "w"); + if (fd == NULL) + io_error = TRUE; + else +--- 954,960 ---- + if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1) + io_error = TRUE; + fclose(fd); +! fd = mch_fopen((char *)diffio->dio_new.din_fname, "w"); + if (fd == NULL) + io_error = TRUE; + else +*************** +*** 721,728 **** + if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1) + io_error = TRUE; + fclose(fd); +! diff_file(tmp_orig, tmp_new, tmp_diff); +! fd = mch_fopen((char *)tmp_diff, "r"); + if (fd == NULL) + io_error = TRUE; + else +--- 962,970 ---- + if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1) + io_error = TRUE; + fclose(fd); +! fd = NULL; +! if (diff_file(diffio) == OK) +! fd = mch_fopen((char *)diffio->dio_diff.dout_fname, "r"); + if (fd == NULL) + io_error = TRUE; + else +*************** +*** 739,748 **** + } + fclose(fd); + } +! mch_remove(tmp_diff); +! mch_remove(tmp_new); + } +! mch_remove(tmp_orig); + } + + #ifdef FEAT_EVAL +--- 981,990 ---- + } + fclose(fd); + } +! mch_remove(diffio->dio_diff.dout_fname); +! mch_remove(diffio->dio_new.din_fname); + } +! mch_remove(diffio->dio_orig.din_fname); + } + + #ifdef FEAT_EVAL +*************** +*** 785,882 **** + #if defined(MSWIN) + diff_bin_works = MAYBE; + #endif +! goto theend; + } + +! /* :diffupdate! */ +! if (eap != NULL && eap->forceit) +! for (idx_new = idx_orig; idx_new < DB_COUNT; ++idx_new) +! { +! buf = curtab->tp_diffbuf[idx_new]; +! if (buf_valid(buf)) +! buf_check_timestamp(buf, FALSE); +! } +! +! /* Write the first buffer to a tempfile. */ +! buf = curtab->tp_diffbuf[idx_orig]; +! if (diff_write(buf, tmp_orig) == FAIL) +! goto theend; +! +! /* Make a difference between the first buffer and every other. */ +! for (idx_new = idx_orig + 1; idx_new < DB_COUNT; ++idx_new) +! { +! buf = curtab->tp_diffbuf[idx_new]; +! if (buf == NULL || buf->b_ml.ml_mfp == NULL) +! continue; /* skip buffer that isn't loaded */ +! if (diff_write(buf, tmp_new) == FAIL) +! continue; +! diff_file(tmp_orig, tmp_new, tmp_diff); + +! /* Read the diff output and add each entry to the diff list. */ +! diff_read(idx_orig, idx_new, tmp_diff); +! mch_remove(tmp_diff); +! mch_remove(tmp_new); +! } +! mch_remove(tmp_orig); + +! /* force updating cursor position on screen */ +! curwin->w_valid_cursor.lnum = 0; + +! diff_redraw(TRUE); + +! theend: +! vim_free(tmp_orig); +! vim_free(tmp_new); +! vim_free(tmp_diff); + } + + /* + * Make a diff between files "tmp_orig" and "tmp_new", results in "tmp_diff". + */ +! static void +! diff_file( +! char_u *tmp_orig, +! char_u *tmp_new, +! char_u *tmp_diff) + { + char_u *cmd; + size_t len; + + #ifdef FEAT_EVAL + if (*p_dex != NUL) +! /* Use 'diffexpr' to generate the diff file. */ + eval_diff(tmp_orig, tmp_new, tmp_diff); + else + #endif + { + len = STRLEN(tmp_orig) + STRLEN(tmp_new) + + STRLEN(tmp_diff) + STRLEN(p_srr) + 27; + cmd = alloc((unsigned)len); +! if (cmd != NULL) +! { +! /* We don't want $DIFF_OPTIONS to get in the way. */ +! if (getenv("DIFF_OPTIONS")) +! vim_setenv((char_u *)"DIFF_OPTIONS", (char_u *)""); +! +! /* Build the diff command and execute it. Always use -a, binary +! * differences are of no use. Ignore errors, diff returns +! * non-zero when differences have been found. */ +! vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s", +! diff_a_works == FALSE ? "" : "-a ", + #if defined(MSWIN) +! diff_bin_works == TRUE ? "--binary " : "", + #else +! "", + #endif +! (diff_flags & DIFF_IWHITE) ? "-b " : "", +! (diff_flags & DIFF_ICASE) ? "-i " : "", +! tmp_orig, tmp_new); +! append_redir(cmd, (int)len, p_srr, tmp_diff); +! block_autocmds(); /* Avoid ShellCmdPost stuff */ +! (void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT); +! unblock_autocmds(); +! vim_free(cmd); +! } + } + } + +--- 1027,1127 ---- + #if defined(MSWIN) + diff_bin_works = MAYBE; + #endif +! return FAIL; + } ++ return OK; ++ } + +! /* +! * Invoke the xdiff function. +! */ +! static int +! diff_file_internal(diffio_T *diffio) +! { +! xpparam_t param; +! xdemitconf_t emit_cfg; +! xdemitcb_t emit_cb; + +! vim_memset(¶m, 0, sizeof(param)); +! vim_memset(&emit_cfg, 0, sizeof(emit_cfg)); +! vim_memset(&emit_cb, 0, sizeof(emit_cb)); + +! param.flags = diff_algorithm; + +! if (diff_flags & DIFF_IWHITE) +! param.flags |= XDF_IGNORE_WHITESPACE_CHANGE; + +! emit_cfg.ctxlen = 0; // don't need any diff_context here +! emit_cb.priv = &diffio->dio_diff; +! emit_cb.outf = xdiff_out; +! if (xdl_diff(&diffio->dio_orig.din_mmfile, +! &diffio->dio_new.din_mmfile, +! ¶m, &emit_cfg, &emit_cb) < 0) +! { +! EMSG(_("E960: Problem creating the internal diff")); +! return FAIL; +! } +! return OK; + } + + /* + * Make a diff between files "tmp_orig" and "tmp_new", results in "tmp_diff". ++ * return OK or FAIL; + */ +! static int +! diff_file(diffio_T *dio) + { + char_u *cmd; + size_t len; ++ char_u *tmp_orig = dio->dio_orig.din_fname; ++ char_u *tmp_new = dio->dio_new.din_fname; ++ char_u *tmp_diff = dio->dio_diff.dout_fname; + + #ifdef FEAT_EVAL + if (*p_dex != NUL) +! { +! // Use 'diffexpr' to generate the diff file. + eval_diff(tmp_orig, tmp_new, tmp_diff); ++ return OK; ++ } + else + #endif ++ // Use xdiff for generating the diff. ++ if (dio->dio_internal) ++ { ++ return diff_file_internal(dio); ++ } ++ else + { + len = STRLEN(tmp_orig) + STRLEN(tmp_new) + + STRLEN(tmp_diff) + STRLEN(p_srr) + 27; + cmd = alloc((unsigned)len); +! if (cmd == NULL) +! return FAIL; +! +! // We don't want $DIFF_OPTIONS to get in the way. +! if (getenv("DIFF_OPTIONS")) +! vim_setenv((char_u *)"DIFF_OPTIONS", (char_u *)""); +! +! // Build the diff command and execute it. Always use -a, binary +! // differences are of no use. Ignore errors, diff returns +! // non-zero when differences have been found. +! vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s", +! diff_a_works == FALSE ? "" : "-a ", + #if defined(MSWIN) +! diff_bin_works == TRUE ? "--binary " : "", + #else +! "", + #endif +! (diff_flags & DIFF_IWHITE) ? "-b " : "", +! (diff_flags & DIFF_ICASE) ? "-i " : "", +! tmp_orig, tmp_new); +! append_redir(cmd, (int)len, p_srr, tmp_diff); +! block_autocmds(); // avoid ShellCmdPost stuff +! (void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT); +! unblock_autocmds(); +! vim_free(cmd); +! return OK; + } + } + +*************** +*** 1282,1370 **** + */ + static void + diff_read( +! int idx_orig, /* idx of original file */ +! int idx_new, /* idx of new file */ +! char_u *fname) /* name of diff output file */ + { +! FILE *fd; + diff_T *dprev = NULL; + diff_T *dp = curtab->tp_first_diff; + diff_T *dn, *dpl; +- long f1, l1, f2, l2; + char_u linebuf[LBUFLEN]; /* only need to hold the diff line */ +! int difftype; +! char_u *p; + long off; + int i; + linenr_T lnum_orig, lnum_new; + long count_orig, count_new; + int notset = TRUE; /* block "*dp" not set yet */ + +! fd = mch_fopen((char *)fname, "r"); +! if (fd == NULL) + { +! EMSG(_("E98: Cannot read diff output")); +! return; + } +! +! for (;;) + { +! if (tag_fgets(linebuf, LBUFLEN, fd)) +! break; /* end of file */ +! if (!isdigit(*linebuf)) +! continue; /* not the start of a diff block */ +! +! /* This line must be one of three formats: +! * {first}[,{last}]c{first}[,{last}] +! * {first}a{first}[,{last}] +! * {first}[,{last}]d{first} +! */ +! p = linebuf; +! f1 = getdigits(&p); +! if (*p == ',') +! { +! ++p; +! l1 = getdigits(&p); +! } +! else +! l1 = f1; +! if (*p != 'a' && *p != 'c' && *p != 'd') +! continue; /* invalid diff format */ +! difftype = *p++; +! f2 = getdigits(&p); +! if (*p == ',') + { +! ++p; +! l2 = getdigits(&p); + } +! else +! l2 = f2; +! if (l1 < f1 || l2 < f2) +! continue; /* invalid line range */ + +! if (difftype == 'a') + { +! lnum_orig = f1 + 1; +! count_orig = 0; + } + else + { +! lnum_orig = f1; +! count_orig = l1 - f1 + 1; + } +! if (difftype == 'd') + { +! lnum_new = f2 + 1; +! count_new = 0; + } + else + { +! lnum_new = f2; +! count_new = l2 - f2 + 1; + } + +! /* Go over blocks before the change, for which orig and new are equal. +! * Copy blocks from orig to new. */ + while (dp != NULL + && lnum_orig > dp->df_lnum[idx_orig] + dp->df_count[idx_orig]) + { +--- 1527,1631 ---- + */ + static void + diff_read( +! int idx_orig, // idx of original file +! int idx_new, // idx of new file +! diffout_T *dout) // diff output + { +! FILE *fd = NULL; +! int line_idx = 0; + diff_T *dprev = NULL; + diff_T *dp = curtab->tp_first_diff; + diff_T *dn, *dpl; + char_u linebuf[LBUFLEN]; /* only need to hold the diff line */ +! char_u *line; + long off; + int i; + linenr_T lnum_orig, lnum_new; + long count_orig, count_new; + int notset = TRUE; /* block "*dp" not set yet */ ++ enum { ++ DIFF_ED, ++ DIFF_UNIFIED, ++ DIFF_NONE ++ } diffstyle = DIFF_NONE; + +! if (dout->dout_fname == NULL) + { +! diffstyle = DIFF_UNIFIED; + } +! else + { +! fd = mch_fopen((char *)dout->dout_fname, "r"); +! if (fd == NULL) + { +! EMSG(_("E98: Cannot read diff output")); +! return; + } +! } + +! for (;;) +! { +! if (fd == NULL) + { +! if (line_idx >= dout->dout_ga.ga_len) +! break; // did last line +! line = ((char_u **)dout->dout_ga.ga_data)[line_idx++]; + } + else + { +! if (tag_fgets(linebuf, LBUFLEN, fd)) +! break; // end of file +! line = linebuf; +! } +! +! if (diffstyle == DIFF_NONE) +! { +! // Determine diff style. +! // ed like diff looks like this: +! // {first}[,{last}]c{first}[,{last}] +! // {first}a{first}[,{last}] +! // {first}[,{last}]d{first} +! // +! // unified diff looks like this: +! // --- file1 2018-03-20 13:23:35.783153140 +0100 +! // +++ file2 2018-03-20 13:23:41.183156066 +0100 +! // @@ -1,3 +1,5 @@ +! if (isdigit(*line)) +! diffstyle = DIFF_ED; +! else if ((STRNCMP(line, "@@ ", 3) == 0)) +! diffstyle = DIFF_UNIFIED; +! else if ((STRNCMP(line, "--- ", 4) == 0) +! && (tag_fgets(linebuf, LBUFLEN, fd) == 0) +! && (STRNCMP(line, "+++ ", 4) == 0) +! && (tag_fgets(linebuf, LBUFLEN, fd) == 0) +! && (STRNCMP(line, "@@ ", 3) == 0)) +! diffstyle = DIFF_UNIFIED; +! } +! +! if (diffstyle == DIFF_ED) +! { +! if (!isdigit(*line)) +! continue; // not the start of a diff block +! if (parse_diff_ed(line, &lnum_orig, &count_orig, +! &lnum_new, &count_new) == FAIL) +! continue; + } +! else if (diffstyle == DIFF_UNIFIED) + { +! if (STRNCMP(line, "@@ ", 3) != 0) +! continue; // not the start of a diff block +! if (parse_diff_unified(line, &lnum_orig, &count_orig, +! &lnum_new, &count_new) == FAIL) +! continue; + } + else + { +! EMSG(_("E959: Invalid diff format.")); +! break; + } + +! // Go over blocks before the change, for which orig and new are equal. +! // Copy blocks from orig to new. + while (dp != NULL + && lnum_orig > dp->df_lnum[idx_orig] + dp->df_count[idx_orig]) + { +*************** +*** 1379,1392 **** + && lnum_orig <= dp->df_lnum[idx_orig] + dp->df_count[idx_orig] + && lnum_orig + count_orig >= dp->df_lnum[idx_orig]) + { +! /* New block overlaps with existing block(s). +! * First find last block that overlaps. */ + for (dpl = dp; dpl->df_next != NULL; dpl = dpl->df_next) + if (lnum_orig + count_orig < dpl->df_next->df_lnum[idx_orig]) + break; + +! /* If the newly found block starts before the old one, set the +! * start back a number of lines. */ + off = dp->df_lnum[idx_orig] - lnum_orig; + if (off > 0) + { +--- 1640,1653 ---- + && lnum_orig <= dp->df_lnum[idx_orig] + dp->df_count[idx_orig] + && lnum_orig + count_orig >= dp->df_lnum[idx_orig]) + { +! // New block overlaps with existing block(s). +! // First find last block that overlaps. + for (dpl = dp; dpl->df_next != NULL; dpl = dpl->df_next) + if (lnum_orig + count_orig < dpl->df_next->df_lnum[idx_orig]) + break; + +! // If the newly found block starts before the old one, set the +! // start back a number of lines. + off = dp->df_lnum[idx_orig] - lnum_orig; + if (off > 0) + { +*************** +*** 1398,1421 **** + } + else if (notset) + { +! /* new block inside existing one, adjust new block */ + dp->df_lnum[idx_new] = lnum_new + off; + dp->df_count[idx_new] = count_new - off; + } + else +! /* second overlap of new block with existing block */ + dp->df_count[idx_new] += count_new - count_orig + + dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig] + - (dp->df_lnum[idx_orig] + dp->df_count[idx_orig]); + +! /* Adjust the size of the block to include all the lines to the +! * end of the existing block or the new diff, whatever ends last. */ + off = (lnum_orig + count_orig) + - (dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]); + if (off < 0) + { +! /* new change ends in existing block, adjust the end if not +! * done already */ + if (notset) + dp->df_count[idx_new] += -off; + off = 0; +--- 1659,1682 ---- + } + else if (notset) + { +! // new block inside existing one, adjust new block + dp->df_lnum[idx_new] = lnum_new + off; + dp->df_count[idx_new] = count_new - off; + } + else +! // second overlap of new block with existing block + dp->df_count[idx_new] += count_new - count_orig + + dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig] + - (dp->df_lnum[idx_orig] + dp->df_count[idx_orig]); + +! // Adjust the size of the block to include all the lines to the +! // end of the existing block or the new diff, whatever ends last. + off = (lnum_orig + count_orig) + - (dpl->df_lnum[idx_orig] + dpl->df_count[idx_orig]); + if (off < 0) + { +! // new change ends in existing block, adjust the end if not +! // done already + if (notset) + dp->df_count[idx_new] += -off; + off = 0; +*************** +*** 1425,1431 **** + dp->df_count[i] = dpl->df_lnum[i] + dpl->df_count[i] + - dp->df_lnum[i] + off; + +! /* Delete the diff blocks that have been merged into one. */ + dn = dp->df_next; + dp->df_next = dpl->df_next; + while (dn != dp->df_next) +--- 1686,1692 ---- + dp->df_count[i] = dpl->df_lnum[i] + dpl->df_count[i] + - dp->df_lnum[i] + off; + +! // Delete the diff blocks that have been merged into one. + dn = dp->df_next; + dp->df_next = dpl->df_next; + while (dn != dp->df_next) +*************** +*** 1437,1443 **** + } + else + { +! /* Allocate a new diffblock. */ + dp = diff_alloc_new(curtab, dprev, dp); + if (dp == NULL) + goto done; +--- 1698,1704 ---- + } + else + { +! // Allocate a new diffblock. + dp = diff_alloc_new(curtab, dprev, dp); + if (dp == NULL) + goto done; +*************** +*** 1447,1463 **** + dp->df_lnum[idx_new] = lnum_new; + dp->df_count[idx_new] = count_new; + +! /* Set values for other buffers, these must be equal to the +! * original buffer, otherwise there would have been a change +! * already. */ + for (i = idx_orig + 1; i < idx_new; ++i) + if (curtab->tp_diffbuf[i] != NULL) + diff_copy_entry(dprev, dp, idx_orig, i); + } +! notset = FALSE; /* "*dp" has been set */ + } + +! /* for remaining diff blocks orig and new are equal */ + while (dp != NULL) + { + if (notset) +--- 1708,1724 ---- + dp->df_lnum[idx_new] = lnum_new; + dp->df_count[idx_new] = count_new; + +! // Set values for other buffers, these must be equal to the +! // original buffer, otherwise there would have been a change +! // already. + for (i = idx_orig + 1; i < idx_new; ++i) + if (curtab->tp_diffbuf[i] != NULL) + diff_copy_entry(dprev, dp, idx_orig, i); + } +! notset = FALSE; // "*dp" has been set + } + +! // for remaining diff blocks orig and new are equal + while (dp != NULL) + { + if (notset) +*************** +*** 1468,1474 **** + } + + done: +! fclose(fd); + } + + /* +--- 1729,1736 ---- + } + + done: +! if (fd != NULL) +! fclose(fd); + } + + /* +*************** +*** 1860,1865 **** +--- 2122,2128 ---- + int diff_context_new = 6; + int diff_flags_new = 0; + int diff_foldcolumn_new = 2; ++ long diff_algorithm_new = 0; + tabpage_T *tp; + + p = p_dip; +*************** +*** 1905,1910 **** +--- 2168,2208 ---- + p += 9; + diff_flags_new |= DIFF_HIDDEN_OFF; + } ++ else if (STRNCMP(p, "indent-heuristic", 16) == 0) ++ { ++ p += 16; ++ diff_algorithm_new |= XDF_INDENT_HEURISTIC; ++ } ++ else if (STRNCMP(p, "internal", 8) == 0) ++ { ++ p += 8; ++ diff_flags_new |= DIFF_INTERNAL; ++ } ++ else if (STRNCMP(p, "algorithm:", 10) == 0) ++ { ++ p += 10; ++ if (STRNCMP(p, "myers", 5) == 0) ++ { ++ p += 5; ++ diff_algorithm_new = 0; ++ } ++ else if (STRNCMP(p, "minimal", 7) == 0) ++ { ++ p += 7; ++ diff_algorithm_new = XDF_NEED_MINIMAL; ++ } ++ else if (STRNCMP(p, "patience", 8) == 0) ++ { ++ p += 8; ++ diff_algorithm_new = XDF_PATIENCE_DIFF; ++ } ++ else if (STRNCMP(p, "histogram", 9) == 0) ++ { ++ p += 9; ++ diff_algorithm_new = XDF_HISTOGRAM_DIFF; ++ } ++ } ++ + if (*p != ',' && *p != NUL) + return FAIL; + if (*p == ',') +*************** +*** 1916,1928 **** + return FAIL; + + /* If "icase" or "iwhite" was added or removed, need to update the diff. */ +! if (diff_flags != diff_flags_new) + FOR_ALL_TABPAGES(tp) + tp->tp_diff_invalid = TRUE; + + diff_flags = diff_flags_new; + diff_context = diff_context_new; + diff_foldcolumn = diff_foldcolumn_new; + + diff_redraw(TRUE); + +--- 2214,2227 ---- + return FAIL; + + /* If "icase" or "iwhite" was added or removed, need to update the diff. */ +! if (diff_flags != diff_flags_new || diff_algorithm != diff_algorithm_new) + FOR_ALL_TABPAGES(tp) + tp->tp_diff_invalid = TRUE; + + diff_flags = diff_flags_new; + diff_context = diff_context_new; + diff_foldcolumn = diff_foldcolumn_new; ++ diff_algorithm = diff_algorithm_new; + + diff_redraw(TRUE); + +*************** +*** 2690,2693 **** +--- 2989,3144 ---- + return n; + } + ++ /* ++ * Handle an ED style diff line. ++ * Return FAIL if the line does not contain diff info. ++ */ ++ static int ++ parse_diff_ed( ++ char_u *line, ++ linenr_T *lnum_orig, ++ long *count_orig, ++ linenr_T *lnum_new, ++ long *count_new) ++ { ++ char_u *p; ++ long f1, l1, f2, l2; ++ int difftype; ++ ++ // The line must be one of three formats: ++ // change: {first}[,{last}]c{first}[,{last}] ++ // append: {first}a{first}[,{last}] ++ // delete: {first}[,{last}]d{first} ++ p = line; ++ f1 = getdigits(&p); ++ if (*p == ',') ++ { ++ ++p; ++ l1 = getdigits(&p); ++ } ++ else ++ l1 = f1; ++ if (*p != 'a' && *p != 'c' && *p != 'd') ++ return FAIL; // invalid diff format ++ difftype = *p++; ++ f2 = getdigits(&p); ++ if (*p == ',') ++ { ++ ++p; ++ l2 = getdigits(&p); ++ } ++ else ++ l2 = f2; ++ if (l1 < f1 || l2 < f2) ++ return FAIL; ++ ++ if (difftype == 'a') ++ { ++ *lnum_orig = f1 + 1; ++ *count_orig = 0; ++ } ++ else ++ { ++ *lnum_orig = f1; ++ *count_orig = l1 - f1 + 1; ++ } ++ if (difftype == 'd') ++ { ++ *lnum_new = f2 + 1; ++ *count_new = 0; ++ } ++ else ++ { ++ *lnum_new = f2; ++ *count_new = l2 - f2 + 1; ++ } ++ return OK; ++ } ++ ++ /* ++ * Parses unified diff with zero(!) context lines. ++ * Return FAIL if there is no diff information in "line". ++ */ ++ static int ++ parse_diff_unified( ++ char_u *line, ++ linenr_T *lnum_orig, ++ long *count_orig, ++ linenr_T *lnum_new, ++ long *count_new) ++ { ++ char_u *p; ++ long oldline, oldcount, newline, newcount; ++ ++ // Parse unified diff hunk header: ++ // @@ -oldline,oldcount +newline,newcount @@ ++ p = line; ++ if (*p++ == '@' && *p++ == '@' && *p++ == ' ' && *p++ == '-') ++ { ++ oldline = getdigits(&p); ++ if (*p == ',') ++ { ++ ++p; ++ oldcount = getdigits(&p); ++ } ++ else ++ oldcount = 1; ++ if (*p++ == ' ' && *p++ == '+') ++ { ++ newline = getdigits(&p); ++ if (*p == ',') ++ { ++ ++p; ++ newcount = getdigits(&p); ++ } ++ else ++ newcount = 1; ++ } ++ else ++ return FAIL; // invalid diff format ++ ++ if (oldcount == 0) ++ oldline += 1; ++ if (newcount == 0) ++ newline += 1; ++ if (newline == 0) ++ newline = 1; ++ ++ *lnum_orig = oldline; ++ *count_orig = oldcount; ++ *lnum_new = newline; ++ *count_new = newcount; ++ ++ return OK; ++ } ++ ++ return FAIL; ++ } ++ ++ /* ++ * Callback function for the xdl_diff() function. ++ * Stores the diff output in a grow array. ++ */ ++ static int ++ xdiff_out(void *priv, mmbuffer_t *mb, int nbuf) ++ { ++ diffout_T *dout = (diffout_T *)priv; ++ int i; ++ char_u *p; ++ ++ for (i = 0; i < nbuf; i++) ++ { ++ // We are only interested in the header lines, skip text lines. ++ if (STRNCMP(mb[i].ptr, "@@ ", 3) != 0) ++ continue; ++ if (ga_grow(&dout->dout_ga, 1) == FAIL) ++ return -1; ++ p = vim_strnsave((char_u *)mb[i].ptr, mb[i].size); ++ if (p == NULL) ++ return -1; ++ ((char_u **)dout->dout_ga.ga_data)[dout->dout_ga.ga_len++] = p; ++ } ++ return 0; ++ } ++ + #endif /* FEAT_DIFF */ +*** ../vim-8.1.0359/src/structs.h 2018-09-06 16:27:20.664831945 +0200 +--- src/structs.h 2018-09-10 17:36:24.457997346 +0200 +*************** +*** 2433,2439 **** + term_T *b_term; /* When not NULL this buffer is for a terminal + * window. */ + #endif +! + }; /* file_buffer */ + + +--- 2433,2441 ---- + term_T *b_term; /* When not NULL this buffer is for a terminal + * window. */ + #endif +! #ifdef FEAT_DIFF +! int b_diff_failed; // internal diff failed for this buffer +! #endif + }; /* file_buffer */ + + +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_01.dump 2018-09-10 17:44:36.056826154 +0200 +--- src/testdir/dumps/Test_diff_01.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|0+0#0000000#5fd7ff255| @33 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33 ++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19 ++ | @1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_02.dump 2018-09-10 17:44:36.060826113 +0200 +--- src/testdir/dumps/Test_diff_02.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1|0+0#0000000#5fd7ff255| @33||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33 ++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |7|-@19 ++ | @1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_03.dump 2018-09-10 17:44:36.064826075 +0200 +--- src/testdir/dumps/Test_diff_03.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19 ++ | @1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_04.dump 2018-09-10 17:44:36.068826034 +0200 +--- src/testdir/dumps/Test_diff_04.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ |++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| @1|4| |l|i|n|e|s|:| |1|-@19 ++ | @1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_05.dump 2018-09-10 17:44:36.072825994 +0200 +--- src/testdir/dumps/Test_diff_05.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|4+0#0000000#5fd7ff255| @33 ++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_06.dump 2018-09-10 17:44:36.072825994 +0200 +--- src/testdir/dumps/Test_diff_06.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|2+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|3+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|4+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|4+0#0000000#5fd7ff255| @33||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ | +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|5+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|6+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|7+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|8+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|9+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32||+1&&| +0#0000e05#a8a8a8255@1|1+0#0000000#ffffff0|0| @32 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|1+0#0000000#5fd7ff255@1| @32 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_07.dump 2018-09-10 17:44:36.076825953 +0200 +--- src/testdir/dumps/Test_diff_07.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1>#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16||+1&&| +0#0000e05#a8a8a8255@1|#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1|/+2#0000000#ff404010@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| +0&#ffd7ff255@13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|i+2#0000000#ff404010|n|t| |f|i|b|(|i|n|t| |n|)| +0&#ffd7ff255@20 ++ | +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|n+2&#ff404010|t| |i|;| +0&#ffd7ff255@24||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|f+2&#ff404010|(|n| |>| |2|)| +0&#ffd7ff255@21 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@7|p+2&#ff404010|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)+0&#ffd7ff255|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@7|r+2&#ff404010|e|t|u|r|n| |f|i|b|(|n|-|1|)| |+| |f|i|b|(|n|-|2|)+0&#ffd7ff255|; ++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|%|d|\|n|"|,| |f|o@1|)|;| @6||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|}| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|}| @29 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|r|e|t|u|r|n| |1|;| @21 ++ | +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1|i+2#0000000#ff404010|n|t| |f|a|c|t|(|i|n|t| |n|)| +0&#ffd7ff255@19||+1&#ffffff0| +0#0000e05#a8a8a8255@1|/+2#0000000#ff404010@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| +0&#ffd7ff255@13 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13 ++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|f+2&#ff404010|(|n| |>| |1|)| +0&#ffd7ff255@21||+1&#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#ffd7ff255@3|i|n+2&#ff404010|t| |i|;| +0&#ffd7ff255@24 ++ |X+3&#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p ++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|t|e|r|n|a|l| @52 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_08.dump 2018-09-10 17:44:36.080825913 +0200 +--- src/testdir/dumps/Test_diff_08.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1>#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16||+1&&| +0#0000e05#a8a8a8255@1|#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|i|b|(|i|n|t| |n|)| @20 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|{+0#0000000#5fd7ff255| @33 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|i|f|(|n| |>| |2|)| @21 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|{| @29 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|r|e|t|u|r|n| |f|i|b|(|n|-|1|)| |+| |f|i|b|(|n|-|2|)|; ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|}| @29 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|r|e|t|u|r|n| |1|;| @21 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|}+0#0000000#5fd7ff255| @33 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34 ++ | +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13||+1&&| +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13 ++ | +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13 ++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ |X+3#0000000#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p ++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|p|a|t|i|e|n|c|e| @42 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_09.dump 2018-09-10 17:44:36.084825872 +0200 +--- src/testdir/dumps/Test_diff_09.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1>#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16||+1&&| +0#0000e05#a8a8a8255@1|#+0#0000000#ffffff0|i|n|c|l|u|d|e| |<|s|t|d|i|o|.|h|>| @16 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|i+0#0000000#5fd7ff255|n|t| |f|i|b|(|i|n|t| |n|)| @20 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|{+0#0000000#5fd7ff255| @33 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|i|f|(|n| |>| |2|)| @21 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|{| @29 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|r|e|t|u|r|n| |f|i|b|(|n|-|1|)| |+| |f|i|b|(|n|-|2|)|; ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|}| @29 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|r|e|t|u|r|n| |1|;| @21 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|}+0#0000000#5fd7ff255| @33 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34 ++ | +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13||+1&&| +0#0000e05#a8a8a8255@1|/+0#0000000#ffffff0@1| |F|r|o|b|s| |f|o@1| |h|e|a|r|t|i|l|y| @13 ++ | +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |f|r|o|b|n|i|t|z|(|i|n|t| |f|o@1|)| @13 ++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|i|n|t| |i|;| @24 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|f|o|r|(|i| |=| |0|;| |i| |<| |1|0|;| |i|+@1|)| @7 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|{| @29 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@7|p|r|i|n|t|f|(|"|Y|o|u|r| |a|n|s|w|e|r| |i|s|:| |"|)|;||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34 ++ |X+3#0000000#ffffff0|f|i|l|e|1| @12|1|,|1| @11|T|o|p| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|T|o|p ++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|a|l|g|o|r|i|t|h|m|:|p|a|t|i|e|n|c|e| @42 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_10.dump 2018-09-10 17:44:36.088825834 +0200 +--- src/testdir/dumps/Test_diff_10.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|v|.|p|r|e|p|a|r|e| @19 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|e|n|d| @27 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|0|-|1| @9|A|l@1 ++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|t|e|r|n|a|l| @52 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_11.dump 2018-09-10 17:44:36.092825793 +0200 +--- src/testdir/dumps/Test_diff_11.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|d|e|f| |f|i|n|a|l|i|z|e|(|v|a|l|u|e|s|)| @12 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@5|v|.|p|r|e|p|a|r|e| @19 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@3|e|n|d| @27 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@34 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|v|a|l|u|e|s|.|e|a|c|h| |d|o| |||v||| @12 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|v|.|f|i|n|a|l|i|z|e| @18 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|e|n|d| @27 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|0|-|1| @9|A|l@1 ++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|d|e|n|t|-|h|e|u|r|i|s|t|i|c| @44 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_12.dump 2018-09-10 17:44:36.096825753 +0200 +--- src/testdir/dumps/Test_diff_12.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ |++0#0000e05#a8a8a8255| |+|-@1| |1|0| |l|i|n|e|s|:| |1|-@19||+1#0000000#ffffff0|++0#0000e05#a8a8a8255| |+|-@1| |1|0| |l|i|n|e|s|:| |1|-@19 ++ | @1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_13.dump 2018-09-10 17:44:36.096825753 +0200 +--- src/testdir/dumps/Test_diff_13.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ |-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@34||+1&&|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@34 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|0|,|0|-|1| @9|A|l@1| |X+1&&|f|i|l|e|2| @12|0|,|0|-|1| @9|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_14.dump 2018-09-10 17:44:36.100825712 +0200 +--- src/testdir/dumps/Test_diff_14.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|A+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|c+0#0000000#ffd7ff255|d| @32||+1&#ffffff0| +0#0000e05#a8a8a8255@1|c+0#0000000#ffd7ff255|D|e+2&#ff404010| +0&#ffd7ff255@31 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&> @73 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_15.dump 2018-09-10 17:44:36.104825672 +0200 +--- src/testdir/dumps/Test_diff_15.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1>i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24 ++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|i|f| |(|0|)| @25 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|{| @30 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @4 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|r|e|t|u|r|n| |0|;| @22||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|r|e|t|u|r|n| |0|;| @19 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|}| @30 ++ | +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|&|v|i|m| |d|i|f@1|o|p|t|+|=|f|i|l@1|e|r| |d|i|f@1|o|p|t|+|=|i|w|h|i|t|e| @26 +*** ../vim-8.1.0359/src/testdir/dumps/Test_diff_16.dump 2018-09-10 17:44:36.108825631 +0200 +--- src/testdir/dumps/Test_diff_16.dump 2018-09-10 17:36:51.625695584 +0200 +*************** +*** 0 **** +--- 1,20 ---- ++ | +0#0000e05#a8a8a8255@1>i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24||+1&&| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|t| |m|a|i|n|(|)| @24 ++ | +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|{+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|i|f| |(|0|)| @25 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|{| @30 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @7||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|p|r|i|n|t|f|(|"|H|e|l@1|o|,| |W|o|r|l|d|!|"|)|;| @4 ++ | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@2|r|e|t|u|r|n| |0|;| @22||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@5|r|e|t|u|r|n| |0|;| @19 ++ | +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1| +0#0000000#5fd7ff255@2|}| @30 ++ | +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33||+1&&| +0#0000e05#a8a8a8255@1|}+0#0000000#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ | +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33||+1#0000000&| +0#0000e05#a8a8a8255@1|~+0#4040ff13#ffffff0| @33 ++ |X+3#0000000&|f|i|l|e|1| @12|1|,|1| @11|A|l@1| |X+1&&|f|i|l|e|2| @12|1|,|1| @11|A|l@1 ++ |:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|t|e|r|n|a|l| @52 +*** ../vim-8.1.0359/src/testdir/test_diffmode.vim 2017-12-01 20:25:59.000000000 +0100 +--- src/testdir/test_diffmode.vim 2018-09-10 17:38:33.584583735 +0200 +*************** +*** 1,4 **** +--- 1,6 ---- + " Tests for diff mode ++ source shared.vim ++ source screendump.vim + + func Test_diff_fold_sync() + enew! +*************** +*** 33,38 **** +--- 35,52 ---- + endfunc + + func Test_vert_split() ++ set diffopt=filler ++ call Common_vert_split() ++ set diffopt& ++ endfunc ++ ++ func Test_vert_split_internal() ++ set diffopt=internal,filler ++ call Common_vert_split() ++ set diffopt& ++ endfunc ++ ++ func Common_vert_split() + " Disable the title to avoid xterm keeping the wrong one. + set notitle noicon + new +*************** +*** 275,284 **** + bwipe! + endfunc + +! func Test_diffopt_icase() +! set diffopt=icase,foldcolumn:0 +! +! e one + call setline(1, ['One', 'Two', 'Three', 'Four', 'Fi#ve']) + redraw + let normattr = screenattr(1, 1) +--- 295,302 ---- + bwipe! + endfunc + +! func Common_icase_test() +! edit one + call setline(1, ['One', 'Two', 'Three', 'Four', 'Fi#ve']) + redraw + let normattr = screenattr(1, 1) +*************** +*** 300,331 **** + + diffoff! + %bwipe! + set diffopt& + endfunc + +! func Test_diffopt_iwhite() +! set diffopt=iwhite,foldcolumn:0 + +! e one +! " Difference in trailing spaces should be ignored, + " but not other space differences. +! call setline(1, ["One \t", 'Two', 'Three', 'Four']) + redraw + let normattr = screenattr(1, 1) + diffthis + + botright vert new two +! call setline(1, ["One\t ", "Two\t ", 'Three', ' Four']) + diffthis + + redraw + call assert_equal(normattr, screenattr(1, 1)) + call assert_equal(normattr, screenattr(2, 1)) + call assert_equal(normattr, screenattr(3, 1)) +! call assert_notequal(normattr, screenattr(4, 1)) + + diffoff! + %bwipe! + set diffopt& + endfunc + +--- 318,371 ---- + + diffoff! + %bwipe! ++ endfunc ++ ++ func Test_diffopt_icase() ++ set diffopt=icase,foldcolumn:0 ++ call Common_icase_test() + set diffopt& + endfunc + +! func Test_diffopt_icase_internal() +! set diffopt=icase,foldcolumn:0,internal +! call Common_icase_test() +! set diffopt& +! endfunc + +! func Common_iwhite_test() +! edit one +! " Difference in trailing spaces and amount of spaces should be ignored, + " but not other space differences. +! call setline(1, ["One \t", 'Two', 'Three', 'one two', 'one two', 'Four']) + redraw + let normattr = screenattr(1, 1) + diffthis + + botright vert new two +! call setline(1, ["One\t ", "Two\t ", 'Three', 'one two', 'onetwo', ' Four']) + diffthis + + redraw + call assert_equal(normattr, screenattr(1, 1)) + call assert_equal(normattr, screenattr(2, 1)) + call assert_equal(normattr, screenattr(3, 1)) +! call assert_equal(normattr, screenattr(4, 1)) +! call assert_notequal(normattr, screenattr(5, 1)) +! call assert_notequal(normattr, screenattr(6, 1)) + + diffoff! + %bwipe! ++ endfunc ++ ++ func Test_diffopt_iwhite() ++ set diffopt=iwhite,foldcolumn:0 ++ call Common_iwhite_test() ++ set diffopt& ++ endfunc ++ ++ func Test_diffopt_iwhite_internal() ++ set diffopt=internal,iwhite,foldcolumn:0 ++ call Common_iwhite_test() + set diffopt& + endfunc + +*************** +*** 339,346 **** +--- 379,391 ---- + + set diffopt=context:2 + call assert_equal('+-- 2 lines: 1', foldtextresult(1)) ++ set diffopt=internal,context:2 ++ call assert_equal('+-- 2 lines: 1', foldtextresult(1)) ++ + set diffopt=context:1 + call assert_equal('+-- 3 lines: 1', foldtextresult(1)) ++ set diffopt=internal,context:1 ++ call assert_equal('+-- 3 lines: 1', foldtextresult(1)) + + diffoff! + %bwipe! +*************** +*** 348,354 **** + endfunc + + func Test_diffopt_horizontal() +! set diffopt=horizontal + diffsplit + + call assert_equal(&columns, winwidth(1)) +--- 393,399 ---- + endfunc + + func Test_diffopt_horizontal() +! set diffopt=internal,horizontal + diffsplit + + call assert_equal(&columns, winwidth(1)) +*************** +*** 362,368 **** + endfunc + + func Test_diffopt_vertical() +! set diffopt=vertical + diffsplit + + call assert_equal(&lines - 2, winheight(1)) +--- 407,413 ---- + endfunc + + func Test_diffopt_vertical() +! set diffopt=internal,vertical + diffsplit + + call assert_equal(&lines - 2, winheight(1)) +*************** +*** 376,382 **** + endfunc + + func Test_diffopt_hiddenoff() +! set diffopt=filler,foldcolumn:0,hiddenoff + e! one + call setline(1, ['Two', 'Three']) + redraw +--- 421,427 ---- + endfunc + + func Test_diffopt_hiddenoff() +! set diffopt=internal,filler,foldcolumn:0,hiddenoff + e! one + call setline(1, ['Two', 'Three']) + redraw +*************** +*** 399,405 **** + endfunc + + func Test_diffoff_hidden() +! set diffopt=filler,foldcolumn:0 + e! one + call setline(1, ['Two', 'Three']) + redraw +--- 444,450 ---- + endfunc + + func Test_diffoff_hidden() +! set diffopt=internal,filler,foldcolumn:0 + e! one + call setline(1, ['Two', 'Three']) + redraw +*************** +*** 629,631 **** +--- 674,791 ---- + bwipe! + bwipe! + endfunc ++ ++ func WriteDiffFiles(list1, list2) ++ call writefile(a:list1, 'Xfile1') ++ call writefile(a:list2, 'Xfile2') ++ endfunc ++ ++ " Verify a screendump with both the external and external diff. ++ func VerifyBoth(buf, dumpfile, extra) ++ call term_sendkeys(a:buf, ":diffupdate!\") ++ " trailing : for leaving the cursor on the command line ++ for cmd in [":set diffopt=filler" . a:extra . "\:", ":set diffopt+=internal\:"] ++ call term_sendkeys(a:buf, cmd) ++ if VerifyScreenDump(a:buf, a:dumpfile, {}, cmd =~ 'internal' ? 'internal' : 'external') ++ break " don't let the next iteration overwrite the "failed" file. ++ endif ++ endfor ++ endfunc ++ ++ func Test_diff_screen() ++ if !CanRunVimInTerminal() || !has('menu') ++ return ++ endif ++ " clean up already existing swap files, just in case ++ call delete('.Xfile1.swp') ++ call delete('.Xfile2.swp') ++ ++ " Test 1: Add a line in beginning of file 2 ++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ++ let buf = RunVimInTerminal('-d Xfile1 Xfile2', {}) ++ " Set autoread mode, ,so that Vim won't complain once we re-write the test ++ " files ++ call term_sendkeys(buf, ":set autoread\\w:set autoread\\w") ++ ++ call VerifyBoth(buf, 'Test_diff_01', '') ++ ++ " Test 2: Add a line in beginning of file 1 ++ call WriteDiffFiles([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ++ call VerifyBoth(buf, 'Test_diff_02', '') ++ ++ " Test 3: Add a line at the end of file 2 ++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) ++ call VerifyBoth(buf, 'Test_diff_03', '') ++ ++ " Test 4: Add a line at the end of file 1 ++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ++ call VerifyBoth(buf, 'Test_diff_04', '') ++ ++ " Test 5: Add a line in the middle of file 2, remove on at the end of file 1 ++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10]) ++ call VerifyBoth(buf, 'Test_diff_05', '') ++ ++ " Test 6: Add a line in the middle of file 1, remove on at the end of file 2 ++ call WriteDiffFiles([1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) ++ call VerifyBoth(buf, 'Test_diff_06', '') ++ ++ " Test 7 - 9: Test normal/patience/histogram diff algorithm ++ call WriteDiffFiles(['#include ', '', '// Frobs foo heartily', 'int frobnitz(int foo)', '{', ++ \ ' int i;', ' for(i = 0; i < 10; i++)', ' {', ' printf("Your answer is: ");', ++ \ ' printf("%d\n", foo);', ' }', '}', '', 'int fact(int n)', '{', ' if(n > 1)', ' {', ++ \ ' return fact(n-1) * n;', ' }', ' return 1;', '}', '', 'int main(int argc, char **argv)', ++ \ '{', ' frobnitz(fact(10));', '}'], ++ \ ['#include ', '', 'int fib(int n)', '{', ' if(n > 2)', ' {', ++ \ ' return fib(n-1) + fib(n-2);', ' }', ' return 1;', '}', '', '// Frobs foo heartily', ++ \ 'int frobnitz(int foo)', '{', ' int i;', ' for(i = 0; i < 10; i++)', ' {', ++ \ ' printf("%d\n", foo);', ' }', '}', '', ++ \ 'int main(int argc, char **argv)', '{', ' frobnitz(fib(10));', '}']) ++ call term_sendkeys(buf, ":diffupdate!\") ++ call term_sendkeys(buf, ":set diffopt+=internal\") ++ call VerifyScreenDump(buf, 'Test_diff_07', {}) ++ ++ call term_sendkeys(buf, ":set diffopt+=algorithm:patience\") ++ call VerifyScreenDump(buf, 'Test_diff_08', {}) ++ ++ call term_sendkeys(buf, ":set diffopt+=algorithm:histogram\") ++ call VerifyScreenDump(buf, 'Test_diff_09', {}) ++ ++ " Test 10-11: normal/indent-heuristic ++ call term_sendkeys(buf, ":set diffopt&vim\") ++ call WriteDiffFiles(['', ' def finalize(values)', '', ' values.each do |v|', ' v.finalize', ' end'], ++ \ ['', ' def finalize(values)', '', ' values.each do |v|', ' v.prepare', ' end', '', ++ \ ' values.each do |v|', ' v.finalize', ' end']) ++ call term_sendkeys(buf, ":diffupdate!\") ++ call term_sendkeys(buf, ":set diffopt+=internal\") ++ call VerifyScreenDump(buf, 'Test_diff_10', {}) ++ ++ call term_sendkeys(buf, ":set diffopt+=indent-heuristic\") ++ call VerifyScreenDump(buf, 'Test_diff_11', {}) ++ ++ " Test 12: diff the same file ++ call WriteDiffFiles([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ++ call VerifyBoth(buf, 'Test_diff_12', '') ++ ++ " Test 13: diff an empty file ++ call WriteDiffFiles([], []) ++ call VerifyBoth(buf, 'Test_diff_13', '') ++ ++ " Test 14: test diffopt+=icase ++ call WriteDiffFiles(['a', 'b', 'cd'], ['A', 'b', 'cDe']) ++ call VerifyBoth(buf, 'Test_diff_14', " diffopt+=filler diffopt+=icase") ++ ++ " Test 15-16: test diffopt+=iwhite ++ call WriteDiffFiles(['int main()', '{', ' printf("Hello, World!");', ' return 0;', '}'], ++ \ ['int main()', '{', ' if (0)', ' {', ' printf("Hello, World!");', ' return 0;', ' }', '}']) ++ call term_sendkeys(buf, ":diffupdate!\") ++ call term_sendkeys(buf, ":set diffopt&vim diffopt+=filler diffopt+=iwhite\") ++ call VerifyScreenDump(buf, 'Test_diff_15', {}) ++ call term_sendkeys(buf, ":set diffopt+=internal\") ++ call VerifyScreenDump(buf, 'Test_diff_16', {}) ++ ++ " clean up ++ call StopVimInTerminal(buf) ++ call delete('Xfile1') ++ call delete('Xfile2') ++ endfunc ++ +*** ../vim-8.1.0359/src/xdiff/COPYING 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/COPYING 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,504 ---- ++ GNU LESSER GENERAL PUBLIC LICENSE ++ Version 2.1, February 1999 ++ ++ Copyright (C) 1991, 1999 Free Software Foundation, Inc. ++ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ [This is the first released version of the Lesser GPL. It also counts ++ as the successor of the GNU Library Public License, version 2, hence ++ the version number 2.1.] ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++ freedom to share and change it. By contrast, the GNU General Public ++ Licenses are intended to guarantee your freedom to share and change ++ free software--to make sure the software is free for all its users. ++ ++ This license, the Lesser General Public License, applies to some ++ specially designated software packages--typically libraries--of the ++ Free Software Foundation and other authors who decide to use it. You ++ can use it too, but we suggest you first think carefully about whether ++ this license or the ordinary General Public License is the better ++ strategy to use in any particular case, based on the explanations below. ++ ++ When we speak of free software, we are referring to freedom of use, ++ not price. Our General Public Licenses are designed to make sure that ++ you have the freedom to distribute copies of free software (and charge ++ for this service if you wish); that you receive source code or can get ++ it if you want it; that you can change the software and use pieces of ++ it in new free programs; and that you are informed that you can do ++ these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++ distributors to deny you these rights or to ask you to surrender these ++ rights. These restrictions translate to certain responsibilities for ++ you if you distribute copies of the library or if you modify it. ++ ++ For example, if you distribute copies of the library, whether gratis ++ or for a fee, you must give the recipients all the rights that we gave ++ you. You must make sure that they, too, receive or can get the source ++ code. If you link other code with the library, you must provide ++ complete object files to the recipients, so that they can relink them ++ with the library after making changes to the library and recompiling ++ it. And you must show them these terms so they know their rights. ++ ++ We protect your rights with a two-step method: (1) we copyright the ++ library, and (2) we offer you this license, which gives you legal ++ permission to copy, distribute and/or modify the library. ++ ++ To protect each distributor, we want to make it very clear that ++ there is no warranty for the free library. Also, if the library is ++ modified by someone else and passed on, the recipients should know ++ that what they have is not the original version, so that the original ++ author's reputation will not be affected by problems that might be ++ introduced by others. ++ ++ Finally, software patents pose a constant threat to the existence of ++ any free program. We wish to make sure that a company cannot ++ effectively restrict the users of a free program by obtaining a ++ restrictive license from a patent holder. Therefore, we insist that ++ any patent license obtained for a version of the library must be ++ consistent with the full freedom of use specified in this license. ++ ++ Most GNU software, including some libraries, is covered by the ++ ordinary GNU General Public License. This license, the GNU Lesser ++ General Public License, applies to certain designated libraries, and ++ is quite different from the ordinary General Public License. We use ++ this license for certain libraries in order to permit linking those ++ libraries into non-free programs. ++ ++ When a program is linked with a library, whether statically or using ++ a shared library, the combination of the two is legally speaking a ++ combined work, a derivative of the original library. The ordinary ++ General Public License therefore permits such linking only if the ++ entire combination fits its criteria of freedom. The Lesser General ++ Public License permits more lax criteria for linking other code with ++ the library. ++ ++ We call this license the "Lesser" General Public License because it ++ does Less to protect the user's freedom than the ordinary General ++ Public License. It also provides other free software developers Less ++ of an advantage over competing non-free programs. These disadvantages ++ are the reason we use the ordinary General Public License for many ++ libraries. However, the Lesser license provides advantages in certain ++ special circumstances. ++ ++ For example, on rare occasions, there may be a special need to ++ encourage the widest possible use of a certain library, so that it becomes ++ a de-facto standard. To achieve this, non-free programs must be ++ allowed to use the library. A more frequent case is that a free ++ library does the same job as widely used non-free libraries. In this ++ case, there is little to gain by limiting the free library to free ++ software only, so we use the Lesser General Public License. ++ ++ In other cases, permission to use a particular library in non-free ++ programs enables a greater number of people to use a large body of ++ free software. For example, permission to use the GNU C Library in ++ non-free programs enables many more people to use the whole GNU ++ operating system, as well as its variant, the GNU/Linux operating ++ system. ++ ++ Although the Lesser General Public License is Less protective of the ++ users' freedom, it does ensure that the user of a program that is ++ linked with the Library has the freedom and the wherewithal to run ++ that program using a modified version of the Library. ++ ++ The precise terms and conditions for copying, distribution and ++ modification follow. Pay close attention to the difference between a ++ "work based on the library" and a "work that uses the library". The ++ former contains code derived from the library, whereas the latter must ++ be combined with the library in order to run. ++ ++ GNU LESSER GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License Agreement applies to any software library or other ++ program which contains a notice placed by the copyright holder or ++ other authorized party saying it may be distributed under the terms of ++ this Lesser General Public License (also called "this License"). ++ Each licensee is addressed as "you". ++ ++ A "library" means a collection of software functions and/or data ++ prepared so as to be conveniently linked with application programs ++ (which use some of those functions and data) to form executables. ++ ++ The "Library", below, refers to any such software library or work ++ which has been distributed under these terms. A "work based on the ++ Library" means either the Library or any derivative work under ++ copyright law: that is to say, a work containing the Library or a ++ portion of it, either verbatim or with modifications and/or translated ++ straightforwardly into another language. (Hereinafter, translation is ++ included without limitation in the term "modification".) ++ ++ "Source code" for a work means the preferred form of the work for ++ making modifications to it. For a library, complete source code means ++ all the source code for all modules it contains, plus any associated ++ interface definition files, plus the scripts used to control compilation ++ and installation of the library. ++ ++ Activities other than copying, distribution and modification are not ++ covered by this License; they are outside its scope. The act of ++ running a program using the Library is not restricted, and output from ++ such a program is covered only if its contents constitute a work based ++ on the Library (independent of the use of the Library in a tool for ++ writing it). Whether that is true depends on what the Library does ++ and what the program that uses the Library does. ++ ++ 1. You may copy and distribute verbatim copies of the Library's ++ complete source code as you receive it, in any medium, provided that ++ you conspicuously and appropriately publish on each copy an ++ appropriate copyright notice and disclaimer of warranty; keep intact ++ all the notices that refer to this License and to the absence of any ++ warranty; and distribute a copy of this License along with the ++ Library. ++ ++ You may charge a fee for the physical act of transferring a copy, ++ and you may at your option offer warranty protection in exchange for a ++ fee. ++ ++ 2. You may modify your copy or copies of the Library or any portion ++ of it, thus forming a work based on the Library, and copy and ++ distribute such modifications or work under the terms of Section 1 ++ above, provided that you also meet all of these conditions: ++ ++ a) The modified work must itself be a software library. ++ ++ b) You must cause the files modified to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ c) You must cause the whole of the work to be licensed at no ++ charge to all third parties under the terms of this License. ++ ++ d) If a facility in the modified Library refers to a function or a ++ table of data to be supplied by an application program that uses ++ the facility, other than as an argument passed when the facility ++ is invoked, then you must make a good faith effort to ensure that, ++ in the event an application does not supply such function or ++ table, the facility still operates, and performs whatever part of ++ its purpose remains meaningful. ++ ++ (For example, a function in a library to compute square roots has ++ a purpose that is entirely well-defined independent of the ++ application. Therefore, Subsection 2d requires that any ++ application-supplied function or table used by this function must ++ be optional: if the application does not supply it, the square ++ root function must still compute square roots.) ++ ++ These requirements apply to the modified work as a whole. If ++ identifiable sections of that work are not derived from the Library, ++ and can be reasonably considered independent and separate works in ++ themselves, then this License, and its terms, do not apply to those ++ sections when you distribute them as separate works. But when you ++ distribute the same sections as part of a whole which is a work based ++ on the Library, the distribution of the whole must be on the terms of ++ this License, whose permissions for other licensees extend to the ++ entire whole, and thus to each and every part regardless of who wrote ++ it. ++ ++ Thus, it is not the intent of this section to claim rights or contest ++ your rights to work written entirely by you; rather, the intent is to ++ exercise the right to control the distribution of derivative or ++ collective works based on the Library. ++ ++ In addition, mere aggregation of another work not based on the Library ++ with the Library (or with a work based on the Library) on a volume of ++ a storage or distribution medium does not bring the other work under ++ the scope of this License. ++ ++ 3. You may opt to apply the terms of the ordinary GNU General Public ++ License instead of this License to a given copy of the Library. To do ++ this, you must alter all the notices that refer to this License, so ++ that they refer to the ordinary GNU General Public License, version 2, ++ instead of to this License. (If a newer version than version 2 of the ++ ordinary GNU General Public License has appeared, then you can specify ++ that version instead if you wish.) Do not make any other change in ++ these notices. ++ ++ Once this change is made in a given copy, it is irreversible for ++ that copy, so the ordinary GNU General Public License applies to all ++ subsequent copies and derivative works made from that copy. ++ ++ This option is useful when you wish to copy part of the code of ++ the Library into a program that is not a library. ++ ++ 4. You may copy and distribute the Library (or a portion or ++ derivative of it, under Section 2) in object code or executable form ++ under the terms of Sections 1 and 2 above provided that you accompany ++ it with the complete corresponding machine-readable source code, which ++ must be distributed under the terms of Sections 1 and 2 above on a ++ medium customarily used for software interchange. ++ ++ If distribution of object code is made by offering access to copy ++ from a designated place, then offering equivalent access to copy the ++ source code from the same place satisfies the requirement to ++ distribute the source code, even though third parties are not ++ compelled to copy the source along with the object code. ++ ++ 5. A program that contains no derivative of any portion of the ++ Library, but is designed to work with the Library by being compiled or ++ linked with it, is called a "work that uses the Library". Such a ++ work, in isolation, is not a derivative work of the Library, and ++ therefore falls outside the scope of this License. ++ ++ However, linking a "work that uses the Library" with the Library ++ creates an executable that is a derivative of the Library (because it ++ contains portions of the Library), rather than a "work that uses the ++ library". The executable is therefore covered by this License. ++ Section 6 states terms for distribution of such executables. ++ ++ When a "work that uses the Library" uses material from a header file ++ that is part of the Library, the object code for the work may be a ++ derivative work of the Library even though the source code is not. ++ Whether this is true is especially significant if the work can be ++ linked without the Library, or if the work is itself a library. The ++ threshold for this to be true is not precisely defined by law. ++ ++ If such an object file uses only numerical parameters, data ++ structure layouts and accessors, and small macros and small inline ++ functions (ten lines or less in length), then the use of the object ++ file is unrestricted, regardless of whether it is legally a derivative ++ work. (Executables containing this object code plus portions of the ++ Library will still fall under Section 6.) ++ ++ Otherwise, if the work is a derivative of the Library, you may ++ distribute the object code for the work under the terms of Section 6. ++ Any executables containing that work also fall under Section 6, ++ whether or not they are linked directly with the Library itself. ++ ++ 6. As an exception to the Sections above, you may also combine or ++ link a "work that uses the Library" with the Library to produce a ++ work containing portions of the Library, and distribute that work ++ under terms of your choice, provided that the terms permit ++ modification of the work for the customer's own use and reverse ++ engineering for debugging such modifications. ++ ++ You must give prominent notice with each copy of the work that the ++ Library is used in it and that the Library and its use are covered by ++ this License. You must supply a copy of this License. If the work ++ during execution displays copyright notices, you must include the ++ copyright notice for the Library among them, as well as a reference ++ directing the user to the copy of this License. Also, you must do one ++ of these things: ++ ++ a) Accompany the work with the complete corresponding ++ machine-readable source code for the Library including whatever ++ changes were used in the work (which must be distributed under ++ Sections 1 and 2 above); and, if the work is an executable linked ++ with the Library, with the complete machine-readable "work that ++ uses the Library", as object code and/or source code, so that the ++ user can modify the Library and then relink to produce a modified ++ executable containing the modified Library. (It is understood ++ that the user who changes the contents of definitions files in the ++ Library will not necessarily be able to recompile the application ++ to use the modified definitions.) ++ ++ b) Use a suitable shared library mechanism for linking with the ++ Library. A suitable mechanism is one that (1) uses at run time a ++ copy of the library already present on the user's computer system, ++ rather than copying library functions into the executable, and (2) ++ will operate properly with a modified version of the library, if ++ the user installs one, as long as the modified version is ++ interface-compatible with the version that the work was made with. ++ ++ c) Accompany the work with a written offer, valid for at ++ least three years, to give the same user the materials ++ specified in Subsection 6a, above, for a charge no more ++ than the cost of performing this distribution. ++ ++ d) If distribution of the work is made by offering access to copy ++ from a designated place, offer equivalent access to copy the above ++ specified materials from the same place. ++ ++ e) Verify that the user has already received a copy of these ++ materials or that you have already sent this user a copy. ++ ++ For an executable, the required form of the "work that uses the ++ Library" must include any data and utility programs needed for ++ reproducing the executable from it. However, as a special exception, ++ the materials to be distributed need not include anything that is ++ normally distributed (in either source or binary form) with the major ++ components (compiler, kernel, and so on) of the operating system on ++ which the executable runs, unless that component itself accompanies ++ the executable. ++ ++ It may happen that this requirement contradicts the license ++ restrictions of other proprietary libraries that do not normally ++ accompany the operating system. Such a contradiction means you cannot ++ use both them and the Library together in an executable that you ++ distribute. ++ ++ 7. You may place library facilities that are a work based on the ++ Library side-by-side in a single library together with other library ++ facilities not covered by this License, and distribute such a combined ++ library, provided that the separate distribution of the work based on ++ the Library and of the other library facilities is otherwise ++ permitted, and provided that you do these two things: ++ ++ a) Accompany the combined library with a copy of the same work ++ based on the Library, uncombined with any other library ++ facilities. This must be distributed under the terms of the ++ Sections above. ++ ++ b) Give prominent notice with the combined library of the fact ++ that part of it is a work based on the Library, and explaining ++ where to find the accompanying uncombined form of the same work. ++ ++ 8. You may not copy, modify, sublicense, link with, or distribute ++ the Library except as expressly provided under this License. Any ++ attempt otherwise to copy, modify, sublicense, link with, or ++ distribute the Library is void, and will automatically terminate your ++ rights under this License. However, parties who have received copies, ++ or rights, from you under this License will not have their licenses ++ terminated so long as such parties remain in full compliance. ++ ++ 9. You are not required to accept this License, since you have not ++ signed it. However, nothing else grants you permission to modify or ++ distribute the Library or its derivative works. These actions are ++ prohibited by law if you do not accept this License. Therefore, by ++ modifying or distributing the Library (or any work based on the ++ Library), you indicate your acceptance of this License to do so, and ++ all its terms and conditions for copying, distributing or modifying ++ the Library or works based on it. ++ ++ 10. Each time you redistribute the Library (or any work based on the ++ Library), the recipient automatically receives a license from the ++ original licensor to copy, distribute, link with or modify the Library ++ subject to these terms and conditions. You may not impose any further ++ restrictions on the recipients' exercise of the rights granted herein. ++ You are not responsible for enforcing compliance by third parties with ++ this License. ++ ++ 11. If, as a consequence of a court judgment or allegation of patent ++ infringement or for any other reason (not limited to patent issues), ++ conditions are imposed on you (whether by court order, agreement or ++ otherwise) that contradict the conditions of this License, they do not ++ excuse you from the conditions of this License. If you cannot ++ distribute so as to satisfy simultaneously your obligations under this ++ License and any other pertinent obligations, then as a consequence you ++ may not distribute the Library at all. For example, if a patent ++ license would not permit royalty-free redistribution of the Library by ++ all those who receive copies directly or indirectly through you, then ++ the only way you could satisfy both it and this License would be to ++ refrain entirely from distribution of the Library. ++ ++ If any portion of this section is held invalid or unenforceable under any ++ particular circumstance, the balance of the section is intended to apply, ++ and the section as a whole is intended to apply in other circumstances. ++ ++ It is not the purpose of this section to induce you to infringe any ++ patents or other property right claims or to contest validity of any ++ such claims; this section has the sole purpose of protecting the ++ integrity of the free software distribution system which is ++ implemented by public license practices. Many people have made ++ generous contributions to the wide range of software distributed ++ through that system in reliance on consistent application of that ++ system; it is up to the author/donor to decide if he or she is willing ++ to distribute software through any other system and a licensee cannot ++ impose that choice. ++ ++ This section is intended to make thoroughly clear what is believed to ++ be a consequence of the rest of this License. ++ ++ 12. If the distribution and/or use of the Library is restricted in ++ certain countries either by patents or by copyrighted interfaces, the ++ original copyright holder who places the Library under this License may add ++ an explicit geographical distribution limitation excluding those countries, ++ so that distribution is permitted only in or among countries not thus ++ excluded. In such case, this License incorporates the limitation as if ++ written in the body of this License. ++ ++ 13. The Free Software Foundation may publish revised and/or new ++ versions of the Lesser General Public License from time to time. ++ Such new versions will be similar in spirit to the present version, ++ but may differ in detail to address new problems or concerns. ++ ++ Each version is given a distinguishing version number. If the Library ++ specifies a version number of this License which applies to it and ++ "any later version", you have the option of following the terms and ++ conditions either of that version or of any later version published by ++ the Free Software Foundation. If the Library does not specify a ++ license version number, you may choose any version ever published by ++ the Free Software Foundation. ++ ++ 14. If you wish to incorporate parts of the Library into other free ++ programs whose distribution conditions are incompatible with these, ++ write to the author to ask for permission. For software which is ++ copyrighted by the Free Software Foundation, write to the Free ++ Software Foundation; we sometimes make exceptions for this. Our ++ decision will be guided by the two goals of preserving the free status ++ of all derivatives of our free software and of promoting the sharing ++ and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO ++ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ++ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR ++ OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY ++ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE ++ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ++ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME ++ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ++ ++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ++ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ++ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU ++ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR ++ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE ++ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING ++ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A ++ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF ++ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH ++ DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Libraries ++ ++ If you develop a new library, and you want it to be of the greatest ++ possible use to the public, we recommend making it free software that ++ everyone can redistribute and change. You can do so by permitting ++ redistribution under these terms (or, alternatively, under the terms of the ++ ordinary General Public License). ++ ++ To apply these terms, attach the following notices to the library. It is ++ safest to attach them to the start of each source file to most effectively ++ convey the exclusion of warranty; and each file should have at least the ++ "copyright" line and a pointer to where the full notice is found. ++ ++ ++ Copyright (C) ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++ Also add information on how to contact you by electronic and paper mail. ++ ++ You should also get your employer (if you work as a programmer) or your ++ school, if any, to sign a "copyright disclaimer" for the library, if ++ necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the ++ library `Frob' (a library for tweaking knobs) written by James Random Hacker. ++ ++ , 1 April 1990 ++ Ty Coon, President of Vice ++ ++ That's all there is to it! ++ ++ +*** ../vim-8.1.0359/src/xdiff/xdiff.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xdiff.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,142 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #if !defined(XDIFF_H) ++ #define XDIFF_H ++ ++ #ifdef __cplusplus ++ extern "C" { ++ #endif /* #ifdef __cplusplus */ ++ ++ /* xpparm_t.flags */ ++ #define XDF_NEED_MINIMAL (1 << 0) ++ ++ #define XDF_IGNORE_WHITESPACE (1 << 1) ++ #define XDF_IGNORE_WHITESPACE_CHANGE (1 << 2) ++ #define XDF_IGNORE_WHITESPACE_AT_EOL (1 << 3) ++ #define XDF_IGNORE_CR_AT_EOL (1 << 4) ++ #define XDF_WHITESPACE_FLAGS (XDF_IGNORE_WHITESPACE | \ ++ XDF_IGNORE_WHITESPACE_CHANGE | \ ++ XDF_IGNORE_WHITESPACE_AT_EOL | \ ++ XDF_IGNORE_CR_AT_EOL) ++ ++ #define XDF_IGNORE_BLANK_LINES (1 << 7) ++ ++ #define XDF_PATIENCE_DIFF (1 << 14) ++ #define XDF_HISTOGRAM_DIFF (1 << 15) ++ #define XDF_DIFF_ALGORITHM_MASK (XDF_PATIENCE_DIFF | XDF_HISTOGRAM_DIFF) ++ #define XDF_DIFF_ALG(x) ((x) & XDF_DIFF_ALGORITHM_MASK) ++ ++ #define XDF_INDENT_HEURISTIC (1 << 23) ++ ++ /* xdemitconf_t.flags */ ++ #define XDL_EMIT_FUNCNAMES (1 << 0) ++ #define XDL_EMIT_FUNCCONTEXT (1 << 2) ++ ++ /* merge simplification levels */ ++ #define XDL_MERGE_MINIMAL 0 ++ #define XDL_MERGE_EAGER 1 ++ #define XDL_MERGE_ZEALOUS 2 ++ #define XDL_MERGE_ZEALOUS_ALNUM 3 ++ ++ /* merge favor modes */ ++ #define XDL_MERGE_FAVOR_OURS 1 ++ #define XDL_MERGE_FAVOR_THEIRS 2 ++ #define XDL_MERGE_FAVOR_UNION 3 ++ ++ /* merge output styles */ ++ #define XDL_MERGE_DIFF3 1 ++ ++ typedef struct s_mmfile { ++ char *ptr; ++ long size; ++ } mmfile_t; ++ ++ typedef struct s_mmbuffer { ++ char *ptr; ++ long size; ++ } mmbuffer_t; ++ ++ typedef struct s_xpparam { ++ unsigned long flags; ++ ++ /* See Documentation/diff-options.txt. */ ++ char **anchors; ++ size_t anchors_nr; ++ } xpparam_t; ++ ++ typedef struct s_xdemitcb { ++ void *priv; ++ int (*outf)(void *, mmbuffer_t *, int); ++ } xdemitcb_t; ++ ++ typedef long (*find_func_t)(const char *line, long line_len, char *buffer, long buffer_size, void *priv); ++ ++ typedef int (*xdl_emit_hunk_consume_func_t)(long start_a, long count_a, ++ long start_b, long count_b, ++ void *cb_data); ++ ++ typedef struct s_xdemitconf { ++ long ctxlen; ++ long interhunkctxlen; ++ unsigned long flags; ++ find_func_t find_func; ++ void *find_func_priv; ++ xdl_emit_hunk_consume_func_t hunk_func; ++ } xdemitconf_t; ++ ++ typedef struct s_bdiffparam { ++ long bsize; ++ } bdiffparam_t; ++ ++ ++ #define xdl_malloc(x) malloc(x) ++ #define xdl_free(ptr) free(ptr) ++ #define xdl_realloc(ptr,x) realloc(ptr,x) ++ ++ void *xdl_mmfile_first(mmfile_t *mmf, long *size); ++ long xdl_mmfile_size(mmfile_t *mmf); ++ ++ int xdl_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdemitconf_t const *xecfg, xdemitcb_t *ecb); ++ ++ typedef struct s_xmparam { ++ xpparam_t xpp; ++ int marker_size; ++ int level; ++ int favor; ++ int style; ++ const char *ancestor; /* label for orig */ ++ const char *file1; /* label for mf1 */ ++ const char *file2; /* label for mf2 */ ++ } xmparam_t; ++ ++ #define DEFAULT_CONFLICT_MARKER_SIZE 7 ++ ++ int xdl_merge(mmfile_t *orig, mmfile_t *mf1, mmfile_t *mf2, ++ xmparam_t const *xmp, mmbuffer_t *result); ++ ++ #ifdef __cplusplus ++ } ++ #endif /* #ifdef __cplusplus */ ++ ++ #endif /* #if !defined(XDIFF_H) */ +*** ../vim-8.1.0359/src/xdiff/xdiffi.c 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xdiffi.c 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,1043 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #include "xinclude.h" ++ ++ #define XDL_MAX_COST_MIN 256 ++ #define XDL_HEUR_MIN_COST 256 ++ #define XDL_LINE_MAX (long)((1UL << (CHAR_BIT * sizeof(long) - 1)) - 1) ++ #define XDL_SNAKE_CNT 20 ++ #define XDL_K_HEUR 4 ++ ++ typedef struct s_xdpsplit { ++ long i1, i2; ++ int min_lo, min_hi; ++ } xdpsplit_t; ++ ++ /* ++ * See "An O(ND) Difference Algorithm and its Variations", by Eugene Myers. ++ * Basically considers a "box" (off1, off2, lim1, lim2) and scan from both ++ * the forward diagonal starting from (off1, off2) and the backward diagonal ++ * starting from (lim1, lim2). If the K values on the same diagonal crosses ++ * returns the furthest point of reach. We might end up having to expensive ++ * cases using this algorithm is full, so a little bit of heuristic is needed ++ * to cut the search and to return a suboptimal point. ++ */ ++ static long xdl_split(unsigned long const *ha1, long off1, long lim1, ++ unsigned long const *ha2, long off2, long lim2, ++ long *kvdf, long *kvdb, int need_min, xdpsplit_t *spl, ++ xdalgoenv_t *xenv) { ++ long dmin = off1 - lim2, dmax = lim1 - off2; ++ long fmid = off1 - off2, bmid = lim1 - lim2; ++ long odd = (fmid - bmid) & 1; ++ long fmin = fmid, fmax = fmid; ++ long bmin = bmid, bmax = bmid; ++ long ec, d, i1, i2, prev1, best, dd, v, k; ++ ++ /* ++ * Set initial diagonal values for both forward and backward path. ++ */ ++ kvdf[fmid] = off1; ++ kvdb[bmid] = lim1; ++ ++ for (ec = 1;; ec++) { ++ int got_snake = 0; ++ ++ /* ++ * We need to extent the diagonal "domain" by one. If the next ++ * values exits the box boundaries we need to change it in the ++ * opposite direction because (max - min) must be a power of two. ++ * Also we initialize the external K value to -1 so that we can ++ * avoid extra conditions check inside the core loop. ++ */ ++ if (fmin > dmin) ++ kvdf[--fmin - 1] = -1; ++ else ++ ++fmin; ++ if (fmax < dmax) ++ kvdf[++fmax + 1] = -1; ++ else ++ --fmax; ++ ++ for (d = fmax; d >= fmin; d -= 2) { ++ if (kvdf[d - 1] >= kvdf[d + 1]) ++ i1 = kvdf[d - 1] + 1; ++ else ++ i1 = kvdf[d + 1]; ++ prev1 = i1; ++ i2 = i1 - d; ++ for (; i1 < lim1 && i2 < lim2 && ha1[i1] == ha2[i2]; i1++, i2++); ++ if (i1 - prev1 > xenv->snake_cnt) ++ got_snake = 1; ++ kvdf[d] = i1; ++ if (odd && bmin <= d && d <= bmax && kvdb[d] <= i1) { ++ spl->i1 = i1; ++ spl->i2 = i2; ++ spl->min_lo = spl->min_hi = 1; ++ return ec; ++ } ++ } ++ ++ /* ++ * We need to extent the diagonal "domain" by one. If the next ++ * values exits the box boundaries we need to change it in the ++ * opposite direction because (max - min) must be a power of two. ++ * Also we initialize the external K value to -1 so that we can ++ * avoid extra conditions check inside the core loop. ++ */ ++ if (bmin > dmin) ++ kvdb[--bmin - 1] = XDL_LINE_MAX; ++ else ++ ++bmin; ++ if (bmax < dmax) ++ kvdb[++bmax + 1] = XDL_LINE_MAX; ++ else ++ --bmax; ++ ++ for (d = bmax; d >= bmin; d -= 2) { ++ if (kvdb[d - 1] < kvdb[d + 1]) ++ i1 = kvdb[d - 1]; ++ else ++ i1 = kvdb[d + 1] - 1; ++ prev1 = i1; ++ i2 = i1 - d; ++ for (; i1 > off1 && i2 > off2 && ha1[i1 - 1] == ha2[i2 - 1]; i1--, i2--); ++ if (prev1 - i1 > xenv->snake_cnt) ++ got_snake = 1; ++ kvdb[d] = i1; ++ if (!odd && fmin <= d && d <= fmax && i1 <= kvdf[d]) { ++ spl->i1 = i1; ++ spl->i2 = i2; ++ spl->min_lo = spl->min_hi = 1; ++ return ec; ++ } ++ } ++ ++ if (need_min) ++ continue; ++ ++ /* ++ * If the edit cost is above the heuristic trigger and if ++ * we got a good snake, we sample current diagonals to see ++ * if some of the, have reached an "interesting" path. Our ++ * measure is a function of the distance from the diagonal ++ * corner (i1 + i2) penalized with the distance from the ++ * mid diagonal itself. If this value is above the current ++ * edit cost times a magic factor (XDL_K_HEUR) we consider ++ * it interesting. ++ */ ++ if (got_snake && ec > xenv->heur_min) { ++ for (best = 0, d = fmax; d >= fmin; d -= 2) { ++ dd = d > fmid ? d - fmid: fmid - d; ++ i1 = kvdf[d]; ++ i2 = i1 - d; ++ v = (i1 - off1) + (i2 - off2) - dd; ++ ++ if (v > XDL_K_HEUR * ec && v > best && ++ off1 + xenv->snake_cnt <= i1 && i1 < lim1 && ++ off2 + xenv->snake_cnt <= i2 && i2 < lim2) { ++ for (k = 1; ha1[i1 - k] == ha2[i2 - k]; k++) ++ if (k == xenv->snake_cnt) { ++ best = v; ++ spl->i1 = i1; ++ spl->i2 = i2; ++ break; ++ } ++ } ++ } ++ if (best > 0) { ++ spl->min_lo = 1; ++ spl->min_hi = 0; ++ return ec; ++ } ++ ++ for (best = 0, d = bmax; d >= bmin; d -= 2) { ++ dd = d > bmid ? d - bmid: bmid - d; ++ i1 = kvdb[d]; ++ i2 = i1 - d; ++ v = (lim1 - i1) + (lim2 - i2) - dd; ++ ++ if (v > XDL_K_HEUR * ec && v > best && ++ off1 < i1 && i1 <= lim1 - xenv->snake_cnt && ++ off2 < i2 && i2 <= lim2 - xenv->snake_cnt) { ++ for (k = 0; ha1[i1 + k] == ha2[i2 + k]; k++) ++ if (k == xenv->snake_cnt - 1) { ++ best = v; ++ spl->i1 = i1; ++ spl->i2 = i2; ++ break; ++ } ++ } ++ } ++ if (best > 0) { ++ spl->min_lo = 0; ++ spl->min_hi = 1; ++ return ec; ++ } ++ } ++ ++ /* ++ * Enough is enough. We spent too much time here and now we collect ++ * the furthest reaching path using the (i1 + i2) measure. ++ */ ++ if (ec >= xenv->mxcost) { ++ long fbest, fbest1, bbest, bbest1; ++ ++ fbest = fbest1 = -1; ++ for (d = fmax; d >= fmin; d -= 2) { ++ i1 = XDL_MIN(kvdf[d], lim1); ++ i2 = i1 - d; ++ if (lim2 < i2) ++ i1 = lim2 + d, i2 = lim2; ++ if (fbest < i1 + i2) { ++ fbest = i1 + i2; ++ fbest1 = i1; ++ } ++ } ++ ++ bbest = bbest1 = XDL_LINE_MAX; ++ for (d = bmax; d >= bmin; d -= 2) { ++ i1 = XDL_MAX(off1, kvdb[d]); ++ i2 = i1 - d; ++ if (i2 < off2) ++ i1 = off2 + d, i2 = off2; ++ if (i1 + i2 < bbest) { ++ bbest = i1 + i2; ++ bbest1 = i1; ++ } ++ } ++ ++ if ((lim1 + lim2) - bbest < fbest - (off1 + off2)) { ++ spl->i1 = fbest1; ++ spl->i2 = fbest - fbest1; ++ spl->min_lo = 1; ++ spl->min_hi = 0; ++ } else { ++ spl->i1 = bbest1; ++ spl->i2 = bbest - bbest1; ++ spl->min_lo = 0; ++ spl->min_hi = 1; ++ } ++ return ec; ++ } ++ } ++ } ++ ++ ++ /* ++ * Rule: "Divide et Impera". Recursively split the box in sub-boxes by calling ++ * the box splitting function. Note that the real job (marking changed lines) ++ * is done in the two boundary reaching checks. ++ */ ++ int xdl_recs_cmp(diffdata_t *dd1, long off1, long lim1, ++ diffdata_t *dd2, long off2, long lim2, ++ long *kvdf, long *kvdb, int need_min, xdalgoenv_t *xenv) { ++ unsigned long const *ha1 = dd1->ha, *ha2 = dd2->ha; ++ ++ /* ++ * Shrink the box by walking through each diagonal snake (SW and NE). ++ */ ++ for (; off1 < lim1 && off2 < lim2 && ha1[off1] == ha2[off2]; off1++, off2++); ++ for (; off1 < lim1 && off2 < lim2 && ha1[lim1 - 1] == ha2[lim2 - 1]; lim1--, lim2--); ++ ++ /* ++ * If one dimension is empty, then all records on the other one must ++ * be obviously changed. ++ */ ++ if (off1 == lim1) { ++ char *rchg2 = dd2->rchg; ++ long *rindex2 = dd2->rindex; ++ ++ for (; off2 < lim2; off2++) ++ rchg2[rindex2[off2]] = 1; ++ } else if (off2 == lim2) { ++ char *rchg1 = dd1->rchg; ++ long *rindex1 = dd1->rindex; ++ ++ for (; off1 < lim1; off1++) ++ rchg1[rindex1[off1]] = 1; ++ } else { ++ xdpsplit_t spl; ++ spl.i1 = spl.i2 = 0; ++ ++ /* ++ * Divide ... ++ */ ++ if (xdl_split(ha1, off1, lim1, ha2, off2, lim2, kvdf, kvdb, ++ need_min, &spl, xenv) < 0) { ++ ++ return -1; ++ } ++ ++ /* ++ * ... et Impera. ++ */ ++ if (xdl_recs_cmp(dd1, off1, spl.i1, dd2, off2, spl.i2, ++ kvdf, kvdb, spl.min_lo, xenv) < 0 || ++ xdl_recs_cmp(dd1, spl.i1, lim1, dd2, spl.i2, lim2, ++ kvdf, kvdb, spl.min_hi, xenv) < 0) { ++ ++ return -1; ++ } ++ } ++ ++ return 0; ++ } ++ ++ ++ int xdl_do_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdfenv_t *xe) { ++ long ndiags; ++ long *kvd, *kvdf, *kvdb; ++ xdalgoenv_t xenv; ++ diffdata_t dd1, dd2; ++ ++ if (XDF_DIFF_ALG(xpp->flags) == XDF_PATIENCE_DIFF) ++ return xdl_do_patience_diff(mf1, mf2, xpp, xe); ++ ++ if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF) ++ return xdl_do_histogram_diff(mf1, mf2, xpp, xe); ++ ++ if (xdl_prepare_env(mf1, mf2, xpp, xe) < 0) { ++ ++ return -1; ++ } ++ ++ /* ++ * Allocate and setup K vectors to be used by the differential algorithm. ++ * One is to store the forward path and one to store the backward path. ++ */ ++ ndiags = xe->xdf1.nreff + xe->xdf2.nreff + 3; ++ if (!(kvd = (long *) xdl_malloc((2 * ndiags + 2) * sizeof(long)))) { ++ ++ xdl_free_env(xe); ++ return -1; ++ } ++ kvdf = kvd; ++ kvdb = kvdf + ndiags; ++ kvdf += xe->xdf2.nreff + 1; ++ kvdb += xe->xdf2.nreff + 1; ++ ++ xenv.mxcost = xdl_bogosqrt(ndiags); ++ if (xenv.mxcost < XDL_MAX_COST_MIN) ++ xenv.mxcost = XDL_MAX_COST_MIN; ++ xenv.snake_cnt = XDL_SNAKE_CNT; ++ xenv.heur_min = XDL_HEUR_MIN_COST; ++ ++ dd1.nrec = xe->xdf1.nreff; ++ dd1.ha = xe->xdf1.ha; ++ dd1.rchg = xe->xdf1.rchg; ++ dd1.rindex = xe->xdf1.rindex; ++ dd2.nrec = xe->xdf2.nreff; ++ dd2.ha = xe->xdf2.ha; ++ dd2.rchg = xe->xdf2.rchg; ++ dd2.rindex = xe->xdf2.rindex; ++ ++ if (xdl_recs_cmp(&dd1, 0, dd1.nrec, &dd2, 0, dd2.nrec, ++ kvdf, kvdb, (xpp->flags & XDF_NEED_MINIMAL) != 0, &xenv) < 0) { ++ ++ xdl_free(kvd); ++ xdl_free_env(xe); ++ return -1; ++ } ++ ++ xdl_free(kvd); ++ ++ return 0; ++ } ++ ++ ++ static xdchange_t *xdl_add_change(xdchange_t *xscr, long i1, long i2, long chg1, long chg2) { ++ xdchange_t *xch; ++ ++ if (!(xch = (xdchange_t *) xdl_malloc(sizeof(xdchange_t)))) ++ return NULL; ++ ++ xch->next = xscr; ++ xch->i1 = i1; ++ xch->i2 = i2; ++ xch->chg1 = chg1; ++ xch->chg2 = chg2; ++ xch->ignore = 0; ++ ++ return xch; ++ } ++ ++ ++ static int recs_match(xrecord_t *rec1, xrecord_t *rec2, long flags) ++ { ++ return (rec1->ha == rec2->ha && ++ xdl_recmatch(rec1->ptr, rec1->size, ++ rec2->ptr, rec2->size, ++ flags)); ++ } ++ ++ /* ++ * If a line is indented more than this, get_indent() just returns this value. ++ * This avoids having to do absurd amounts of work for data that are not ++ * human-readable text, and also ensures that the output of get_indent fits within ++ * an int. ++ */ ++ #define MAX_INDENT 200 ++ ++ /* ++ * Return the amount of indentation of the specified line, treating TAB as 8 ++ * columns. Return -1 if line is empty or contains only whitespace. Clamp the ++ * output value at MAX_INDENT. ++ */ ++ static int get_indent(xrecord_t *rec) ++ { ++ long i; ++ int ret = 0; ++ ++ for (i = 0; i < rec->size; i++) { ++ char c = rec->ptr[i]; ++ ++ if (!XDL_ISSPACE(c)) ++ return ret; ++ else if (c == ' ') ++ ret += 1; ++ else if (c == '\t') ++ ret += 8 - ret % 8; ++ /* ignore other whitespace characters */ ++ ++ if (ret >= MAX_INDENT) ++ return MAX_INDENT; ++ } ++ ++ /* The line contains only whitespace. */ ++ return -1; ++ } ++ ++ /* ++ * If more than this number of consecutive blank rows are found, just return this ++ * value. This avoids requiring O(N^2) work for pathological cases, and also ++ * ensures that the output of score_split fits in an int. ++ */ ++ #define MAX_BLANKS 20 ++ ++ /* Characteristics measured about a hypothetical split position. */ ++ struct split_measurement { ++ /* ++ * Is the split at the end of the file (aside from any blank lines)? ++ */ ++ int end_of_file; ++ ++ /* ++ * How much is the line immediately following the split indented (or -1 if ++ * the line is blank): ++ */ ++ int indent; ++ ++ /* ++ * How many consecutive lines above the split are blank? ++ */ ++ int pre_blank; ++ ++ /* ++ * How much is the nearest non-blank line above the split indented (or -1 ++ * if there is no such line)? ++ */ ++ int pre_indent; ++ ++ /* ++ * How many lines after the line following the split are blank? ++ */ ++ int post_blank; ++ ++ /* ++ * How much is the nearest non-blank line after the line following the ++ * split indented (or -1 if there is no such line)? ++ */ ++ int post_indent; ++ }; ++ ++ struct split_score { ++ /* The effective indent of this split (smaller is preferred). */ ++ int effective_indent; ++ ++ /* Penalty for this split (smaller is preferred). */ ++ int penalty; ++ }; ++ ++ /* ++ * Fill m with information about a hypothetical split of xdf above line split. ++ */ ++ static void measure_split(const xdfile_t *xdf, long split, ++ struct split_measurement *m) ++ { ++ long i; ++ ++ if (split >= xdf->nrec) { ++ m->end_of_file = 1; ++ m->indent = -1; ++ } else { ++ m->end_of_file = 0; ++ m->indent = get_indent(xdf->recs[split]); ++ } ++ ++ m->pre_blank = 0; ++ m->pre_indent = -1; ++ for (i = split - 1; i >= 0; i--) { ++ m->pre_indent = get_indent(xdf->recs[i]); ++ if (m->pre_indent != -1) ++ break; ++ m->pre_blank += 1; ++ if (m->pre_blank == MAX_BLANKS) { ++ m->pre_indent = 0; ++ break; ++ } ++ } ++ ++ m->post_blank = 0; ++ m->post_indent = -1; ++ for (i = split + 1; i < xdf->nrec; i++) { ++ m->post_indent = get_indent(xdf->recs[i]); ++ if (m->post_indent != -1) ++ break; ++ m->post_blank += 1; ++ if (m->post_blank == MAX_BLANKS) { ++ m->post_indent = 0; ++ break; ++ } ++ } ++ } ++ ++ /* ++ * The empirically-determined weight factors used by score_split() below. ++ * Larger values means that the position is a less favorable place to split. ++ * ++ * Note that scores are only ever compared against each other, so multiplying ++ * all of these weight/penalty values by the same factor wouldn't change the ++ * heuristic's behavior. Still, we need to set that arbitrary scale *somehow*. ++ * In practice, these numbers are chosen to be large enough that they can be ++ * adjusted relative to each other with sufficient precision despite using ++ * integer math. ++ */ ++ ++ /* Penalty if there are no non-blank lines before the split */ ++ #define START_OF_FILE_PENALTY 1 ++ ++ /* Penalty if there are no non-blank lines after the split */ ++ #define END_OF_FILE_PENALTY 21 ++ ++ /* Multiplier for the number of blank lines around the split */ ++ #define TOTAL_BLANK_WEIGHT (-30) ++ ++ /* Multiplier for the number of blank lines after the split */ ++ #define POST_BLANK_WEIGHT 6 ++ ++ /* ++ * Penalties applied if the line is indented more than its predecessor ++ */ ++ #define RELATIVE_INDENT_PENALTY (-4) ++ #define RELATIVE_INDENT_WITH_BLANK_PENALTY 10 ++ ++ /* ++ * Penalties applied if the line is indented less than both its predecessor and ++ * its successor ++ */ ++ #define RELATIVE_OUTDENT_PENALTY 24 ++ #define RELATIVE_OUTDENT_WITH_BLANK_PENALTY 17 ++ ++ /* ++ * Penalties applied if the line is indented less than its predecessor but not ++ * less than its successor ++ */ ++ #define RELATIVE_DEDENT_PENALTY 23 ++ #define RELATIVE_DEDENT_WITH_BLANK_PENALTY 17 ++ ++ /* ++ * We only consider whether the sum of the effective indents for splits are ++ * less than (-1), equal to (0), or greater than (+1) each other. The resulting ++ * value is multiplied by the following weight and combined with the penalty to ++ * determine the better of two scores. ++ */ ++ #define INDENT_WEIGHT 60 ++ ++ /* ++ * How far do we slide a hunk at most? ++ */ ++ #define INDENT_HEURISTIC_MAX_SLIDING 100 ++ ++ /* ++ * Compute a badness score for the hypothetical split whose measurements are ++ * stored in m. The weight factors were determined empirically using the tools and ++ * corpus described in ++ * ++ * https://github.com/mhagger/diff-slider-tools ++ * ++ * Also see that project if you want to improve the weights based on, for example, ++ * a larger or more diverse corpus. ++ */ ++ static void score_add_split(const struct split_measurement *m, struct split_score *s) ++ { ++ /* ++ * A place to accumulate penalty factors (positive makes this index more ++ * favored): ++ */ ++ int post_blank, total_blank, indent, any_blanks; ++ ++ if (m->pre_indent == -1 && m->pre_blank == 0) ++ s->penalty += START_OF_FILE_PENALTY; ++ ++ if (m->end_of_file) ++ s->penalty += END_OF_FILE_PENALTY; ++ ++ /* ++ * Set post_blank to the number of blank lines following the split, ++ * including the line immediately after the split: ++ */ ++ post_blank = (m->indent == -1) ? 1 + m->post_blank : 0; ++ total_blank = m->pre_blank + post_blank; ++ ++ /* Penalties based on nearby blank lines: */ ++ s->penalty += TOTAL_BLANK_WEIGHT * total_blank; ++ s->penalty += POST_BLANK_WEIGHT * post_blank; ++ ++ if (m->indent != -1) ++ indent = m->indent; ++ else ++ indent = m->post_indent; ++ ++ any_blanks = (total_blank != 0); ++ ++ /* Note that the effective indent is -1 at the end of the file: */ ++ s->effective_indent += indent; ++ ++ if (indent == -1) { ++ /* No additional adjustments needed. */ ++ } else if (m->pre_indent == -1) { ++ /* No additional adjustments needed. */ ++ } else if (indent > m->pre_indent) { ++ /* ++ * The line is indented more than its predecessor. ++ */ ++ s->penalty += any_blanks ? ++ RELATIVE_INDENT_WITH_BLANK_PENALTY : ++ RELATIVE_INDENT_PENALTY; ++ } else if (indent == m->pre_indent) { ++ /* ++ * The line has the same indentation level as its predecessor. ++ * No additional adjustments needed. ++ */ ++ } else { ++ /* ++ * The line is indented less than its predecessor. It could be ++ * the block terminator of the previous block, but it could ++ * also be the start of a new block (e.g., an "else" block, or ++ * maybe the previous block didn't have a block terminator). ++ * Try to distinguish those cases based on what comes next: ++ */ ++ if (m->post_indent != -1 && m->post_indent > indent) { ++ /* ++ * The following line is indented more. So it is likely ++ * that this line is the start of a block. ++ */ ++ s->penalty += any_blanks ? ++ RELATIVE_OUTDENT_WITH_BLANK_PENALTY : ++ RELATIVE_OUTDENT_PENALTY; ++ } else { ++ /* ++ * That was probably the end of a block. ++ */ ++ s->penalty += any_blanks ? ++ RELATIVE_DEDENT_WITH_BLANK_PENALTY : ++ RELATIVE_DEDENT_PENALTY; ++ } ++ } ++ } ++ ++ static int score_cmp(struct split_score *s1, struct split_score *s2) ++ { ++ /* -1 if s1.effective_indent < s2->effective_indent, etc. */ ++ int cmp_indents = ((s1->effective_indent > s2->effective_indent) - ++ (s1->effective_indent < s2->effective_indent)); ++ ++ return INDENT_WEIGHT * cmp_indents + (s1->penalty - s2->penalty); ++ } ++ ++ /* ++ * Represent a group of changed lines in an xdfile_t (i.e., a contiguous group ++ * of lines that was inserted or deleted from the corresponding version of the ++ * file). We consider there to be such a group at the beginning of the file, at ++ * the end of the file, and between any two unchanged lines, though most such ++ * groups will usually be empty. ++ * ++ * If the first line in a group is equal to the line following the group, then ++ * the group can be slid down. Similarly, if the last line in a group is equal ++ * to the line preceding the group, then the group can be slid up. See ++ * group_slide_down() and group_slide_up(). ++ * ++ * Note that loops that are testing for changed lines in xdf->rchg do not need ++ * index bounding since the array is prepared with a zero at position -1 and N. ++ */ ++ struct xdlgroup { ++ /* ++ * The index of the first changed line in the group, or the index of ++ * the unchanged line above which the (empty) group is located. ++ */ ++ long start; ++ ++ /* ++ * The index of the first unchanged line after the group. For an empty ++ * group, end is equal to start. ++ */ ++ long end; ++ }; ++ ++ /* ++ * Initialize g to point at the first group in xdf. ++ */ ++ static void group_init(xdfile_t *xdf, struct xdlgroup *g) ++ { ++ g->start = g->end = 0; ++ while (xdf->rchg[g->end]) ++ g->end++; ++ } ++ ++ /* ++ * Move g to describe the next (possibly empty) group in xdf and return 0. If g ++ * is already at the end of the file, do nothing and return -1. ++ */ ++ static inline int group_next(xdfile_t *xdf, struct xdlgroup *g) ++ { ++ if (g->end == xdf->nrec) ++ return -1; ++ ++ g->start = g->end + 1; ++ for (g->end = g->start; xdf->rchg[g->end]; g->end++) ++ ; ++ ++ return 0; ++ } ++ ++ /* ++ * Move g to describe the previous (possibly empty) group in xdf and return 0. ++ * If g is already at the beginning of the file, do nothing and return -1. ++ */ ++ static inline int group_previous(xdfile_t *xdf, struct xdlgroup *g) ++ { ++ if (g->start == 0) ++ return -1; ++ ++ g->end = g->start - 1; ++ for (g->start = g->end; xdf->rchg[g->start - 1]; g->start--) ++ ; ++ ++ return 0; ++ } ++ ++ /* ++ * If g can be slid toward the end of the file, do so, and if it bumps into a ++ * following group, expand this group to include it. Return 0 on success or -1 ++ * if g cannot be slid down. ++ */ ++ static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g, long flags) ++ { ++ if (g->end < xdf->nrec && ++ recs_match(xdf->recs[g->start], xdf->recs[g->end], flags)) { ++ xdf->rchg[g->start++] = 0; ++ xdf->rchg[g->end++] = 1; ++ ++ while (xdf->rchg[g->end]) ++ g->end++; ++ ++ return 0; ++ } else { ++ return -1; ++ } ++ } ++ ++ /* ++ * If g can be slid toward the beginning of the file, do so, and if it bumps ++ * into a previous group, expand this group to include it. Return 0 on success ++ * or -1 if g cannot be slid up. ++ */ ++ static int group_slide_up(xdfile_t *xdf, struct xdlgroup *g, long flags) ++ { ++ if (g->start > 0 && ++ recs_match(xdf->recs[g->start - 1], xdf->recs[g->end - 1], flags)) { ++ xdf->rchg[--g->start] = 1; ++ xdf->rchg[--g->end] = 0; ++ ++ while (xdf->rchg[g->start - 1]) ++ g->start--; ++ ++ return 0; ++ } else { ++ return -1; ++ } ++ } ++ ++ static void xdl_bug(const char *msg) ++ { ++ fprintf(stderr, "BUG: %s\n", msg); ++ exit(1); ++ } ++ ++ /* ++ * Move back and forward change groups for a consistent and pretty diff output. ++ * This also helps in finding joinable change groups and reducing the diff ++ * size. ++ */ ++ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) { ++ struct xdlgroup g, go; ++ long earliest_end, end_matching_other; ++ long groupsize; ++ ++ group_init(xdf, &g); ++ group_init(xdfo, &go); ++ ++ while (1) { ++ /* If the group is empty in the to-be-compacted file, skip it: */ ++ if (g.end == g.start) ++ goto next; ++ ++ /* ++ * Now shift the change up and then down as far as possible in ++ * each direction. If it bumps into any other changes, merge them. ++ */ ++ do { ++ groupsize = g.end - g.start; ++ ++ /* ++ * Keep track of the last "end" index that causes this ++ * group to align with a group of changed lines in the ++ * other file. -1 indicates that we haven't found such ++ * a match yet: ++ */ ++ end_matching_other = -1; ++ ++ /* Shift the group backward as much as possible: */ ++ while (!group_slide_up(xdf, &g, flags)) ++ if (group_previous(xdfo, &go)) ++ xdl_bug("group sync broken sliding up"); ++ ++ /* ++ * This is this highest that this group can be shifted. ++ * Record its end index: ++ */ ++ earliest_end = g.end; ++ ++ if (go.end > go.start) ++ end_matching_other = g.end; ++ ++ /* Now shift the group forward as far as possible: */ ++ while (1) { ++ if (group_slide_down(xdf, &g, flags)) ++ break; ++ if (group_next(xdfo, &go)) ++ xdl_bug("group sync broken sliding down"); ++ ++ if (go.end > go.start) ++ end_matching_other = g.end; ++ } ++ } while (groupsize != g.end - g.start); ++ ++ /* ++ * If the group can be shifted, then we can possibly use this ++ * freedom to produce a more intuitive diff. ++ * ++ * The group is currently shifted as far down as possible, so the ++ * heuristics below only have to handle upwards shifts. ++ */ ++ ++ if (g.end == earliest_end) { ++ /* no shifting was possible */ ++ } else if (end_matching_other != -1) { ++ /* ++ * Move the possibly merged group of changes back to line ++ * up with the last group of changes from the other file ++ * that it can align with. ++ */ ++ while (go.end == go.start) { ++ if (group_slide_up(xdf, &g, flags)) ++ xdl_bug("match disappeared"); ++ if (group_previous(xdfo, &go)) ++ xdl_bug("group sync broken sliding to match"); ++ } ++ } else if (flags & XDF_INDENT_HEURISTIC) { ++ /* ++ * Indent heuristic: a group of pure add/delete lines ++ * implies two splits, one between the end of the "before" ++ * context and the start of the group, and another between ++ * the end of the group and the beginning of the "after" ++ * context. Some splits are aesthetically better and some ++ * are worse. We compute a badness "score" for each split, ++ * and add the scores for the two splits to define a ++ * "score" for each position that the group can be shifted ++ * to. Then we pick the shift with the lowest score. ++ */ ++ long shift, best_shift = -1; ++ struct split_score best_score; ++ ++ shift = earliest_end; ++ if (g.end - groupsize - 1 > shift) ++ shift = g.end - groupsize - 1; ++ if (g.end - INDENT_HEURISTIC_MAX_SLIDING > shift) ++ shift = g.end - INDENT_HEURISTIC_MAX_SLIDING; ++ for (; shift <= g.end; shift++) { ++ struct split_measurement m; ++ struct split_score score = {0, 0}; ++ ++ measure_split(xdf, shift, &m); ++ score_add_split(&m, &score); ++ measure_split(xdf, shift - groupsize, &m); ++ score_add_split(&m, &score); ++ if (best_shift == -1 || ++ score_cmp(&score, &best_score) <= 0) { ++ best_score.effective_indent = score.effective_indent; ++ best_score.penalty = score.penalty; ++ best_shift = shift; ++ } ++ } ++ ++ while (g.end > best_shift) { ++ if (group_slide_up(xdf, &g, flags)) ++ xdl_bug("best shift unreached"); ++ if (group_previous(xdfo, &go)) ++ xdl_bug("group sync broken sliding to blank line"); ++ } ++ } ++ ++ next: ++ /* Move past the just-processed group: */ ++ if (group_next(xdf, &g)) ++ break; ++ if (group_next(xdfo, &go)) ++ xdl_bug("group sync broken moving to next group"); ++ } ++ ++ if (!group_next(xdfo, &go)) ++ xdl_bug("group sync broken at end of file"); ++ ++ return 0; ++ } ++ ++ ++ int xdl_build_script(xdfenv_t *xe, xdchange_t **xscr) { ++ xdchange_t *cscr = NULL, *xch; ++ char *rchg1 = xe->xdf1.rchg, *rchg2 = xe->xdf2.rchg; ++ long i1, i2, l1, l2; ++ ++ /* ++ * Trivial. Collects "groups" of changes and creates an edit script. ++ */ ++ for (i1 = xe->xdf1.nrec, i2 = xe->xdf2.nrec; i1 >= 0 || i2 >= 0; i1--, i2--) ++ if (rchg1[i1 - 1] || rchg2[i2 - 1]) { ++ for (l1 = i1; rchg1[i1 - 1]; i1--); ++ for (l2 = i2; rchg2[i2 - 1]; i2--); ++ ++ if (!(xch = xdl_add_change(cscr, i1, i2, l1 - i1, l2 - i2))) { ++ xdl_free_script(cscr); ++ return -1; ++ } ++ cscr = xch; ++ } ++ ++ *xscr = cscr; ++ ++ return 0; ++ } ++ ++ ++ void xdl_free_script(xdchange_t *xscr) { ++ xdchange_t *xch; ++ ++ while ((xch = xscr) != NULL) { ++ xscr = xscr->next; ++ xdl_free(xch); ++ } ++ } ++ ++ static int xdl_call_hunk_func(xdfenv_t *xe UNUSED, xdchange_t *xscr, xdemitcb_t *ecb, ++ xdemitconf_t const *xecfg) ++ { ++ xdchange_t *xch, *xche; ++ ++ for (xch = xscr; xch; xch = xche->next) { ++ xche = xdl_get_hunk(&xch, xecfg); ++ if (!xch) ++ break; ++ if (xecfg->hunk_func(xch->i1, xche->i1 + xche->chg1 - xch->i1, ++ xch->i2, xche->i2 + xche->chg2 - xch->i2, ++ ecb->priv) < 0) ++ return -1; ++ } ++ return 0; ++ } ++ ++ static void xdl_mark_ignorable(xdchange_t *xscr, xdfenv_t *xe, long flags) ++ { ++ xdchange_t *xch; ++ ++ for (xch = xscr; xch; xch = xch->next) { ++ int ignore = 1; ++ xrecord_t **rec; ++ long i; ++ ++ rec = &xe->xdf1.recs[xch->i1]; ++ for (i = 0; i < xch->chg1 && ignore; i++) ++ ignore = xdl_blankline(rec[i]->ptr, rec[i]->size, flags); ++ ++ rec = &xe->xdf2.recs[xch->i2]; ++ for (i = 0; i < xch->chg2 && ignore; i++) ++ ignore = xdl_blankline(rec[i]->ptr, rec[i]->size, flags); ++ ++ xch->ignore = ignore; ++ } ++ } ++ ++ int xdl_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdemitconf_t const *xecfg, xdemitcb_t *ecb) { ++ xdchange_t *xscr; ++ xdfenv_t xe; ++ emit_func_t ef = xecfg->hunk_func ? xdl_call_hunk_func : xdl_emit_diff; ++ ++ if (xdl_do_diff(mf1, mf2, xpp, &xe) < 0) { ++ ++ return -1; ++ } ++ if (xdl_change_compact(&xe.xdf1, &xe.xdf2, xpp->flags) < 0 || ++ xdl_change_compact(&xe.xdf2, &xe.xdf1, xpp->flags) < 0 || ++ xdl_build_script(&xe, &xscr) < 0) { ++ ++ xdl_free_env(&xe); ++ return -1; ++ } ++ if (xscr) { ++ if (xpp->flags & XDF_IGNORE_BLANK_LINES) ++ xdl_mark_ignorable(xscr, &xe, xpp->flags); ++ ++ if (ef(&xe, xscr, ecb, xecfg) < 0) { ++ ++ xdl_free_script(xscr); ++ xdl_free_env(&xe); ++ return -1; ++ } ++ xdl_free_script(xscr); ++ } ++ xdl_free_env(&xe); ++ ++ return 0; ++ } +*** ../vim-8.1.0359/src/xdiff/xdiffi.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xdiffi.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,64 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #if !defined(XDIFFI_H) ++ #define XDIFFI_H ++ ++ ++ typedef struct s_diffdata { ++ long nrec; ++ unsigned long const *ha; ++ long *rindex; ++ char *rchg; ++ } diffdata_t; ++ ++ typedef struct s_xdalgoenv { ++ long mxcost; ++ long snake_cnt; ++ long heur_min; ++ } xdalgoenv_t; ++ ++ typedef struct s_xdchange { ++ struct s_xdchange *next; ++ long i1, i2; ++ long chg1, chg2; ++ int ignore; ++ } xdchange_t; ++ ++ ++ ++ int xdl_recs_cmp(diffdata_t *dd1, long off1, long lim1, ++ diffdata_t *dd2, long off2, long lim2, ++ long *kvdf, long *kvdb, int need_min, xdalgoenv_t *xenv); ++ int xdl_do_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdfenv_t *xe); ++ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags); ++ int xdl_build_script(xdfenv_t *xe, xdchange_t **xscr); ++ void xdl_free_script(xdchange_t *xscr); ++ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb, ++ xdemitconf_t const *xecfg); ++ int xdl_do_patience_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdfenv_t *env); ++ int xdl_do_histogram_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdfenv_t *env); ++ ++ #endif /* #if !defined(XDIFFI_H) */ +*** ../vim-8.1.0359/src/xdiff/xemit.c 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xemit.c 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,312 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #include "xinclude.h" ++ ++ static long xdl_get_rec(xdfile_t *xdf, long ri, char const **rec) { ++ ++ *rec = xdf->recs[ri]->ptr; ++ ++ return xdf->recs[ri]->size; ++ } ++ ++ ++ static int xdl_emit_record(xdfile_t *xdf, long ri, char const *pre, xdemitcb_t *ecb) { ++ long size, psize = strlen(pre); ++ char const *rec; ++ ++ size = xdl_get_rec(xdf, ri, &rec); ++ if (xdl_emit_diffrec(rec, size, pre, psize, ecb) < 0) { ++ ++ return -1; ++ } ++ ++ return 0; ++ } ++ ++ ++ /* ++ * Starting at the passed change atom, find the latest change atom to be included ++ * inside the differential hunk according to the specified configuration. ++ * Also advance xscr if the first changes must be discarded. ++ */ ++ xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg) ++ { ++ xdchange_t *xch, *xchp, *lxch; ++ long max_common = 2 * xecfg->ctxlen + xecfg->interhunkctxlen; ++ long max_ignorable = xecfg->ctxlen; ++ unsigned long ignored = 0; /* number of ignored blank lines */ ++ ++ /* remove ignorable changes that are too far before other changes */ ++ for (xchp = *xscr; xchp && xchp->ignore; xchp = xchp->next) { ++ xch = xchp->next; ++ ++ if (xch == NULL || ++ xch->i1 - (xchp->i1 + xchp->chg1) >= max_ignorable) ++ *xscr = xch; ++ } ++ ++ if (*xscr == NULL) ++ return NULL; ++ ++ lxch = *xscr; ++ ++ for (xchp = *xscr, xch = xchp->next; xch; xchp = xch, xch = xch->next) { ++ long distance = xch->i1 - (xchp->i1 + xchp->chg1); ++ if (distance > max_common) ++ break; ++ ++ if (distance < max_ignorable && (!xch->ignore || lxch == xchp)) { ++ lxch = xch; ++ ignored = 0; ++ } else if (distance < max_ignorable && xch->ignore) { ++ ignored += xch->chg2; ++ } else if (lxch != xchp && ++ xch->i1 + (long)ignored - (lxch->i1 + lxch->chg1) > max_common) { ++ break; ++ } else if (!xch->ignore) { ++ lxch = xch; ++ ignored = 0; ++ } else { ++ ignored += xch->chg2; ++ } ++ } ++ ++ return lxch; ++ } ++ ++ ++ static long def_ff(const char *rec, long len, char *buf, long sz, void *priv UNUSED) ++ { ++ if (len > 0 && ++ (isalpha((unsigned char)*rec) || /* identifier? */ ++ *rec == '_' || /* also identifier? */ ++ *rec == '$')) { /* identifiers from VMS and other esoterico */ ++ if (len > sz) ++ len = sz; ++ while (0 < len && isspace((unsigned char)rec[len - 1])) ++ len--; ++ memcpy(buf, rec, len); ++ return len; ++ } ++ return -1; ++ } ++ ++ static long match_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri, ++ char *buf, long sz) ++ { ++ const char *rec; ++ long len = xdl_get_rec(xdf, ri, &rec); ++ if (!xecfg->find_func) ++ return def_ff(rec, len, buf, sz, xecfg->find_func_priv); ++ return xecfg->find_func(rec, len, buf, sz, xecfg->find_func_priv); ++ } ++ ++ static int is_func_rec(xdfile_t *xdf, xdemitconf_t const *xecfg, long ri) ++ { ++ char dummy[1]; ++ return match_func_rec(xdf, xecfg, ri, dummy, sizeof(dummy)) >= 0; ++ } ++ ++ struct func_line { ++ long len; ++ char buf[80]; ++ }; ++ ++ static long get_func_line(xdfenv_t *xe, xdemitconf_t const *xecfg, ++ struct func_line *func_line, long start, long limit) ++ { ++ long l, size, step = (start > limit) ? -1 : 1; ++ char *buf, dummy[1]; ++ ++ buf = func_line ? func_line->buf : dummy; ++ size = func_line ? sizeof(func_line->buf) : sizeof(dummy); ++ ++ for (l = start; l != limit && 0 <= l && l < xe->xdf1.nrec; l += step) { ++ long len = match_func_rec(&xe->xdf1, xecfg, l, buf, size); ++ if (len >= 0) { ++ if (func_line) ++ func_line->len = len; ++ return l; ++ } ++ } ++ return -1; ++ } ++ ++ static int is_empty_rec(xdfile_t *xdf, long ri) ++ { ++ const char *rec; ++ long len = xdl_get_rec(xdf, ri, &rec); ++ ++ while (len > 0 && XDL_ISSPACE(*rec)) { ++ rec++; ++ len--; ++ } ++ return !len; ++ } ++ ++ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb, ++ xdemitconf_t const *xecfg) { ++ long s1, s2, e1, e2, lctx; ++ xdchange_t *xch, *xche; ++ long funclineprev = -1; ++ struct func_line func_line = { 0 }; ++ ++ for (xch = xscr; xch; xch = xche->next) { ++ xche = xdl_get_hunk(&xch, xecfg); ++ if (!xch) ++ break; ++ ++ s1 = XDL_MAX(xch->i1 - xecfg->ctxlen, 0); ++ s2 = XDL_MAX(xch->i2 - xecfg->ctxlen, 0); ++ ++ if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) { ++ long fs1, i1 = xch->i1; ++ ++ /* Appended chunk? */ ++ if (i1 >= xe->xdf1.nrec) { ++ long i2 = xch->i2; ++ ++ /* ++ * We don't need additional context if ++ * a whole function was added. ++ */ ++ while (i2 < xe->xdf2.nrec) { ++ if (is_func_rec(&xe->xdf2, xecfg, i2)) ++ goto post_context_calculation; ++ i2++; ++ } ++ ++ /* ++ * Otherwise get more context from the ++ * pre-image. ++ */ ++ i1 = xe->xdf1.nrec - 1; ++ } ++ ++ fs1 = get_func_line(xe, xecfg, NULL, i1, -1); ++ while (fs1 > 0 && !is_empty_rec(&xe->xdf1, fs1 - 1) && ++ !is_func_rec(&xe->xdf1, xecfg, fs1 - 1)) ++ fs1--; ++ if (fs1 < 0) ++ fs1 = 0; ++ if (fs1 < s1) { ++ s2 -= s1 - fs1; ++ s1 = fs1; ++ } ++ } ++ ++ post_context_calculation: ++ lctx = xecfg->ctxlen; ++ lctx = XDL_MIN(lctx, xe->xdf1.nrec - (xche->i1 + xche->chg1)); ++ lctx = XDL_MIN(lctx, xe->xdf2.nrec - (xche->i2 + xche->chg2)); ++ ++ e1 = xche->i1 + xche->chg1 + lctx; ++ e2 = xche->i2 + xche->chg2 + lctx; ++ ++ if (xecfg->flags & XDL_EMIT_FUNCCONTEXT) { ++ long fe1 = get_func_line(xe, xecfg, NULL, ++ xche->i1 + xche->chg1, ++ xe->xdf1.nrec); ++ while (fe1 > 0 && is_empty_rec(&xe->xdf1, fe1 - 1)) ++ fe1--; ++ if (fe1 < 0) ++ fe1 = xe->xdf1.nrec; ++ if (fe1 > e1) { ++ e2 += fe1 - e1; ++ e1 = fe1; ++ } ++ ++ /* ++ * Overlap with next change? Then include it ++ * in the current hunk and start over to find ++ * its new end. ++ */ ++ if (xche->next) { ++ long l = XDL_MIN(xche->next->i1, ++ xe->xdf1.nrec - 1); ++ if (l - xecfg->ctxlen <= e1 || ++ get_func_line(xe, xecfg, NULL, l, e1) < 0) { ++ xche = xche->next; ++ goto post_context_calculation; ++ } ++ } ++ } ++ ++ /* ++ * Emit current hunk header. ++ */ ++ ++ if (xecfg->flags & XDL_EMIT_FUNCNAMES) { ++ get_func_line(xe, xecfg, &func_line, ++ s1 - 1, funclineprev); ++ funclineprev = s1 - 1; ++ } ++ if (xdl_emit_hunk_hdr(s1 + 1, e1 - s1, s2 + 1, e2 - s2, ++ func_line.buf, func_line.len, ecb) < 0) ++ return -1; ++ ++ /* ++ * Emit pre-context. ++ */ ++ for (; s2 < xch->i2; s2++) ++ if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0) ++ return -1; ++ ++ for (s1 = xch->i1, s2 = xch->i2;; xch = xch->next) { ++ /* ++ * Merge previous with current change atom. ++ */ ++ for (; s1 < xch->i1 && s2 < xch->i2; s1++, s2++) ++ if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0) ++ return -1; ++ ++ /* ++ * Removes lines from the first file. ++ */ ++ for (s1 = xch->i1; s1 < xch->i1 + xch->chg1; s1++) ++ if (xdl_emit_record(&xe->xdf1, s1, "-", ecb) < 0) ++ return -1; ++ ++ /* ++ * Adds lines from the second file. ++ */ ++ for (s2 = xch->i2; s2 < xch->i2 + xch->chg2; s2++) ++ if (xdl_emit_record(&xe->xdf2, s2, "+", ecb) < 0) ++ return -1; ++ ++ if (xch == xche) ++ break; ++ s1 = xch->i1 + xch->chg1; ++ s2 = xch->i2 + xch->chg2; ++ } ++ ++ /* ++ * Emit post-context. ++ */ ++ for (s2 = xche->i2 + xche->chg2; s2 < e2; s2++) ++ if (xdl_emit_record(&xe->xdf2, s2, " ", ecb) < 0) ++ return -1; ++ } ++ ++ return 0; ++ } +*** ../vim-8.1.0359/src/xdiff/xemit.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xemit.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,36 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #if !defined(XEMIT_H) ++ #define XEMIT_H ++ ++ ++ typedef int (*emit_func_t)(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb, ++ xdemitconf_t const *xecfg); ++ ++ xdchange_t *xdl_get_hunk(xdchange_t **xscr, xdemitconf_t const *xecfg); ++ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb, ++ xdemitconf_t const *xecfg); ++ ++ ++ ++ #endif /* #if !defined(XEMIT_H) */ +*** ../vim-8.1.0359/src/xdiff/xhistogram.c 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xhistogram.c 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,386 ---- ++ /* ++ * Copyright (C) 2010, Google Inc. ++ * and other copyright owners as documented in JGit's IP log. ++ * ++ * This program and the accompanying materials are made available ++ * under the terms of the Eclipse Distribution License v1.0 which ++ * accompanies this distribution, is reproduced below, and is ++ * available at http://www.eclipse.org/org/documents/edl-v10.php ++ * ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials provided ++ * with the distribution. ++ * ++ * - Neither the name of the Eclipse Foundation, Inc. nor the ++ * names of its contributors may be used to endorse or promote ++ * products derived from this software without specific prior ++ * written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ++ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ++ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ++ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ++ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++ #include "xinclude.h" ++ #include "xtypes.h" ++ #include "xdiff.h" ++ ++ #define MAX_PTR INT_MAX ++ #define MAX_CNT INT_MAX ++ ++ #define LINE_END(n) (line##n + count##n - 1) ++ #define LINE_END_PTR(n) (*line##n + *count##n - 1) ++ ++ struct histindex { ++ struct record { ++ unsigned int ptr, cnt; ++ struct record *next; ++ } **records, /* an occurrence */ ++ **line_map; /* map of line to record chain */ ++ chastore_t rcha; ++ unsigned int *next_ptrs; ++ unsigned int table_bits, ++ records_size, ++ line_map_size; ++ ++ unsigned int max_chain_length, ++ key_shift, ++ ptr_shift; ++ ++ unsigned int cnt, ++ has_common; ++ ++ xdfenv_t *env; ++ xpparam_t const *xpp; ++ }; ++ ++ struct region { ++ unsigned int begin1, end1; ++ unsigned int begin2, end2; ++ }; ++ ++ #define LINE_MAP(i, a) (i->line_map[(a) - i->ptr_shift]) ++ ++ #define NEXT_PTR(index, ptr) \ ++ (index->next_ptrs[(ptr) - index->ptr_shift]) ++ ++ #define CNT(index, ptr) \ ++ ((LINE_MAP(index, ptr))->cnt) ++ ++ #define REC(env, s, l) \ ++ (env->xdf##s.recs[l - 1]) ++ ++ static int cmp_recs(xpparam_t const *xpp, ++ xrecord_t *r1, xrecord_t *r2) ++ { ++ return r1->ha == r2->ha && ++ xdl_recmatch(r1->ptr, r1->size, r2->ptr, r2->size, ++ xpp->flags); ++ } ++ ++ #define CMP_ENV(xpp, env, s1, l1, s2, l2) \ ++ (cmp_recs(xpp, REC(env, s1, l1), REC(env, s2, l2))) ++ ++ #define CMP(i, s1, l1, s2, l2) \ ++ (cmp_recs(i->xpp, REC(i->env, s1, l1), REC(i->env, s2, l2))) ++ ++ #define TABLE_HASH(index, side, line) \ ++ XDL_HASHLONG((REC(index->env, side, line))->ha, index->table_bits) ++ ++ static int scanA(struct histindex *index, int line1, int count1) ++ { ++ int ptr, tbl_idx; ++ unsigned int chain_len; ++ struct record **rec_chain, *rec; ++ ++ for (ptr = LINE_END(1); line1 <= ptr; ptr--) { ++ tbl_idx = TABLE_HASH(index, 1, ptr); ++ rec_chain = index->records + tbl_idx; ++ rec = *rec_chain; ++ ++ chain_len = 0; ++ while (rec) { ++ if (CMP(index, 1, rec->ptr, 1, ptr)) { ++ /* ++ * ptr is identical to another element. Insert ++ * it onto the front of the existing element ++ * chain. ++ */ ++ NEXT_PTR(index, ptr) = rec->ptr; ++ rec->ptr = ptr; ++ /* cap rec->cnt at MAX_CNT */ ++ rec->cnt = XDL_MIN(MAX_CNT, rec->cnt + 1); ++ LINE_MAP(index, ptr) = rec; ++ goto continue_scan; ++ } ++ ++ rec = rec->next; ++ chain_len++; ++ } ++ ++ if (chain_len == index->max_chain_length) ++ return -1; ++ ++ /* ++ * This is the first time we have ever seen this particular ++ * element in the sequence. Construct a new chain for it. ++ */ ++ if (!(rec = xdl_cha_alloc(&index->rcha))) ++ return -1; ++ rec->ptr = ptr; ++ rec->cnt = 1; ++ rec->next = *rec_chain; ++ *rec_chain = rec; ++ LINE_MAP(index, ptr) = rec; ++ ++ continue_scan: ++ ; /* no op */ ++ } ++ ++ return 0; ++ } ++ ++ static int try_lcs(struct histindex *index, struct region *lcs, int b_ptr, ++ int line1, int count1, int line2, int count2) ++ { ++ unsigned int b_next = b_ptr + 1; ++ struct record *rec = index->records[TABLE_HASH(index, 2, b_ptr)]; ++ unsigned int as, ae, bs, be, np, rc; ++ int should_break; ++ ++ for (; rec; rec = rec->next) { ++ if (rec->cnt > index->cnt) { ++ if (!index->has_common) ++ index->has_common = CMP(index, 1, rec->ptr, 2, b_ptr); ++ continue; ++ } ++ ++ as = rec->ptr; ++ if (!CMP(index, 1, as, 2, b_ptr)) ++ continue; ++ ++ index->has_common = 1; ++ for (;;) { ++ should_break = 0; ++ np = NEXT_PTR(index, as); ++ bs = b_ptr; ++ ae = as; ++ be = bs; ++ rc = rec->cnt; ++ ++ while (line1 < (int)as && line2 < (int)bs ++ && CMP(index, 1, as - 1, 2, bs - 1)) { ++ as--; ++ bs--; ++ if (1 < rc) ++ rc = XDL_MIN(rc, CNT(index, as)); ++ } ++ while ((int)ae < LINE_END(1) && (int)be < LINE_END(2) ++ && CMP(index, 1, ae + 1, 2, be + 1)) { ++ ae++; ++ be++; ++ if (1 < rc) ++ rc = XDL_MIN(rc, CNT(index, ae)); ++ } ++ ++ if (b_next <= be) ++ b_next = be + 1; ++ if (lcs->end1 - lcs->begin1 < ae - as || rc < index->cnt) { ++ lcs->begin1 = as; ++ lcs->begin2 = bs; ++ lcs->end1 = ae; ++ lcs->end2 = be; ++ index->cnt = rc; ++ } ++ ++ if (np == 0) ++ break; ++ ++ while (np <= ae) { ++ np = NEXT_PTR(index, np); ++ if (np == 0) { ++ should_break = 1; ++ break; ++ } ++ } ++ ++ if (should_break) ++ break; ++ ++ as = np; ++ } ++ } ++ return b_next; ++ } ++ ++ static int fall_back_to_classic_diff(xpparam_t const *xpp, xdfenv_t *env, ++ int line1, int count1, int line2, int count2) ++ { ++ xpparam_t xpparam; ++ xpparam.flags = xpp->flags & ~XDF_DIFF_ALGORITHM_MASK; ++ ++ return xdl_fall_back_diff(env, &xpparam, ++ line1, count1, line2, count2); ++ } ++ ++ static inline void free_index(struct histindex *index) ++ { ++ xdl_free(index->records); ++ xdl_free(index->line_map); ++ xdl_free(index->next_ptrs); ++ xdl_cha_free(&index->rcha); ++ } ++ ++ static int find_lcs(xpparam_t const *xpp, xdfenv_t *env, ++ struct region *lcs, ++ int line1, int count1, int line2, int count2) ++ { ++ int b_ptr; ++ int sz, ret = -1; ++ struct histindex index; ++ ++ memset(&index, 0, sizeof(index)); ++ ++ index.env = env; ++ index.xpp = xpp; ++ ++ index.records = NULL; ++ index.line_map = NULL; ++ /* in case of early xdl_cha_free() */ ++ index.rcha.head = NULL; ++ ++ index.table_bits = xdl_hashbits(count1); ++ sz = index.records_size = 1 << index.table_bits; ++ sz *= sizeof(struct record *); ++ if (!(index.records = (struct record **) xdl_malloc(sz))) ++ goto cleanup; ++ memset(index.records, 0, sz); ++ ++ sz = index.line_map_size = count1; ++ sz *= sizeof(struct record *); ++ if (!(index.line_map = (struct record **) xdl_malloc(sz))) ++ goto cleanup; ++ memset(index.line_map, 0, sz); ++ ++ sz = index.line_map_size; ++ sz *= sizeof(unsigned int); ++ if (!(index.next_ptrs = (unsigned int *) xdl_malloc(sz))) ++ goto cleanup; ++ memset(index.next_ptrs, 0, sz); ++ ++ /* lines / 4 + 1 comes from xprepare.c:xdl_prepare_ctx() */ ++ if (xdl_cha_init(&index.rcha, sizeof(struct record), count1 / 4 + 1) < 0) ++ goto cleanup; ++ ++ index.ptr_shift = line1; ++ index.max_chain_length = 64; ++ ++ if (scanA(&index, line1, count1)) ++ goto cleanup; ++ ++ index.cnt = index.max_chain_length + 1; ++ ++ for (b_ptr = line2; b_ptr <= LINE_END(2); ) ++ b_ptr = try_lcs(&index, lcs, b_ptr, line1, count1, line2, count2); ++ ++ if (index.has_common && index.max_chain_length < index.cnt) ++ ret = 1; ++ else ++ ret = 0; ++ ++ cleanup: ++ free_index(&index); ++ return ret; ++ } ++ ++ static int histogram_diff(xpparam_t const *xpp, xdfenv_t *env, ++ int line1, int count1, int line2, int count2) ++ { ++ struct region lcs; ++ int lcs_found; ++ int result; ++ redo: ++ result = -1; ++ ++ if (count1 <= 0 && count2 <= 0) ++ return 0; ++ ++ if (LINE_END(1) >= MAX_PTR) ++ return -1; ++ ++ if (!count1) { ++ while(count2--) ++ env->xdf2.rchg[line2++ - 1] = 1; ++ return 0; ++ } else if (!count2) { ++ while(count1--) ++ env->xdf1.rchg[line1++ - 1] = 1; ++ return 0; ++ } ++ ++ memset(&lcs, 0, sizeof(lcs)); ++ lcs_found = find_lcs(xpp, env, &lcs, line1, count1, line2, count2); ++ if (lcs_found < 0) ++ goto out; ++ else if (lcs_found) ++ result = fall_back_to_classic_diff(xpp, env, line1, count1, line2, count2); ++ else { ++ if (lcs.begin1 == 0 && lcs.begin2 == 0) { ++ while (count1--) ++ env->xdf1.rchg[line1++ - 1] = 1; ++ while (count2--) ++ env->xdf2.rchg[line2++ - 1] = 1; ++ result = 0; ++ } else { ++ result = histogram_diff(xpp, env, ++ line1, lcs.begin1 - line1, ++ line2, lcs.begin2 - line2); ++ if (result) ++ goto out; ++ /* ++ * result = histogram_diff(xpp, env, ++ * lcs.end1 + 1, LINE_END(1) - lcs.end1, ++ * lcs.end2 + 1, LINE_END(2) - lcs.end2); ++ * but let's optimize tail recursion ourself: ++ */ ++ count1 = LINE_END(1) - lcs.end1; ++ line1 = lcs.end1 + 1; ++ count2 = LINE_END(2) - lcs.end2; ++ line2 = lcs.end2 + 1; ++ goto redo; ++ } ++ } ++ out: ++ return result; ++ } ++ ++ int xdl_do_histogram_diff(mmfile_t *file1, mmfile_t *file2, ++ xpparam_t const *xpp, xdfenv_t *env) ++ { ++ if (xdl_prepare_env(file1, file2, xpp, env) < 0) ++ return -1; ++ ++ return histogram_diff(xpp, env, ++ env->xdf1.dstart + 1, env->xdf1.dend - env->xdf1.dstart + 1, ++ env->xdf2.dstart + 1, env->xdf2.dend - env->xdf2.dstart + 1); ++ } +*** ../vim-8.1.0359/src/xdiff/xinclude.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xinclude.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,61 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ /* defines HAVE_ATTRIBUTE_UNUSED */ ++ #ifdef HAVE_CONFIG_H ++ # include "../auto/config.h" ++ #endif ++ ++ /* Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter ++ * can be used to check for mistakes. */ ++ #ifdef HAVE_ATTRIBUTE_UNUSED ++ # define UNUSED __attribute__((unused)) ++ #else ++ # define UNUSED ++ #endif ++ ++ #if defined(_MSC_VER) ++ # define inline __inline ++ #endif ++ ++ #if !defined(XINCLUDE_H) ++ #define XINCLUDE_H ++ ++ #include ++ #include ++ #include ++ #if !defined(_WIN32) ++ #include ++ #endif ++ #include ++ #include ++ ++ #include "xmacros.h" ++ #include "xdiff.h" ++ #include "xtypes.h" ++ #include "xutils.h" ++ #include "xprepare.h" ++ #include "xdiffi.h" ++ #include "xemit.h" ++ ++ ++ #endif /* #if !defined(XINCLUDE_H) */ +*** ../vim-8.1.0359/src/xdiff/xmacros.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xmacros.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,54 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #if !defined(XMACROS_H) ++ #define XMACROS_H ++ ++ ++ ++ ++ #define XDL_MIN(a, b) ((a) < (b) ? (a): (b)) ++ #define XDL_MAX(a, b) ((a) > (b) ? (a): (b)) ++ #define XDL_ABS(v) ((v) >= 0 ? (v): -(v)) ++ #define XDL_ISDIGIT(c) ((c) >= '0' && (c) <= '9') ++ #define XDL_ISSPACE(c) (isspace((unsigned char)(c))) ++ #define XDL_ADDBITS(v,b) ((v) + ((v) >> (b))) ++ #define XDL_MASKBITS(b) ((1UL << (b)) - 1) ++ #define XDL_HASHLONG(v,b) (XDL_ADDBITS((unsigned long)(v), b) & XDL_MASKBITS(b)) ++ #define XDL_PTRFREE(p) do { if (p) { xdl_free(p); (p) = NULL; } } while (0) ++ #define XDL_LE32_PUT(p, v) \ ++ do { \ ++ unsigned char *__p = (unsigned char *) (p); \ ++ *__p++ = (unsigned char) (v); \ ++ *__p++ = (unsigned char) ((v) >> 8); \ ++ *__p++ = (unsigned char) ((v) >> 16); \ ++ *__p = (unsigned char) ((v) >> 24); \ ++ } while (0) ++ #define XDL_LE32_GET(p, v) \ ++ do { \ ++ unsigned char const *__p = (unsigned char const *) (p); \ ++ (v) = (unsigned long) __p[0] | ((unsigned long) __p[1]) << 8 | \ ++ ((unsigned long) __p[2]) << 16 | ((unsigned long) __p[3]) << 24; \ ++ } while (0) ++ ++ ++ #endif /* #if !defined(XMACROS_H) */ +*** ../vim-8.1.0359/src/xdiff/xpatience.c 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xpatience.c 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,390 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003-2016 Davide Libenzi, Johannes E. Schindelin ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ #include "xinclude.h" ++ #include "xtypes.h" ++ #include "xdiff.h" ++ ++ /* ++ * The basic idea of patience diff is to find lines that are unique in ++ * both files. These are intuitively the ones that we want to see as ++ * common lines. ++ * ++ * The maximal ordered sequence of such line pairs (where ordered means ++ * that the order in the sequence agrees with the order of the lines in ++ * both files) naturally defines an initial set of common lines. ++ * ++ * Now, the algorithm tries to extend the set of common lines by growing ++ * the line ranges where the files have identical lines. ++ * ++ * Between those common lines, the patience diff algorithm is applied ++ * recursively, until no unique line pairs can be found; these line ranges ++ * are handled by the well-known Myers algorithm. ++ */ ++ ++ #define NON_UNIQUE ULONG_MAX ++ ++ /* ++ * This is a hash mapping from line hash to line numbers in the first and ++ * second file. ++ */ ++ struct hashmap { ++ int nr, alloc; ++ struct entry { ++ unsigned long hash; ++ /* ++ * 0 = unused entry, 1 = first line, 2 = second, etc. ++ * line2 is NON_UNIQUE if the line is not unique ++ * in either the first or the second file. ++ */ ++ unsigned long line1, line2; ++ /* ++ * "next" & "previous" are used for the longest common ++ * sequence; ++ * initially, "next" reflects only the order in file1. ++ */ ++ struct entry *next, *previous; ++ ++ /* ++ * If 1, this entry can serve as an anchor. See ++ * Documentation/diff-options.txt for more information. ++ */ ++ unsigned anchor : 1; ++ } *entries, *first, *last; ++ /* were common records found? */ ++ unsigned long has_matches; ++ mmfile_t *file1, *file2; ++ xdfenv_t *env; ++ xpparam_t const *xpp; ++ }; ++ ++ static int is_anchor(xpparam_t const *xpp, const char *line) ++ { ++ size_t i; ++ for (i = 0; i < xpp->anchors_nr; i++) { ++ if (!strncmp(line, xpp->anchors[i], strlen(xpp->anchors[i]))) ++ return 1; ++ } ++ return 0; ++ } ++ ++ /* The argument "pass" is 1 for the first file, 2 for the second. */ ++ static void insert_record(xpparam_t const *xpp, int line, struct hashmap *map, ++ int pass) ++ { ++ xrecord_t **records = pass == 1 ? ++ map->env->xdf1.recs : map->env->xdf2.recs; ++ xrecord_t *record = records[line - 1], *other; ++ /* ++ * After xdl_prepare_env() (or more precisely, due to ++ * xdl_classify_record()), the "ha" member of the records (AKA lines) ++ * is _not_ the hash anymore, but a linearized version of it. In ++ * other words, the "ha" member is guaranteed to start with 0 and ++ * the second record's ha can only be 0 or 1, etc. ++ * ++ * So we multiply ha by 2 in the hope that the hashing was ++ * "unique enough". ++ */ ++ int index = (int)((record->ha << 1) % map->alloc); ++ ++ while (map->entries[index].line1) { ++ other = map->env->xdf1.recs[map->entries[index].line1 - 1]; ++ if (map->entries[index].hash != record->ha || ++ !xdl_recmatch(record->ptr, record->size, ++ other->ptr, other->size, ++ map->xpp->flags)) { ++ if (++index >= map->alloc) ++ index = 0; ++ continue; ++ } ++ if (pass == 2) ++ map->has_matches = 1; ++ if (pass == 1 || map->entries[index].line2) ++ map->entries[index].line2 = NON_UNIQUE; ++ else ++ map->entries[index].line2 = line; ++ return; ++ } ++ if (pass == 2) ++ return; ++ map->entries[index].line1 = line; ++ map->entries[index].hash = record->ha; ++ map->entries[index].anchor = is_anchor(xpp, map->env->xdf1.recs[line - 1]->ptr); ++ if (!map->first) ++ map->first = map->entries + index; ++ if (map->last) { ++ map->last->next = map->entries + index; ++ map->entries[index].previous = map->last; ++ } ++ map->last = map->entries + index; ++ map->nr++; ++ } ++ ++ /* ++ * This function has to be called for each recursion into the inter-hunk ++ * parts, as previously non-unique lines can become unique when being ++ * restricted to a smaller part of the files. ++ * ++ * It is assumed that env has been prepared using xdl_prepare(). ++ */ ++ static int fill_hashmap(mmfile_t *file1, mmfile_t *file2, ++ xpparam_t const *xpp, xdfenv_t *env, ++ struct hashmap *result, ++ int line1, int count1, int line2, int count2) ++ { ++ result->file1 = file1; ++ result->file2 = file2; ++ result->xpp = xpp; ++ result->env = env; ++ ++ /* We know exactly how large we want the hash map */ ++ result->alloc = count1 * 2; ++ result->entries = (struct entry *) ++ xdl_malloc(result->alloc * sizeof(struct entry)); ++ if (!result->entries) ++ return -1; ++ memset(result->entries, 0, result->alloc * sizeof(struct entry)); ++ ++ /* First, fill with entries from the first file */ ++ while (count1--) ++ insert_record(xpp, line1++, result, 1); ++ ++ /* Then search for matches in the second file */ ++ while (count2--) ++ insert_record(xpp, line2++, result, 2); ++ ++ return 0; ++ } ++ ++ /* ++ * Find the longest sequence with a smaller last element (meaning a smaller ++ * line2, as we construct the sequence with entries ordered by line1). ++ */ ++ static int binary_search(struct entry **sequence, int longest, ++ struct entry *entry) ++ { ++ int left = -1, right = longest; ++ ++ while (left + 1 < right) { ++ int middle = left + (right - left) / 2; ++ /* by construction, no two entries can be equal */ ++ if (sequence[middle]->line2 > entry->line2) ++ right = middle; ++ else ++ left = middle; ++ } ++ /* return the index in "sequence", _not_ the sequence length */ ++ return left; ++ } ++ ++ /* ++ * The idea is to start with the list of common unique lines sorted by ++ * the order in file1. For each of these pairs, the longest (partial) ++ * sequence whose last element's line2 is smaller is determined. ++ * ++ * For efficiency, the sequences are kept in a list containing exactly one ++ * item per sequence length: the sequence with the smallest last ++ * element (in terms of line2). ++ */ ++ static struct entry *find_longest_common_sequence(struct hashmap *map) ++ { ++ struct entry **sequence = xdl_malloc(map->nr * sizeof(struct entry *)); ++ int longest = 0, i; ++ struct entry *entry; ++ ++ /* ++ * If not -1, this entry in sequence must never be overridden. ++ * Therefore, overriding entries before this has no effect, so ++ * do not do that either. ++ */ ++ int anchor_i = -1; ++ ++ for (entry = map->first; entry; entry = entry->next) { ++ if (!entry->line2 || entry->line2 == NON_UNIQUE) ++ continue; ++ i = binary_search(sequence, longest, entry); ++ entry->previous = i < 0 ? NULL : sequence[i]; ++ ++i; ++ if (i <= anchor_i) ++ continue; ++ sequence[i] = entry; ++ if (entry->anchor) { ++ anchor_i = i; ++ longest = anchor_i + 1; ++ } else if (i == longest) { ++ longest++; ++ } ++ } ++ ++ /* No common unique lines were found */ ++ if (!longest) { ++ xdl_free(sequence); ++ return NULL; ++ } ++ ++ /* Iterate starting at the last element, adjusting the "next" members */ ++ entry = sequence[longest - 1]; ++ entry->next = NULL; ++ while (entry->previous) { ++ entry->previous->next = entry; ++ entry = entry->previous; ++ } ++ xdl_free(sequence); ++ return entry; ++ } ++ ++ static int match(struct hashmap *map, int line1, int line2) ++ { ++ xrecord_t *record1 = map->env->xdf1.recs[line1 - 1]; ++ xrecord_t *record2 = map->env->xdf2.recs[line2 - 1]; ++ return xdl_recmatch(record1->ptr, record1->size, ++ record2->ptr, record2->size, map->xpp->flags); ++ } ++ ++ static int patience_diff(mmfile_t *file1, mmfile_t *file2, ++ xpparam_t const *xpp, xdfenv_t *env, ++ int line1, int count1, int line2, int count2); ++ ++ static int walk_common_sequence(struct hashmap *map, struct entry *first, ++ int line1, int count1, int line2, int count2) ++ { ++ int end1 = line1 + count1, end2 = line2 + count2; ++ int next1, next2; ++ ++ for (;;) { ++ /* Try to grow the line ranges of common lines */ ++ if (first) { ++ next1 = first->line1; ++ next2 = first->line2; ++ while (next1 > line1 && next2 > line2 && ++ match(map, next1 - 1, next2 - 1)) { ++ next1--; ++ next2--; ++ } ++ } else { ++ next1 = end1; ++ next2 = end2; ++ } ++ while (line1 < next1 && line2 < next2 && ++ match(map, line1, line2)) { ++ line1++; ++ line2++; ++ } ++ ++ /* Recurse */ ++ if (next1 > line1 || next2 > line2) { ++ struct hashmap submap; ++ ++ memset(&submap, 0, sizeof(submap)); ++ if (patience_diff(map->file1, map->file2, ++ map->xpp, map->env, ++ line1, next1 - line1, ++ line2, next2 - line2)) ++ return -1; ++ } ++ ++ if (!first) ++ return 0; ++ ++ while (first->next && ++ first->next->line1 == first->line1 + 1 && ++ first->next->line2 == first->line2 + 1) ++ first = first->next; ++ ++ line1 = first->line1 + 1; ++ line2 = first->line2 + 1; ++ ++ first = first->next; ++ } ++ } ++ ++ static int fall_back_to_classic_diff(struct hashmap *map, ++ int line1, int count1, int line2, int count2) ++ { ++ xpparam_t xpp; ++ xpp.flags = map->xpp->flags & ~XDF_DIFF_ALGORITHM_MASK; ++ ++ return xdl_fall_back_diff(map->env, &xpp, ++ line1, count1, line2, count2); ++ } ++ ++ /* ++ * Recursively find the longest common sequence of unique lines, ++ * and if none was found, ask xdl_do_diff() to do the job. ++ * ++ * This function assumes that env was prepared with xdl_prepare_env(). ++ */ ++ static int patience_diff(mmfile_t *file1, mmfile_t *file2, ++ xpparam_t const *xpp, xdfenv_t *env, ++ int line1, int count1, int line2, int count2) ++ { ++ struct hashmap map; ++ struct entry *first; ++ int result = 0; ++ ++ /* trivial case: one side is empty */ ++ if (!count1) { ++ while(count2--) ++ env->xdf2.rchg[line2++ - 1] = 1; ++ return 0; ++ } else if (!count2) { ++ while(count1--) ++ env->xdf1.rchg[line1++ - 1] = 1; ++ return 0; ++ } ++ ++ memset(&map, 0, sizeof(map)); ++ if (fill_hashmap(file1, file2, xpp, env, &map, ++ line1, count1, line2, count2)) ++ return -1; ++ ++ /* are there any matching lines at all? */ ++ if (!map.has_matches) { ++ while(count1--) ++ env->xdf1.rchg[line1++ - 1] = 1; ++ while(count2--) ++ env->xdf2.rchg[line2++ - 1] = 1; ++ xdl_free(map.entries); ++ return 0; ++ } ++ ++ first = find_longest_common_sequence(&map); ++ if (first) ++ result = walk_common_sequence(&map, first, ++ line1, count1, line2, count2); ++ else ++ result = fall_back_to_classic_diff(&map, ++ line1, count1, line2, count2); ++ ++ xdl_free(map.entries); ++ return result; ++ } ++ ++ int xdl_do_patience_diff(mmfile_t *file1, mmfile_t *file2, ++ xpparam_t const *xpp, xdfenv_t *env) ++ { ++ if (xdl_prepare_env(file1, file2, xpp, env) < 0) ++ return -1; ++ ++ /* environment is cleaned up in xdl_diff() */ ++ return patience_diff(file1, file2, xpp, env, ++ 1, env->xdf1.nrec, 1, env->xdf2.nrec); ++ } +*** ../vim-8.1.0359/src/xdiff/xprepare.c 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xprepare.c 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,483 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #include "xinclude.h" ++ ++ ++ #define XDL_KPDIS_RUN 4 ++ #define XDL_MAX_EQLIMIT 1024 ++ #define XDL_SIMSCAN_WINDOW 100 ++ #define XDL_GUESS_NLINES1 256 ++ #define XDL_GUESS_NLINES2 20 ++ ++ ++ typedef struct s_xdlclass { ++ struct s_xdlclass *next; ++ unsigned long ha; ++ char const *line; ++ long size; ++ long idx; ++ long len1, len2; ++ } xdlclass_t; ++ ++ typedef struct s_xdlclassifier { ++ unsigned int hbits; ++ long hsize; ++ xdlclass_t **rchash; ++ chastore_t ncha; ++ xdlclass_t **rcrecs; ++ long alloc; ++ long count; ++ long flags; ++ } xdlclassifier_t; ++ ++ ++ ++ ++ static int xdl_init_classifier(xdlclassifier_t *cf, long size, long flags); ++ static void xdl_free_classifier(xdlclassifier_t *cf); ++ static int xdl_classify_record(unsigned int pass, xdlclassifier_t *cf, xrecord_t **rhash, ++ unsigned int hbits, xrecord_t *rec); ++ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_t const *xpp, ++ xdlclassifier_t *cf, xdfile_t *xdf); ++ static void xdl_free_ctx(xdfile_t *xdf); ++ static int xdl_clean_mmatch(char const *dis, long i, long s, long e); ++ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2); ++ static int xdl_trim_ends(xdfile_t *xdf1, xdfile_t *xdf2); ++ static int xdl_optimize_ctxs(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2); ++ ++ ++ ++ ++ static int xdl_init_classifier(xdlclassifier_t *cf, long size, long flags) { ++ cf->flags = flags; ++ ++ cf->hbits = xdl_hashbits((unsigned int) size); ++ cf->hsize = 1 << cf->hbits; ++ ++ if (xdl_cha_init(&cf->ncha, sizeof(xdlclass_t), size / 4 + 1) < 0) { ++ ++ return -1; ++ } ++ if (!(cf->rchash = (xdlclass_t **) xdl_malloc(cf->hsize * sizeof(xdlclass_t *)))) { ++ ++ xdl_cha_free(&cf->ncha); ++ return -1; ++ } ++ memset(cf->rchash, 0, cf->hsize * sizeof(xdlclass_t *)); ++ ++ cf->alloc = size; ++ if (!(cf->rcrecs = (xdlclass_t **) xdl_malloc(cf->alloc * sizeof(xdlclass_t *)))) { ++ ++ xdl_free(cf->rchash); ++ xdl_cha_free(&cf->ncha); ++ return -1; ++ } ++ ++ cf->count = 0; ++ ++ return 0; ++ } ++ ++ ++ static void xdl_free_classifier(xdlclassifier_t *cf) { ++ ++ xdl_free(cf->rcrecs); ++ xdl_free(cf->rchash); ++ xdl_cha_free(&cf->ncha); ++ } ++ ++ ++ static int xdl_classify_record(unsigned int pass, xdlclassifier_t *cf, xrecord_t **rhash, ++ unsigned int hbits, xrecord_t *rec) { ++ long hi; ++ char const *line; ++ xdlclass_t *rcrec; ++ xdlclass_t **rcrecs; ++ ++ line = rec->ptr; ++ hi = (long) XDL_HASHLONG(rec->ha, cf->hbits); ++ for (rcrec = cf->rchash[hi]; rcrec; rcrec = rcrec->next) ++ if (rcrec->ha == rec->ha && ++ xdl_recmatch(rcrec->line, rcrec->size, ++ rec->ptr, rec->size, cf->flags)) ++ break; ++ ++ if (!rcrec) { ++ if (!(rcrec = xdl_cha_alloc(&cf->ncha))) { ++ ++ return -1; ++ } ++ rcrec->idx = cf->count++; ++ if (cf->count > cf->alloc) { ++ cf->alloc *= 2; ++ if (!(rcrecs = (xdlclass_t **) xdl_realloc(cf->rcrecs, cf->alloc * sizeof(xdlclass_t *)))) { ++ ++ return -1; ++ } ++ cf->rcrecs = rcrecs; ++ } ++ cf->rcrecs[rcrec->idx] = rcrec; ++ rcrec->line = line; ++ rcrec->size = rec->size; ++ rcrec->ha = rec->ha; ++ rcrec->len1 = rcrec->len2 = 0; ++ rcrec->next = cf->rchash[hi]; ++ cf->rchash[hi] = rcrec; ++ } ++ ++ (pass == 1) ? rcrec->len1++ : rcrec->len2++; ++ ++ rec->ha = (unsigned long) rcrec->idx; ++ ++ hi = (long) XDL_HASHLONG(rec->ha, hbits); ++ rec->next = rhash[hi]; ++ rhash[hi] = rec; ++ ++ return 0; ++ } ++ ++ ++ static int xdl_prepare_ctx(unsigned int pass, mmfile_t *mf, long narec, xpparam_t const *xpp, ++ xdlclassifier_t *cf, xdfile_t *xdf) { ++ unsigned int hbits; ++ long nrec, hsize, bsize; ++ unsigned long hav; ++ char const *blk, *cur, *top, *prev; ++ xrecord_t *crec; ++ xrecord_t **recs, **rrecs; ++ xrecord_t **rhash; ++ unsigned long *ha; ++ char *rchg; ++ long *rindex; ++ ++ ha = NULL; ++ rindex = NULL; ++ rchg = NULL; ++ rhash = NULL; ++ recs = NULL; ++ ++ if (xdl_cha_init(&xdf->rcha, sizeof(xrecord_t), narec / 4 + 1) < 0) ++ goto abort; ++ if (!(recs = (xrecord_t **) xdl_malloc(narec * sizeof(xrecord_t *)))) ++ goto abort; ++ ++ if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF) ++ hbits = hsize = 0; ++ else { ++ hbits = xdl_hashbits((unsigned int) narec); ++ hsize = 1 << hbits; ++ if (!(rhash = (xrecord_t **) xdl_malloc(hsize * sizeof(xrecord_t *)))) ++ goto abort; ++ memset(rhash, 0, hsize * sizeof(xrecord_t *)); ++ } ++ ++ nrec = 0; ++ if ((cur = blk = xdl_mmfile_first(mf, &bsize)) != NULL) { ++ for (top = blk + bsize; cur < top; ) { ++ prev = cur; ++ hav = xdl_hash_record(&cur, top, xpp->flags); ++ if (nrec >= narec) { ++ narec *= 2; ++ if (!(rrecs = (xrecord_t **) xdl_realloc(recs, narec * sizeof(xrecord_t *)))) ++ goto abort; ++ recs = rrecs; ++ } ++ if (!(crec = xdl_cha_alloc(&xdf->rcha))) ++ goto abort; ++ crec->ptr = prev; ++ crec->size = (long) (cur - prev); ++ crec->ha = hav; ++ recs[nrec++] = crec; ++ ++ if ((XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF) && ++ xdl_classify_record(pass, cf, rhash, hbits, crec) < 0) ++ goto abort; ++ } ++ } ++ ++ if (!(rchg = (char *) xdl_malloc((nrec + 2) * sizeof(char)))) ++ goto abort; ++ memset(rchg, 0, (nrec + 2) * sizeof(char)); ++ ++ if (!(rindex = (long *) xdl_malloc((nrec + 1) * sizeof(long)))) ++ goto abort; ++ if (!(ha = (unsigned long *) xdl_malloc((nrec + 1) * sizeof(unsigned long)))) ++ goto abort; ++ ++ xdf->nrec = nrec; ++ xdf->recs = recs; ++ xdf->hbits = hbits; ++ xdf->rhash = rhash; ++ xdf->rchg = rchg + 1; ++ xdf->rindex = rindex; ++ xdf->nreff = 0; ++ xdf->ha = ha; ++ xdf->dstart = 0; ++ xdf->dend = nrec - 1; ++ ++ return 0; ++ ++ abort: ++ xdl_free(ha); ++ xdl_free(rindex); ++ xdl_free(rchg); ++ xdl_free(rhash); ++ xdl_free(recs); ++ xdl_cha_free(&xdf->rcha); ++ return -1; ++ } ++ ++ ++ static void xdl_free_ctx(xdfile_t *xdf) { ++ ++ xdl_free(xdf->rhash); ++ xdl_free(xdf->rindex); ++ xdl_free(xdf->rchg - 1); ++ xdl_free(xdf->ha); ++ xdl_free(xdf->recs); ++ xdl_cha_free(&xdf->rcha); ++ } ++ ++ ++ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdfenv_t *xe) { ++ long enl1, enl2, sample; ++ xdlclassifier_t cf; ++ ++ memset(&cf, 0, sizeof(cf)); ++ ++ /* ++ * For histogram diff, we can afford a smaller sample size and ++ * thus a poorer estimate of the number of lines, as the hash ++ * table (rhash) won't be filled up/grown. The number of lines ++ * (nrecs) will be updated correctly anyway by ++ * xdl_prepare_ctx(). ++ */ ++ sample = (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF ++ ? XDL_GUESS_NLINES2 : XDL_GUESS_NLINES1); ++ ++ enl1 = xdl_guess_lines(mf1, sample) + 1; ++ enl2 = xdl_guess_lines(mf2, sample) + 1; ++ ++ if (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF && ++ xdl_init_classifier(&cf, enl1 + enl2 + 1, xpp->flags) < 0) ++ return -1; ++ ++ if (xdl_prepare_ctx(1, mf1, enl1, xpp, &cf, &xe->xdf1) < 0) { ++ ++ xdl_free_classifier(&cf); ++ return -1; ++ } ++ if (xdl_prepare_ctx(2, mf2, enl2, xpp, &cf, &xe->xdf2) < 0) { ++ ++ xdl_free_ctx(&xe->xdf1); ++ xdl_free_classifier(&cf); ++ return -1; ++ } ++ ++ if ((XDF_DIFF_ALG(xpp->flags) != XDF_PATIENCE_DIFF) && ++ (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF) && ++ xdl_optimize_ctxs(&cf, &xe->xdf1, &xe->xdf2) < 0) { ++ ++ xdl_free_ctx(&xe->xdf2); ++ xdl_free_ctx(&xe->xdf1); ++ xdl_free_classifier(&cf); ++ return -1; ++ } ++ ++ if (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF) ++ xdl_free_classifier(&cf); ++ ++ return 0; ++ } ++ ++ ++ void xdl_free_env(xdfenv_t *xe) { ++ ++ xdl_free_ctx(&xe->xdf2); ++ xdl_free_ctx(&xe->xdf1); ++ } ++ ++ ++ static int xdl_clean_mmatch(char const *dis, long i, long s, long e) { ++ long r, rdis0, rpdis0, rdis1, rpdis1; ++ ++ /* ++ * Limits the window the is examined during the similar-lines ++ * scan. The loops below stops when dis[i - r] == 1 (line that ++ * has no match), but there are corner cases where the loop ++ * proceed all the way to the extremities by causing huge ++ * performance penalties in case of big files. ++ */ ++ if (i - s > XDL_SIMSCAN_WINDOW) ++ s = i - XDL_SIMSCAN_WINDOW; ++ if (e - i > XDL_SIMSCAN_WINDOW) ++ e = i + XDL_SIMSCAN_WINDOW; ++ ++ /* ++ * Scans the lines before 'i' to find a run of lines that either ++ * have no match (dis[j] == 0) or have multiple matches (dis[j] > 1). ++ * Note that we always call this function with dis[i] > 1, so the ++ * current line (i) is already a multimatch line. ++ */ ++ for (r = 1, rdis0 = 0, rpdis0 = 1; (i - r) >= s; r++) { ++ if (!dis[i - r]) ++ rdis0++; ++ else if (dis[i - r] == 2) ++ rpdis0++; ++ else ++ break; ++ } ++ /* ++ * If the run before the line 'i' found only multimatch lines, we ++ * return 0 and hence we don't make the current line (i) discarded. ++ * We want to discard multimatch lines only when they appear in the ++ * middle of runs with nomatch lines (dis[j] == 0). ++ */ ++ if (rdis0 == 0) ++ return 0; ++ for (r = 1, rdis1 = 0, rpdis1 = 1; (i + r) <= e; r++) { ++ if (!dis[i + r]) ++ rdis1++; ++ else if (dis[i + r] == 2) ++ rpdis1++; ++ else ++ break; ++ } ++ /* ++ * If the run after the line 'i' found only multimatch lines, we ++ * return 0 and hence we don't make the current line (i) discarded. ++ */ ++ if (rdis1 == 0) ++ return 0; ++ rdis1 += rdis0; ++ rpdis1 += rpdis0; ++ ++ return rpdis1 * XDL_KPDIS_RUN < (rpdis1 + rdis1); ++ } ++ ++ ++ /* ++ * Try to reduce the problem complexity, discard records that have no ++ * matches on the other file. Also, lines that have multiple matches ++ * might be potentially discarded if they happear in a run of discardable. ++ */ ++ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2) { ++ long i, nm, nreff, mlim; ++ xrecord_t **recs; ++ xdlclass_t *rcrec; ++ char *dis, *dis1, *dis2; ++ ++ if (!(dis = (char *) xdl_malloc(xdf1->nrec + xdf2->nrec + 2))) { ++ ++ return -1; ++ } ++ memset(dis, 0, xdf1->nrec + xdf2->nrec + 2); ++ dis1 = dis; ++ dis2 = dis1 + xdf1->nrec + 1; ++ ++ if ((mlim = xdl_bogosqrt(xdf1->nrec)) > XDL_MAX_EQLIMIT) ++ mlim = XDL_MAX_EQLIMIT; ++ for (i = xdf1->dstart, recs = &xdf1->recs[xdf1->dstart]; i <= xdf1->dend; i++, recs++) { ++ rcrec = cf->rcrecs[(*recs)->ha]; ++ nm = rcrec ? rcrec->len2 : 0; ++ dis1[i] = (nm == 0) ? 0: (nm >= mlim) ? 2: 1; ++ } ++ ++ if ((mlim = xdl_bogosqrt(xdf2->nrec)) > XDL_MAX_EQLIMIT) ++ mlim = XDL_MAX_EQLIMIT; ++ for (i = xdf2->dstart, recs = &xdf2->recs[xdf2->dstart]; i <= xdf2->dend; i++, recs++) { ++ rcrec = cf->rcrecs[(*recs)->ha]; ++ nm = rcrec ? rcrec->len1 : 0; ++ dis2[i] = (nm == 0) ? 0: (nm >= mlim) ? 2: 1; ++ } ++ ++ for (nreff = 0, i = xdf1->dstart, recs = &xdf1->recs[xdf1->dstart]; ++ i <= xdf1->dend; i++, recs++) { ++ if (dis1[i] == 1 || ++ (dis1[i] == 2 && !xdl_clean_mmatch(dis1, i, xdf1->dstart, xdf1->dend))) { ++ xdf1->rindex[nreff] = i; ++ xdf1->ha[nreff] = (*recs)->ha; ++ nreff++; ++ } else ++ xdf1->rchg[i] = 1; ++ } ++ xdf1->nreff = nreff; ++ ++ for (nreff = 0, i = xdf2->dstart, recs = &xdf2->recs[xdf2->dstart]; ++ i <= xdf2->dend; i++, recs++) { ++ if (dis2[i] == 1 || ++ (dis2[i] == 2 && !xdl_clean_mmatch(dis2, i, xdf2->dstart, xdf2->dend))) { ++ xdf2->rindex[nreff] = i; ++ xdf2->ha[nreff] = (*recs)->ha; ++ nreff++; ++ } else ++ xdf2->rchg[i] = 1; ++ } ++ xdf2->nreff = nreff; ++ ++ xdl_free(dis); ++ ++ return 0; ++ } ++ ++ ++ /* ++ * Early trim initial and terminal matching records. ++ */ ++ static int xdl_trim_ends(xdfile_t *xdf1, xdfile_t *xdf2) { ++ long i, lim; ++ xrecord_t **recs1, **recs2; ++ ++ recs1 = xdf1->recs; ++ recs2 = xdf2->recs; ++ for (i = 0, lim = XDL_MIN(xdf1->nrec, xdf2->nrec); i < lim; ++ i++, recs1++, recs2++) ++ if ((*recs1)->ha != (*recs2)->ha) ++ break; ++ ++ xdf1->dstart = xdf2->dstart = i; ++ ++ recs1 = xdf1->recs + xdf1->nrec - 1; ++ recs2 = xdf2->recs + xdf2->nrec - 1; ++ for (lim -= i, i = 0; i < lim; i++, recs1--, recs2--) ++ if ((*recs1)->ha != (*recs2)->ha) ++ break; ++ ++ xdf1->dend = xdf1->nrec - i - 1; ++ xdf2->dend = xdf2->nrec - i - 1; ++ ++ return 0; ++ } ++ ++ ++ static int xdl_optimize_ctxs(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2) { ++ ++ if (xdl_trim_ends(xdf1, xdf2) < 0 || ++ xdl_cleanup_records(cf, xdf1, xdf2) < 0) { ++ ++ return -1; ++ } ++ ++ return 0; ++ } +*** ../vim-8.1.0359/src/xdiff/xprepare.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xprepare.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,34 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #if !defined(XPREPARE_H) ++ #define XPREPARE_H ++ ++ ++ ++ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, ++ xdfenv_t *xe); ++ void xdl_free_env(xdfenv_t *xe); ++ ++ ++ ++ #endif /* #if !defined(XPREPARE_H) */ +*** ../vim-8.1.0359/src/xdiff/xtypes.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xtypes.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,67 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #if !defined(XTYPES_H) ++ #define XTYPES_H ++ ++ ++ ++ typedef struct s_chanode { ++ struct s_chanode *next; ++ long icurr; ++ } chanode_t; ++ ++ typedef struct s_chastore { ++ chanode_t *head, *tail; ++ long isize, nsize; ++ chanode_t *ancur; ++ chanode_t *sncur; ++ long scurr; ++ } chastore_t; ++ ++ typedef struct s_xrecord { ++ struct s_xrecord *next; ++ char const *ptr; ++ long size; ++ unsigned long ha; ++ } xrecord_t; ++ ++ typedef struct s_xdfile { ++ chastore_t rcha; ++ long nrec; ++ unsigned int hbits; ++ xrecord_t **rhash; ++ long dstart, dend; ++ xrecord_t **recs; ++ char *rchg; ++ long *rindex; ++ long nreff; ++ unsigned long *ha; ++ } xdfile_t; ++ ++ typedef struct s_xdfenv { ++ xdfile_t xdf1, xdf2; ++ } xdfenv_t; ++ ++ ++ ++ #endif /* #if !defined(XTYPES_H) */ +*** ../vim-8.1.0359/src/xdiff/xutils.c 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xutils.c 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,425 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #include ++ #include ++ #include "xinclude.h" ++ ++ ++ ++ ++ long xdl_bogosqrt(long n) { ++ long i; ++ ++ /* ++ * Classical integer square root approximation using shifts. ++ */ ++ for (i = 1; n > 0; n >>= 2) ++ i <<= 1; ++ ++ return i; ++ } ++ ++ ++ int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize, ++ xdemitcb_t *ecb) { ++ int i = 2; ++ mmbuffer_t mb[3]; ++ ++ mb[0].ptr = (char *) pre; ++ mb[0].size = psize; ++ mb[1].ptr = (char *) rec; ++ mb[1].size = size; ++ if (size > 0 && rec[size - 1] != '\n') { ++ mb[2].ptr = (char *) "\n\\ No newline at end of file\n"; ++ mb[2].size = strlen(mb[2].ptr); ++ i++; ++ } ++ if (ecb->outf(ecb->priv, mb, i) < 0) { ++ ++ return -1; ++ } ++ ++ return 0; ++ } ++ ++ void *xdl_mmfile_first(mmfile_t *mmf, long *size) ++ { ++ *size = mmf->size; ++ return mmf->ptr; ++ } ++ ++ ++ long xdl_mmfile_size(mmfile_t *mmf) ++ { ++ return mmf->size; ++ } ++ ++ ++ int xdl_cha_init(chastore_t *cha, long isize, long icount) { ++ ++ cha->head = cha->tail = NULL; ++ cha->isize = isize; ++ cha->nsize = icount * isize; ++ cha->ancur = cha->sncur = NULL; ++ cha->scurr = 0; ++ ++ return 0; ++ } ++ ++ ++ void xdl_cha_free(chastore_t *cha) { ++ chanode_t *cur, *tmp; ++ ++ for (cur = cha->head; (tmp = cur) != NULL;) { ++ cur = cur->next; ++ xdl_free(tmp); ++ } ++ } ++ ++ ++ void *xdl_cha_alloc(chastore_t *cha) { ++ chanode_t *ancur; ++ void *data; ++ ++ if (!(ancur = cha->ancur) || ancur->icurr == cha->nsize) { ++ if (!(ancur = (chanode_t *) xdl_malloc(sizeof(chanode_t) + cha->nsize))) { ++ ++ return NULL; ++ } ++ ancur->icurr = 0; ++ ancur->next = NULL; ++ if (cha->tail) ++ cha->tail->next = ancur; ++ if (!cha->head) ++ cha->head = ancur; ++ cha->tail = ancur; ++ cha->ancur = ancur; ++ } ++ ++ data = (char *) ancur + sizeof(chanode_t) + ancur->icurr; ++ ancur->icurr += cha->isize; ++ ++ return data; ++ } ++ ++ long xdl_guess_lines(mmfile_t *mf, long sample) { ++ long nl = 0, size, tsize = 0; ++ char const *data, *cur, *top; ++ ++ if ((cur = data = xdl_mmfile_first(mf, &size)) != NULL) { ++ for (top = data + size; nl < sample && cur < top; ) { ++ nl++; ++ if (!(cur = memchr(cur, '\n', top - cur))) ++ cur = top; ++ else ++ cur++; ++ } ++ tsize += (long) (cur - data); ++ } ++ ++ if (nl && tsize) ++ nl = xdl_mmfile_size(mf) / (tsize / nl); ++ ++ return nl + 1; ++ } ++ ++ int xdl_blankline(const char *line, long size, long flags) ++ { ++ long i; ++ ++ if (!(flags & XDF_WHITESPACE_FLAGS)) ++ return (size <= 1); ++ ++ for (i = 0; i < size && XDL_ISSPACE(line[i]); i++) ++ ; ++ ++ return (i == size); ++ } ++ ++ /* ++ * Have we eaten everything on the line, except for an optional ++ * CR at the very end? ++ */ ++ static int ends_with_optional_cr(const char *l, long s, long i) ++ { ++ int complete = s && l[s-1] == '\n'; ++ ++ if (complete) ++ s--; ++ if (s == i) ++ return 1; ++ /* do not ignore CR at the end of an incomplete line */ ++ if (complete && s == i + 1 && l[i] == '\r') ++ return 1; ++ return 0; ++ } ++ ++ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags) ++ { ++ int i1, i2; ++ ++ if (s1 == s2 && !memcmp(l1, l2, s1)) ++ return 1; ++ if (!(flags & XDF_WHITESPACE_FLAGS)) ++ return 0; ++ ++ i1 = 0; ++ i2 = 0; ++ ++ /* ++ * -w matches everything that matches with -b, and -b in turn ++ * matches everything that matches with --ignore-space-at-eol, ++ * which in turn matches everything that matches with --ignore-cr-at-eol. ++ * ++ * Each flavor of ignoring needs different logic to skip whitespaces ++ * while we have both sides to compare. ++ */ ++ if (flags & XDF_IGNORE_WHITESPACE) { ++ goto skip_ws; ++ while (i1 < s1 && i2 < s2) { ++ if (l1[i1++] != l2[i2++]) ++ return 0; ++ skip_ws: ++ while (i1 < s1 && XDL_ISSPACE(l1[i1])) ++ i1++; ++ while (i2 < s2 && XDL_ISSPACE(l2[i2])) ++ i2++; ++ } ++ } else if (flags & XDF_IGNORE_WHITESPACE_CHANGE) { ++ while (i1 < s1 && i2 < s2) { ++ if (XDL_ISSPACE(l1[i1]) && XDL_ISSPACE(l2[i2])) { ++ /* Skip matching spaces and try again */ ++ while (i1 < s1 && XDL_ISSPACE(l1[i1])) ++ i1++; ++ while (i2 < s2 && XDL_ISSPACE(l2[i2])) ++ i2++; ++ continue; ++ } ++ if (l1[i1++] != l2[i2++]) ++ return 0; ++ } ++ } else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL) { ++ while (i1 < s1 && i2 < s2 && l1[i1] == l2[i2]) { ++ i1++; ++ i2++; ++ } ++ } else if (flags & XDF_IGNORE_CR_AT_EOL) { ++ /* Find the first difference and see how the line ends */ ++ while (i1 < s1 && i2 < s2 && l1[i1] == l2[i2]) { ++ i1++; ++ i2++; ++ } ++ return (ends_with_optional_cr(l1, s1, i1) && ++ ends_with_optional_cr(l2, s2, i2)); ++ } ++ ++ /* ++ * After running out of one side, the remaining side must have ++ * nothing but whitespace for the lines to match. Note that ++ * ignore-whitespace-at-eol case may break out of the loop ++ * while there still are characters remaining on both lines. ++ */ ++ if (i1 < s1) { ++ while (i1 < s1 && XDL_ISSPACE(l1[i1])) ++ i1++; ++ if (s1 != i1) ++ return 0; ++ } ++ if (i2 < s2) { ++ while (i2 < s2 && XDL_ISSPACE(l2[i2])) ++ i2++; ++ return (s2 == i2); ++ } ++ return 1; ++ } ++ ++ static unsigned long xdl_hash_record_with_whitespace(char const **data, ++ char const *top, long flags) { ++ unsigned long ha = 5381; ++ char const *ptr = *data; ++ int cr_at_eol_only = (flags & XDF_WHITESPACE_FLAGS) == XDF_IGNORE_CR_AT_EOL; ++ ++ for (; ptr < top && *ptr != '\n'; ptr++) { ++ if (cr_at_eol_only) { ++ /* do not ignore CR at the end of an incomplete line */ ++ if (*ptr == '\r' && ++ (ptr + 1 < top && ptr[1] == '\n')) ++ continue; ++ } ++ else if (XDL_ISSPACE(*ptr)) { ++ const char *ptr2 = ptr; ++ int at_eol; ++ while (ptr + 1 < top && XDL_ISSPACE(ptr[1]) ++ && ptr[1] != '\n') ++ ptr++; ++ at_eol = (top <= ptr + 1 || ptr[1] == '\n'); ++ if (flags & XDF_IGNORE_WHITESPACE) ++ ; /* already handled */ ++ else if (flags & XDF_IGNORE_WHITESPACE_CHANGE ++ && !at_eol) { ++ ha += (ha << 5); ++ ha ^= (unsigned long) ' '; ++ } ++ else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL ++ && !at_eol) { ++ while (ptr2 != ptr + 1) { ++ ha += (ha << 5); ++ ha ^= (unsigned long) *ptr2; ++ ptr2++; ++ } ++ } ++ continue; ++ } ++ ha += (ha << 5); ++ ha ^= (unsigned long) *ptr; ++ } ++ *data = ptr < top ? ptr + 1: ptr; ++ ++ return ha; ++ } ++ ++ unsigned long xdl_hash_record(char const **data, char const *top, long flags) { ++ unsigned long ha = 5381; ++ char const *ptr = *data; ++ ++ if (flags & XDF_WHITESPACE_FLAGS) ++ return xdl_hash_record_with_whitespace(data, top, flags); ++ ++ for (; ptr < top && *ptr != '\n'; ptr++) { ++ ha += (ha << 5); ++ ha ^= (unsigned long) *ptr; ++ } ++ *data = ptr < top ? ptr + 1: ptr; ++ ++ return ha; ++ } ++ ++ unsigned int xdl_hashbits(unsigned int size) { ++ unsigned int val = 1, bits = 0; ++ ++ for (; val < size && bits < CHAR_BIT * sizeof(unsigned int); val <<= 1, bits++); ++ return bits ? bits: 1; ++ } ++ ++ ++ int xdl_num_out(char *out, long val) { ++ char *ptr, *str = out; ++ char buf[32]; ++ ++ ptr = buf + sizeof(buf) - 1; ++ *ptr = '\0'; ++ if (val < 0) { ++ *--ptr = '-'; ++ val = -val; ++ } ++ for (; val && ptr > buf; val /= 10) ++ *--ptr = "0123456789"[val % 10]; ++ if (*ptr) ++ for (; *ptr; ptr++, str++) ++ *str = *ptr; ++ else ++ *str++ = '0'; ++ *str = '\0'; ++ ++ return str - out; ++ } ++ ++ int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2, ++ const char *func, long funclen, xdemitcb_t *ecb) { ++ int nb = 0; ++ mmbuffer_t mb; ++ char buf[128]; ++ ++ memcpy(buf, "@@ -", 4); ++ nb += 4; ++ ++ nb += xdl_num_out(buf + nb, c1 ? s1: s1 - 1); ++ ++ if (c1 != 1) { ++ memcpy(buf + nb, ",", 1); ++ nb += 1; ++ ++ nb += xdl_num_out(buf + nb, c1); ++ } ++ ++ memcpy(buf + nb, " +", 2); ++ nb += 2; ++ ++ nb += xdl_num_out(buf + nb, c2 ? s2: s2 - 1); ++ ++ if (c2 != 1) { ++ memcpy(buf + nb, ",", 1); ++ nb += 1; ++ ++ nb += xdl_num_out(buf + nb, c2); ++ } ++ ++ memcpy(buf + nb, " @@", 3); ++ nb += 3; ++ if (func && funclen) { ++ buf[nb++] = ' '; ++ if (funclen > (long)sizeof(buf) - nb - 1) ++ funclen = sizeof(buf) - nb - 1; ++ memcpy(buf + nb, func, funclen); ++ nb += funclen; ++ } ++ buf[nb++] = '\n'; ++ ++ mb.ptr = buf; ++ mb.size = nb; ++ if (ecb->outf(ecb->priv, &mb, 1) < 0) ++ return -1; ++ ++ return 0; ++ } ++ ++ int xdl_fall_back_diff(xdfenv_t *diff_env, xpparam_t const *xpp, ++ int line1, int count1, int line2, int count2) ++ { ++ /* ++ * This probably does not work outside Git, since ++ * we have a very simple mmfile structure. ++ * ++ * Note: ideally, we would reuse the prepared environment, but ++ * the libxdiff interface does not (yet) allow for diffing only ++ * ranges of lines instead of the whole files. ++ */ ++ mmfile_t subfile1, subfile2; ++ xdfenv_t env; ++ ++ subfile1.ptr = (char *)diff_env->xdf1.recs[line1 - 1]->ptr; ++ subfile1.size = diff_env->xdf1.recs[line1 + count1 - 2]->ptr + ++ diff_env->xdf1.recs[line1 + count1 - 2]->size - subfile1.ptr; ++ subfile2.ptr = (char *)diff_env->xdf2.recs[line2 - 1]->ptr; ++ subfile2.size = diff_env->xdf2.recs[line2 + count2 - 2]->ptr + ++ diff_env->xdf2.recs[line2 + count2 - 2]->size - subfile2.ptr; ++ if (xdl_do_diff(&subfile1, &subfile2, xpp, &env) < 0) ++ return -1; ++ ++ memcpy(diff_env->xdf1.rchg + line1 - 1, env.xdf1.rchg, count1); ++ memcpy(diff_env->xdf2.rchg + line2 - 1, env.xdf2.rchg, count2); ++ ++ xdl_free_env(&env); ++ ++ return 0; ++ } +*** ../vim-8.1.0359/src/xdiff/xutils.h 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/xutils.h 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,47 ---- ++ /* ++ * LibXDiff by Davide Libenzi ( File Differential Library ) ++ * Copyright (C) 2003 Davide Libenzi ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, see ++ * . ++ * ++ * Davide Libenzi ++ * ++ */ ++ ++ #if !defined(XUTILS_H) ++ #define XUTILS_H ++ ++ ++ ++ long xdl_bogosqrt(long n); ++ int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize, ++ xdemitcb_t *ecb); ++ int xdl_cha_init(chastore_t *cha, long isize, long icount); ++ void xdl_cha_free(chastore_t *cha); ++ void *xdl_cha_alloc(chastore_t *cha); ++ long xdl_guess_lines(mmfile_t *mf, long sample); ++ int xdl_blankline(const char *line, long size, long flags); ++ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags); ++ unsigned long xdl_hash_record(char const **data, char const *top, long flags); ++ unsigned int xdl_hashbits(unsigned int size); ++ int xdl_num_out(char *out, long val); ++ int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2, ++ const char *func, long funclen, xdemitcb_t *ecb); ++ int xdl_fall_back_diff(xdfenv_t *diff_env, xpparam_t const *xpp, ++ int line1, int count1, int line2, int count2); ++ ++ ++ ++ #endif /* #if !defined(XUTILS_H) */ +*** ../vim-8.1.0359/src/xdiff/README.txt 1970-01-01 01:00:00.000000000 +0100 +--- src/xdiff/README.txt 2018-09-10 17:39:20.324083781 +0200 +*************** +*** 0 **** +--- 1,14 ---- ++ The files in this directory come from the xdiff implementation in git. ++ You can find it here: https://github.com/git/git/tree/master/xdiff ++ The files were last updated 2018 September 10. ++ ++ This is originally based on libxdiff, which can be found here: ++ http://www.xmailserver.org/xdiff-lib.html ++ ++ The git version was used because it has been maintained and improved. ++ And since it's part of git it is expected to be reliable. ++ ++ The code is distributed under the GNU LGPL license. It is included in the ++ COPYING file. ++ ++ The first work for including xdiff in Vim was done by Christian Brabandt. +*** ../vim-8.1.0359/src/version.c 2018-09-09 22:02:21.165859748 +0200 +--- src/version.c 2018-09-10 17:23:11.443756983 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 360, + /**/ + +-- +'Well, here's something to occupy you and keep your mind off things.' +'It won't work, I have an exceptionally large mind.' + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0361 b/data/vim/patches/8.1.0361 new file mode 100644 index 000000000..749364d12 --- /dev/null +++ b/data/vim/patches/8.1.0361 @@ -0,0 +1,172 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0361 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0361 +Problem: Remote user not used for completion. (Stucki) +Solution: Use $USER too. (Dominique Pelle, closes #3407) +Files: src/misc1.c + + +*** ../vim-8.1.0360/src/misc1.c 2018-08-26 21:23:03.400383307 +0200 +--- src/misc1.c 2018-09-10 18:53:46.863908096 +0200 +*************** +*** 4717,4722 **** +--- 4717,4741 ---- + } + + /* ++ * Add a user name to the list of users in ga_users. ++ * Do nothing if user name is NULL or empty. ++ */ ++ static void ++ add_user(char_u *user, int need_copy) ++ { ++ char_u *user_copy = (user != NULL && need_copy) ++ ? vim_strsave(user) : user; ++ ++ if (user_copy == NULL || *user_copy == NUL || ga_grow(&ga_users, 1) == FAIL) ++ { ++ if (need_copy) ++ vim_free(user); ++ return; ++ } ++ ((char_u **)(ga_users.ga_data))[ga_users.ga_len++] = user_copy; ++ } ++ ++ /* + * Find all user names for user completion. + * Done only once and then cached. + */ +*************** +*** 4733,4758 **** + + # if defined(HAVE_GETPWENT) && defined(HAVE_PWD_H) + { +- char_u* user; + struct passwd* pw; + + setpwent(); + while ((pw = getpwent()) != NULL) +! /* pw->pw_name shouldn't be NULL but just in case... */ +! if (pw->pw_name != NULL) +! { +! if (ga_grow(&ga_users, 1) == FAIL) +! break; +! user = vim_strsave((char_u*)pw->pw_name); +! if (user == NULL) +! break; +! ((char_u **)(ga_users.ga_data))[ga_users.ga_len++] = user; +! } + endpwent(); + } + # elif defined(WIN3264) + { +- char_u* user; + DWORD nusers = 0, ntotal = 0, i; + PUSER_INFO_0 uinfo; + +--- 4752,4766 ---- + + # if defined(HAVE_GETPWENT) && defined(HAVE_PWD_H) + { + struct passwd* pw; + + setpwent(); + while ((pw = getpwent()) != NULL) +! add_user((char_u *)pw->pw_name, TRUE); + endpwent(); + } + # elif defined(WIN3264) + { + DWORD nusers = 0, ntotal = 0, i; + PUSER_INFO_0 uinfo; + +*************** +*** 4760,4775 **** + &nusers, &ntotal, NULL) == NERR_Success) + { + for (i = 0; i < nusers; i++) + { +! if (ga_grow(&ga_users, 1) == FAIL) +! break; +! user = utf16_to_enc(uinfo[i].usri0_name, NULL); +! if (user == NULL) + break; +- ((char_u **)(ga_users.ga_data))[ga_users.ga_len++] = user; + } + +! NetApiBufferFree(uinfo); + } + } + # endif +--- 4768,4808 ---- + &nusers, &ntotal, NULL) == NERR_Success) + { + for (i = 0; i < nusers; i++) ++ add_user(utf16_to_enc(uinfo[i].usri0_name, NULL), FALSE); ++ ++ NetApiBufferFree(uinfo); ++ } ++ } ++ # endif ++ # if defined(HAVE_GETPWNAM) ++ { ++ char_u *user_env = mch_getenv((char_u *)"USER"); ++ ++ // The $USER environment variable may be a valid remote user name (NIS, ++ // LDAP) not already listed by getpwent(), as getpwent() only lists ++ // local user names. If $USER is not already listed, check whether it ++ // is a valid remote user name using getpwnam() and if it is, add it to ++ // the list of user names. ++ ++ if (user_env != NULL && *user_env != NUL) ++ { ++ int i; ++ ++ for (i = 0; i < ga_users.ga_len; i++) + { +! char_u *local_user = ((char_u **)ga_users.ga_data)[i]; +! +! if (STRCMP(local_user, user_env) == 0) + break; + } + +! if (i == ga_users.ga_len) +! { +! struct passwd *pw = getpwnam((char *)user_env); +! +! if (pw != NULL) +! add_user((char_u *)pw->pw_name, TRUE); +! } + } + } + # endif +*** ../vim-8.1.0360/src/version.c 2018-09-10 17:50:32.717306902 +0200 +--- src/version.c 2018-09-10 18:48:00.579950668 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 361, + /**/ + +-- +"You know, it's at times like this when I'm trapped in a Vogon airlock with +a man from Betelgeuse and about to die of asphyxiation in deep space that I +really wish I'd listened to what my mother told me when I was young!" +"Why, what did she tell you?" +"I don't know, I didn't listen!" + -- Arthur Dent and Ford Prefect in Douglas Adams' + "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/data/vim/patches/8.1.0362 b/data/vim/patches/8.1.0362 new file mode 100644 index 000000000..a662ea322 --- /dev/null +++ b/data/vim/patches/8.1.0362 @@ -0,0 +1,6943 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0362 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0362 +Problem: Cannot get the script line number when executing a function. +Solution: Store the line number besides the script ID. (Ozaki Kiichi, + closes #3362) Also display the line number with ":verbose set". +Files: runtime/doc/cmdline.txt, runtime/doc/eval.txt, src/Make_all.mak, + src/buffer.c, src/eval.c, src/evalfunc.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/getchar.c, + src/globals.h, src/main.c, src/menu.c, src/option.c, + src/proto/eval.pro, src/structs.h, src/syntax.c, + src/testdir/test_alot.vim, src/testdir/test_expand_func.vim, + src/testdir/test_maparg.vim, src/term.c src/userfunc.c + + +*** ../vim-8.1.0361/runtime/doc/cmdline.txt 2018-05-17 13:40:51.000000000 +0200 +--- runtime/doc/cmdline.txt 2018-09-10 19:56:54.871550345 +0200 +*************** +*** 832,842 **** + \\# \# + Also see |`=|. + +! *:* *:* *:* ** +! *:* ** *:* ** +! *:* ** *:* ** +! *:* ** +! ** *E495* *E496* *E497* *E499* *E500* + Note: these are typed literally, they are not special keys! + is replaced with the word under the cursor (like |star|) + is replaced with the WORD under the cursor (see |WORD|) +--- 832,843 ---- + \\# \# + Also see |`=|. + +! *:* ** *:* ** +! *:* ** *:* ** +! *:* ** *:* ** +! *:* ** +! *:* ** *:* ** +! *:* ** *E499* *E500* + Note: these are typed literally, they are not special keys! + is replaced with the word under the cursor (like |star|) + is replaced with the WORD under the cursor (see |WORD|) +*************** +*** 849,863 **** + |gf| uses) + When executing autocommands, is replaced with the file name + of the buffer being manipulated, or the file for a read or +! write. + When executing autocommands, is replaced with the currently + effective buffer number (for ":r file" and ":so file" it is + the current buffer, the file being read/sourced is not in a +! buffer). + When executing autocommands, is replaced with the match for +! which this autocommand was executed. It differs from +! only when the file name isn't used to match with +! (for FileType, Syntax and SpellFileMissing events). + When executing a ":source" command, is replaced with the + file name of the sourced file. *E498* + When executing a function, is replaced with: +--- 850,865 ---- + |gf| uses) + When executing autocommands, is replaced with the file name + of the buffer being manipulated, or the file for a read or +! write. *E495* + When executing autocommands, is replaced with the currently + effective buffer number (for ":r file" and ":so file" it is + the current buffer, the file being read/sourced is not in a +! buffer). *E496* + When executing autocommands, is replaced with the match for +! which this autocommand was executed. *E497* +! It differs from only when the file name isn't used +! to match with (for FileType, Syntax and SpellFileMissing +! events). + When executing a ":source" command, is replaced with the + file name of the sourced file. *E498* + When executing a function, is replaced with: +*************** +*** 867,875 **** + Note that filename-modifiers are useless when is + used inside a function. + When executing a ":source" command, is replaced with the +! line number. *E842* + When executing a function it's the line number relative to + the start of the function. + + *filename-modifiers* + *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S* +--- 869,880 ---- + Note that filename-modifiers are useless when is + used inside a function. + When executing a ":source" command, is replaced with the +! line number. *E842* + When executing a function it's the line number relative to + the start of the function. ++ When executing a script, is replaced with the line number. ++ It differs from in that is replaced with ++ the script line number in any situation. *E961* + + *filename-modifiers* + *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S* +*** ../vim-8.1.0361/runtime/doc/eval.txt 2018-09-06 13:14:39.148722497 +0200 +--- runtime/doc/eval.txt 2018-09-10 20:28:19.359384588 +0200 +*************** +*** 3790,3796 **** + autocmd buffer number (as a String!) + autocmd matched name + sourced script file or function name +! sourced script file line number + word under the cursor + WORD under the cursor + the {clientid} of the last received +--- 3798,3807 ---- + autocmd buffer number (as a String!) + autocmd matched name + sourced script file or function name +! sourced script line number or function +! line number +! script file line number, also when in +! a function + word under the cursor + WORD under the cursor + the {clientid} of the last received +*************** +*** 5923,5928 **** +--- 5934,5940 ---- + (|mapmode-ic|) + "sid" The script local ID, used for mappings + (||). ++ "lnum" The line number in "sid", zero if unknown. + "nowait" Do not wait for other, longer mappings. + (|:map-|). + +*** ../vim-8.1.0361/src/Make_all.mak 2018-08-07 21:39:09.251060096 +0200 +--- src/Make_all.mak 2018-09-10 19:45:33.372367473 +0200 +*************** +*** 2,8 **** + # Common Makefile, defines the list of tests to run. + # + +! # Individual tests, including the ones part of test_alot + NEW_TESTS = \ + test_arglist \ + test_arabic \ +--- 2,9 ---- + # Common Makefile, defines the list of tests to run. + # + +! # Individual tests, including the ones part of test_alot. +! # Please keep sorted up to test_alot. + NEW_TESTS = \ + test_arglist \ + test_arabic \ +*************** +*** 52,57 **** +--- 53,59 ---- + test_exists_autocmd \ + test_expand \ + test_expand_dllpath \ ++ test_expand_func \ + test_expr \ + test_expr_utf8 \ + test_farsi \ +*** ../vim-8.1.0361/src/buffer.c 2018-09-01 15:29:58.754429402 +0200 +--- src/buffer.c 2018-09-10 20:10:25.338295605 +0200 +*************** +*** 5412,5418 **** + char_u *save_sourcing_name; + linenr_T save_sourcing_lnum; + #ifdef FEAT_EVAL +! scid_T save_SID; + #endif + + prev = -1; +--- 5412,5418 ---- + char_u *save_sourcing_name; + linenr_T save_sourcing_lnum; + #ifdef FEAT_EVAL +! sctx_T save_current_sctx; + #endif + + prev = -1; +*************** +*** 5497,5508 **** + if (*s != NUL) /* skip over an empty "::" */ + { + #ifdef FEAT_EVAL +! save_SID = current_SID; +! current_SID = SID_MODELINE; + #endif + retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags); + #ifdef FEAT_EVAL +! current_SID = save_SID; + #endif + if (retval == FAIL) /* stop if error found */ + break; +--- 5497,5509 ---- + if (*s != NUL) /* skip over an empty "::" */ + { + #ifdef FEAT_EVAL +! save_current_sctx = current_sctx; +! current_sctx.sc_sid = SID_MODELINE; +! current_sctx.sc_lnum = 0; + #endif + retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags); + #ifdef FEAT_EVAL +! current_sctx = save_current_sctx; + #endif + if (retval == FAIL) /* stop if error found */ + break; +*** ../vim-8.1.0361/src/eval.c 2018-08-01 19:05:59.278223228 +0200 +--- src/eval.c 2018-09-10 20:26:11.396692124 +0200 +*************** +*** 1495,1502 **** + static void + list_script_vars(int *first) + { +! if (current_SID > 0 && current_SID <= ga_scripts.ga_len) +! list_hashtable_vars(&SCRIPT_VARS(current_SID), + (char_u *)"s:", FALSE, first); + } + +--- 1495,1502 ---- + static void + list_script_vars(int *first) + { +! if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= ga_scripts.ga_len) +! list_hashtable_vars(&SCRIPT_VARS(current_sctx.sc_sid), + (char_u *)"s:", FALSE, first); + } + +*************** +*** 7202,7208 **** + /* Must be something like "s:", otherwise "ht" would be NULL. */ + switch (htname) + { +! case 's': return &SCRIPT_SV(current_SID)->sv_var; + case 'g': return &globvars_var; + case 'v': return &vimvars_var; + case 'b': return &curbuf->b_bufvar; +--- 7202,7208 ---- + /* Must be something like "s:", otherwise "ht" would be NULL. */ + switch (htname) + { +! case 's': return &SCRIPT_SV(current_sctx.sc_sid)->sv_var; + case 'g': return &globvars_var; + case 'v': return &vimvars_var; + case 'b': return &curbuf->b_bufvar; +*************** +*** 7286,7293 **** + if (*name == 'l') /* l: local function variable */ + return get_funccal_local_ht(); + if (*name == 's' /* script variable */ +! && current_SID > 0 && current_SID <= ga_scripts.ga_len) +! return &SCRIPT_VARS(current_SID); + return NULL; + } + +--- 7286,7293 ---- + if (*name == 'l') /* l: local function variable */ + return get_funccal_local_ht(); + if (*name == 's' /* script variable */ +! && current_sctx.sc_sid > 0 && current_sctx.sc_sid <= ga_scripts.ga_len) +! return &SCRIPT_VARS(current_sctx.sc_sid); + return NULL; + } + +*************** +*** 8729,8748 **** + * Should only be invoked when 'verbose' is non-zero. + */ + void +! last_set_msg(scid_T scriptID) + { + char_u *p; + +! if (scriptID != 0) + { +! p = home_replace_save(NULL, get_scriptname(scriptID)); + if (p != NULL) + { + verbose_enter(); + MSG_PUTS(_("\n\tLast set from ")); + MSG_PUTS(p); +! vim_free(p); + verbose_leave(); + } + } + } +--- 8729,8753 ---- + * Should only be invoked when 'verbose' is non-zero. + */ + void +! last_set_msg(sctx_T script_ctx) + { + char_u *p; + +! if (script_ctx.sc_sid != 0) + { +! p = home_replace_save(NULL, get_scriptname(script_ctx.sc_sid)); + if (p != NULL) + { + verbose_enter(); + MSG_PUTS(_("\n\tLast set from ")); + MSG_PUTS(p); +! if (script_ctx.sc_lnum > 0) +! { +! MSG_PUTS(_(" line ")); +! msg_outnum((long)script_ctx.sc_lnum); +! } + verbose_leave(); ++ vim_free(p); + } + } + } +*** ../vim-8.1.0361/src/evalfunc.c 2018-09-06 13:14:39.144722527 +0200 +--- src/evalfunc.c 2018-09-10 20:28:30.243272684 +0200 +*************** +*** 4061,4067 **** + * also be called from another script. Using trans_function_name() + * would also work, but some plugins depend on the name being + * printable text. */ +! sprintf(sid_buf, "%ld_", (long)current_SID); + name = alloc((int)(STRLEN(sid_buf) + STRLEN(s + off) + 1)); + if (name != NULL) + { +--- 4061,4067 ---- + * also be called from another script. Using trans_function_name() + * would also work, but some plugins depend on the name being + * printable text. */ +! sprintf(sid_buf, "%ld_", (long)current_sctx.sc_sid); + name = alloc((int)(STRLEN(sid_buf) + STRLEN(s + off) + 1)); + if (name != NULL) + { +*************** +*** 7618,7624 **** + dict_add_number(dict, "noremap", mp->m_noremap ? 1L : 0L); + dict_add_number(dict, "expr", mp->m_expr ? 1L : 0L); + dict_add_number(dict, "silent", mp->m_silent ? 1L : 0L); +! dict_add_number(dict, "sid", (long)mp->m_script_ID); + dict_add_number(dict, "buffer", (long)buffer_local); + dict_add_number(dict, "nowait", mp->m_nowait ? 1L : 0L); + dict_add_string(dict, "mode", mapmode); +--- 7618,7625 ---- + dict_add_number(dict, "noremap", mp->m_noremap ? 1L : 0L); + dict_add_number(dict, "expr", mp->m_expr ? 1L : 0L); + dict_add_number(dict, "silent", mp->m_silent ? 1L : 0L); +! dict_add_number(dict, "sid", (long)mp->m_script_ctx.sc_sid); +! dict_add_number(dict, "lnum", (long)mp->m_script_ctx.sc_lnum); + dict_add_number(dict, "buffer", (long)buffer_local); + dict_add_number(dict, "nowait", mp->m_nowait ? 1L : 0L); + dict_add_string(dict, "mode", mapmode); +*** ../vim-8.1.0361/src/ex_cmds2.c 2018-09-08 18:21:10.438503190 +0200 +--- src/ex_cmds2.c 2018-09-10 20:30:57.913745458 +0200 +*************** +*** 1866,1874 **** + { + scriptitem_T *si; + +! if (current_SID > 0 && current_SID <= script_items.ga_len) + { +! si = &SCRIPT_ITEM(current_SID); + if (si->sn_prof_on && si->sn_pr_nest++ == 0) + profile_start(&si->sn_pr_child); + } +--- 1866,1874 ---- + { + scriptitem_T *si; + +! if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= script_items.ga_len) + { +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_prof_on && si->sn_pr_nest++ == 0) + profile_start(&si->sn_pr_child); + } +*************** +*** 1883,1891 **** + { + scriptitem_T *si; + +! if (current_SID > 0 && current_SID <= script_items.ga_len) + { +! si = &SCRIPT_ITEM(current_SID); + if (si->sn_prof_on && --si->sn_pr_nest == 0) + { + profile_end(&si->sn_pr_child); +--- 1883,1891 ---- + { + scriptitem_T *si; + +! if (current_sctx.sc_sid > 0 && current_sctx.sc_sid <= script_items.ga_len) + { +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_prof_on && --si->sn_pr_nest == 0) + { + profile_end(&si->sn_pr_child); +*************** +*** 2003,2010 **** + int + prof_def_func(void) + { +! if (current_SID > 0) +! return SCRIPT_ITEM(current_SID).sn_pr_force; + return FALSE; + } + +--- 2003,2010 ---- + int + prof_def_func(void) + { +! if (current_sctx.sc_sid > 0) +! return SCRIPT_ITEM(current_sctx.sc_sid).sn_pr_force; + return FALSE; + } + +*************** +*** 4351,4357 **** + char_u *firstline = NULL; + int retval = FAIL; + #ifdef FEAT_EVAL +! scid_T save_current_SID; + static scid_T last_current_SID = 0; + void *save_funccalp; + int save_debug_break_level = debug_break_level; +--- 4351,4357 ---- + char_u *firstline = NULL; + int retval = FAIL; + #ifdef FEAT_EVAL +! sctx_T save_current_sctx; + static scid_T last_current_SID = 0; + void *save_funccalp; + int save_debug_break_level = debug_break_level; +*************** +*** 4521,4533 **** + * Check if this script was sourced before to finds its SID. + * If it's new, generate a new SID. + */ +! save_current_SID = current_SID; + # ifdef UNIX + stat_ok = (mch_stat((char *)fname_exp, &st) >= 0); + # endif +! for (current_SID = script_items.ga_len; current_SID > 0; --current_SID) + { +! si = &SCRIPT_ITEM(current_SID); + if (si->sn_name != NULL + && ( + # ifdef UNIX +--- 4521,4535 ---- + * Check if this script was sourced before to finds its SID. + * If it's new, generate a new SID. + */ +! save_current_sctx = current_sctx; +! current_sctx.sc_lnum = 0; + # ifdef UNIX + stat_ok = (mch_stat((char *)fname_exp, &st) >= 0); + # endif +! for (current_sctx.sc_sid = script_items.ga_len; current_sctx.sc_sid > 0; +! --current_sctx.sc_sid) + { +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_name != NULL + && ( + # ifdef UNIX +*************** +*** 4541,4553 **** + fnamecmp(si->sn_name, fname_exp) == 0)) + break; + } +! if (current_SID == 0) + { +! current_SID = ++last_current_SID; +! if (ga_grow(&script_items, (int)(current_SID - script_items.ga_len)) +! == FAIL) + goto almosttheend; +! while (script_items.ga_len < current_SID) + { + ++script_items.ga_len; + SCRIPT_ITEM(script_items.ga_len).sn_name = NULL; +--- 4543,4555 ---- + fnamecmp(si->sn_name, fname_exp) == 0)) + break; + } +! if (current_sctx.sc_sid == 0) + { +! current_sctx.sc_sid = ++last_current_SID; +! if (ga_grow(&script_items, +! (int)(current_sctx.sc_sid - script_items.ga_len)) == FAIL) + goto almosttheend; +! while (script_items.ga_len < current_sctx.sc_sid) + { + ++script_items.ga_len; + SCRIPT_ITEM(script_items.ga_len).sn_name = NULL; +*************** +*** 4555,4561 **** + SCRIPT_ITEM(script_items.ga_len).sn_prof_on = FALSE; + # endif + } +! si = &SCRIPT_ITEM(current_SID); + si->sn_name = fname_exp; + fname_exp = NULL; + # ifdef UNIX +--- 4557,4563 ---- + SCRIPT_ITEM(script_items.ga_len).sn_prof_on = FALSE; + # endif + } +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + si->sn_name = fname_exp; + fname_exp = NULL; + # ifdef UNIX +*************** +*** 4570,4576 **** + # endif + + /* Allocate the local script variables to use for this script. */ +! new_script_vars(current_SID); + } + + # ifdef FEAT_PROFILE +--- 4572,4578 ---- + # endif + + /* Allocate the local script variables to use for this script. */ +! new_script_vars(current_sctx.sc_sid); + } + + # ifdef FEAT_PROFILE +*************** +*** 4626,4632 **** + if (do_profiling == PROF_YES) + { + /* Get "si" again, "script_items" may have been reallocated. */ +! si = &SCRIPT_ITEM(current_SID); + if (si->sn_prof_on) + { + profile_end(&si->sn_pr_start); +--- 4628,4634 ---- + if (do_profiling == PROF_YES) + { + /* Get "si" again, "script_items" may have been reallocated. */ +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_prof_on) + { + profile_end(&si->sn_pr_start); +*************** +*** 4671,4677 **** + + #ifdef FEAT_EVAL + almosttheend: +! current_SID = save_current_SID; + restore_funccal(save_funccalp); + # ifdef FEAT_PROFILE + if (do_profiling == PROF_YES) +--- 4673,4679 ---- + + #ifdef FEAT_EVAL + almosttheend: +! current_sctx = save_current_sctx; + restore_funccal(save_funccalp); + # ifdef FEAT_PROFILE + if (do_profiling == PROF_YES) +*************** +*** 5090,5098 **** + scriptitem_T *si; + sn_prl_T *pp; + +! if (current_SID <= 0 || current_SID > script_items.ga_len) + return; +! si = &SCRIPT_ITEM(current_SID); + if (si->sn_prof_on && sourcing_lnum >= 1) + { + /* Grow the array before starting the timer, so that the time spent +--- 5092,5100 ---- + scriptitem_T *si; + sn_prl_T *pp; + +! if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) + return; +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_prof_on && sourcing_lnum >= 1) + { + /* Grow the array before starting the timer, so that the time spent +*************** +*** 5125,5133 **** + { + scriptitem_T *si; + +! if (current_SID <= 0 || current_SID > script_items.ga_len) + return; +! si = &SCRIPT_ITEM(current_SID); + if (si->sn_prof_on && si->sn_prl_idx >= 0) + si->sn_prl_execed = TRUE; + } +--- 5127,5135 ---- + { + scriptitem_T *si; + +! if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) + return; +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_prof_on && si->sn_prl_idx >= 0) + si->sn_prl_execed = TRUE; + } +*************** +*** 5141,5149 **** + scriptitem_T *si; + sn_prl_T *pp; + +! if (current_SID <= 0 || current_SID > script_items.ga_len) + return; +! si = &SCRIPT_ITEM(current_SID); + if (si->sn_prof_on && si->sn_prl_idx >= 0 + && si->sn_prl_idx < si->sn_prl_ga.ga_len) + { +--- 5143,5151 ---- + scriptitem_T *si; + sn_prl_T *pp; + +! if (current_sctx.sc_sid <= 0 || current_sctx.sc_sid > script_items.ga_len) + return; +! si = &SCRIPT_ITEM(current_sctx.sc_sid); + if (si->sn_prof_on && si->sn_prl_idx >= 0 + && si->sn_prl_idx < si->sn_prl_ga.ga_len) + { +*** ../vim-8.1.0361/src/ex_docmd.c 2018-09-06 21:44:13.660006996 +0200 +--- src/ex_docmd.c 2018-09-10 20:10:41.366117167 +0200 +*************** +*** 29,35 **** + int uc_compl; /* completion type */ + int uc_addr_type; /* The command's address type */ + # ifdef FEAT_EVAL +! scid_T uc_scriptID; /* SID where the command was defined */ + # ifdef FEAT_CMDL_COMPL + char_u *uc_compl_arg; /* completion argument if any */ + # endif +--- 29,35 ---- + int uc_compl; /* completion type */ + int uc_addr_type; /* The command's address type */ + # ifdef FEAT_EVAL +! sctx_T uc_script_ctx; /* SCTX where the command was defined */ + # ifdef FEAT_CMDL_COMPL + char_u *uc_compl_arg; /* completion argument if any */ + # endif +*************** +*** 3340,3346 **** + if (xp != NULL) + { + xp->xp_arg = uc->uc_compl_arg; +! xp->xp_scriptID = uc->uc_scriptID; + } + # endif + # endif +--- 3340,3347 ---- + if (xp != NULL) + { + xp->xp_arg = uc->uc_compl_arg; +! xp->xp_script_ctx = uc->uc_script_ctx; +! xp->xp_script_ctx.sc_lnum += sourcing_lnum; + } + # endif + # endif +*************** +*** 5920,5926 **** + cmd->uc_def = def; + cmd->uc_compl = compl; + #ifdef FEAT_EVAL +! cmd->uc_scriptID = current_SID; + # ifdef FEAT_CMDL_COMPL + cmd->uc_compl_arg = compl_arg; + # endif +--- 5921,5928 ---- + cmd->uc_def = def; + cmd->uc_compl = compl; + #ifdef FEAT_EVAL +! cmd->uc_script_ctx = current_sctx; +! cmd->uc_script_ctx.sc_lnum += sourcing_lnum; + # ifdef FEAT_CMDL_COMPL + cmd->uc_compl_arg = compl_arg; + # endif +*************** +*** 6141,6147 **** + msg_outtrans_special(cmd->uc_rep, FALSE); + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(cmd->uc_scriptID); + #endif + out_flush(); + ui_breakcheck(); +--- 6143,6149 ---- + msg_outtrans_special(cmd->uc_rep, FALSE); + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(cmd->uc_script_ctx); + #endif + out_flush(); + ui_breakcheck(); +*************** +*** 6906,6912 **** + char_u *split_buf = NULL; + ucmd_T *cmd; + #ifdef FEAT_EVAL +! scid_T save_current_SID = current_SID; + #endif + + if (eap->cmdidx == CMD_USER) +--- 6908,6914 ---- + char_u *split_buf = NULL; + ucmd_T *cmd; + #ifdef FEAT_EVAL +! sctx_T save_current_sctx = current_sctx; + #endif + + if (eap->cmdidx == CMD_USER) +*************** +*** 7007,7018 **** + } + + #ifdef FEAT_EVAL +! current_SID = cmd->uc_scriptID; + #endif + (void)do_cmdline(buf, eap->getline, eap->cookie, + DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_KEYTYPED); + #ifdef FEAT_EVAL +! current_SID = save_current_SID; + #endif + vim_free(buf); + vim_free(split_buf); +--- 7009,7020 ---- + } + + #ifdef FEAT_EVAL +! current_sctx.sc_sid = cmd->uc_script_ctx.sc_sid; + #endif + (void)do_cmdline(buf, eap->getline, eap->cookie, + DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_KEYTYPED); + #ifdef FEAT_EVAL +! current_sctx = save_current_sctx; + #endif + vim_free(buf); + vim_free(split_buf); +*************** +*** 10736,10749 **** + "", /* ":so" file line number */ + #define SPEC_SLNUM (SPEC_SFILE + 1) + "", /* autocommand file name */ +! #define SPEC_AFILE (SPEC_SLNUM + 1) + "", /* autocommand buffer number */ +! #define SPEC_ABUF (SPEC_AFILE + 1) + "", /* autocommand match name */ + #define SPEC_AMATCH (SPEC_ABUF + 1) + #ifdef FEAT_CLIENTSERVER + "" +! # define SPEC_CLIENT (SPEC_AMATCH + 1) + #endif + }; + +--- 10738,10753 ---- + "", /* ":so" file line number */ + #define SPEC_SLNUM (SPEC_SFILE + 1) + "", /* autocommand file name */ +! #define SPEC_AFILE (SPEC_SLNUM + 1) + "", /* autocommand buffer number */ +! #define SPEC_ABUF (SPEC_AFILE + 1) + "", /* autocommand match name */ + #define SPEC_AMATCH (SPEC_ABUF + 1) ++ "", /* script file line number */ ++ #define SPEC_SFLNUM (SPEC_AMATCH + 1) + #ifdef FEAT_CLIENTSERVER + "" +! # define SPEC_CLIENT (SPEC_SFLNUM + 1) + #endif + }; + +*************** +*** 10999,11004 **** +--- 11003,11009 ---- + return NULL; + } + break; ++ + case SPEC_SLNUM: /* line in file for ":so" command */ + if (sourcing_name == NULL || sourcing_lnum == 0) + { +*************** +*** 11008,11020 **** + sprintf((char *)strbuf, "%ld", (long)sourcing_lnum); + result = strbuf; + break; +! #if defined(FEAT_CLIENTSERVER) + case SPEC_CLIENT: /* Source of last submitted input */ + sprintf((char *)strbuf, PRINTF_HEX_LONG_U, + (long_u)clientWindow); + result = strbuf; + break; + #endif + default: + result = (char_u *)""; /* avoid gcc warning */ + break; +--- 11013,11040 ---- + sprintf((char *)strbuf, "%ld", (long)sourcing_lnum); + result = strbuf; + break; +! +! #ifdef FEAT_EVAL +! case SPEC_SFLNUM: /* line in script file */ +! if (current_sctx.sc_lnum + sourcing_lnum == 0) +! { +! *errormsg = (char_u *)_("E961: no line number to use for \"\""); +! return NULL; +! } +! sprintf((char *)strbuf, "%ld", +! (long)(current_sctx.sc_lnum + sourcing_lnum)); +! result = strbuf; +! break; +! #endif +! +! #ifdef FEAT_CLIENTSERVER + case SPEC_CLIENT: /* Source of last submitted input */ + sprintf((char *)strbuf, PRINTF_HEX_LONG_U, + (long_u)clientWindow); + result = strbuf; + break; + #endif ++ + default: + result = (char_u *)""; /* avoid gcc warning */ + break; +*** ../vim-8.1.0361/src/ex_getln.c 2018-09-09 15:54:11.232857907 +0200 +--- src/ex_getln.c 2018-09-10 19:45:33.376367415 +0200 +*************** +*** 5591,5597 **** + { + int keep = 0; + typval_T args[4]; +! int save_current_SID = current_SID; + char_u *pat = NULL; + void *ret; + struct cmdline_info save_ccline; +--- 5591,5597 ---- + { + int keep = 0; + typval_T args[4]; +! sctx_T save_current_sctx = current_sctx; + char_u *pat = NULL; + void *ret; + struct cmdline_info save_ccline; +*************** +*** 5621,5632 **** + save_ccline = ccline; + ccline.cmdbuff = NULL; + ccline.cmdprompt = NULL; +! current_SID = xp->xp_scriptID; + + ret = user_expand_func(xp->xp_arg, 3, args); + + ccline = save_ccline; +! current_SID = save_current_SID; + if (ccline.cmdbuff != NULL) + ccline.cmdbuff[ccline.cmdlen] = keep; + +--- 5621,5632 ---- + save_ccline = ccline; + ccline.cmdbuff = NULL; + ccline.cmdprompt = NULL; +! current_sctx = xp->xp_script_ctx; + + ret = user_expand_func(xp->xp_arg, 3, args); + + ccline = save_ccline; +! current_sctx = save_current_sctx; + if (ccline.cmdbuff != NULL) + ccline.cmdbuff[ccline.cmdlen] = keep; + +*** ../vim-8.1.0361/src/fileio.c 2018-08-21 15:12:10.839801647 +0200 +--- src/fileio.c 2018-09-10 19:45:33.376367415 +0200 +*************** +*** 7700,7706 **** + char nested; /* If autocommands nest here */ + char last; /* last command in list */ + #ifdef FEAT_EVAL +! scid_T scriptID; /* script ID where defined */ + #endif + struct AutoCmd *next; /* Next AutoCmd in list */ + } AutoCmd; +--- 7700,7706 ---- + char nested; /* If autocommands nest here */ + char last; /* last command in list */ + #ifdef FEAT_EVAL +! sctx_T script_ctx; /* script context where defined */ + #endif + struct AutoCmd *next; /* Next AutoCmd in list */ + } AutoCmd; +*************** +*** 7962,7968 **** + msg_outtrans(ac->cmd); + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(ac->scriptID); + #endif + if (got_int) + return; +--- 7962,7968 ---- + msg_outtrans(ac->cmd); + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(ac->script_ctx); + #endif + if (got_int) + return; +*************** +*** 8845,8851 **** + return FAIL; + ac->cmd = vim_strsave(cmd); + #ifdef FEAT_EVAL +! ac->scriptID = current_SID; + #endif + if (ac->cmd == NULL) + { +--- 8845,8852 ---- + return FAIL; + ac->cmd = vim_strsave(cmd); + #ifdef FEAT_EVAL +! ac->script_ctx = current_sctx; +! ac->script_ctx.sc_lnum += sourcing_lnum; + #endif + if (ac->cmd == NULL) + { +*************** +*** 9412,9418 **** + AutoPatCmd patcmd; + AutoPat *ap; + #ifdef FEAT_EVAL +! scid_T save_current_SID; + void *save_funccalp; + char_u *save_cmdarg; + long save_cmdbang; +--- 9413,9419 ---- + AutoPatCmd patcmd; + AutoPat *ap; + #ifdef FEAT_EVAL +! sctx_T save_current_sctx; + void *save_funccalp; + char_u *save_cmdarg; + long save_cmdbang; +*************** +*** 9621,9627 **** + sourcing_lnum = 0; /* no line number here */ + + #ifdef FEAT_EVAL +! save_current_SID = current_SID; + + # ifdef FEAT_PROFILE + if (do_profiling == PROF_YES) +--- 9622,9628 ---- + sourcing_lnum = 0; /* no line number here */ + + #ifdef FEAT_EVAL +! save_current_sctx = current_sctx; + + # ifdef FEAT_PROFILE + if (do_profiling == PROF_YES) +*************** +*** 9725,9731 **** + autocmd_bufnr = save_autocmd_bufnr; + autocmd_match = save_autocmd_match; + #ifdef FEAT_EVAL +! current_SID = save_current_SID; + restore_funccal(save_funccalp); + # ifdef FEAT_PROFILE + if (do_profiling == PROF_YES) +--- 9726,9732 ---- + autocmd_bufnr = save_autocmd_bufnr; + autocmd_match = save_autocmd_match; + #ifdef FEAT_EVAL +! current_sctx = save_current_sctx; + restore_funccal(save_funccalp); + # ifdef FEAT_PROFILE + if (do_profiling == PROF_YES) +*************** +*** 9949,9955 **** + retval = vim_strsave(ac->cmd); + autocmd_nested = ac->nested; + #ifdef FEAT_EVAL +! current_SID = ac->scriptID; + #endif + if (ac->last) + acp->nextcmd = NULL; +--- 9950,9956 ---- + retval = vim_strsave(ac->cmd); + autocmd_nested = ac->nested; + #ifdef FEAT_EVAL +! current_sctx = ac->script_ctx; + #endif + if (ac->last) + acp->nextcmd = NULL; +*** ../vim-8.1.0361/src/getchar.c 2018-07-27 23:16:40.922781670 +0200 +--- src/getchar.c 2018-09-10 19:45:33.376367415 +0200 +*************** +*** 3677,3683 **** + mp->m_mode = mode; + #ifdef FEAT_EVAL + mp->m_expr = expr; +! mp->m_script_ID = current_SID; + #endif + did_it = TRUE; + } +--- 3677,3684 ---- + mp->m_mode = mode; + #ifdef FEAT_EVAL + mp->m_expr = expr; +! mp->m_script_ctx = current_sctx; +! mp->m_script_ctx.sc_lnum += sourcing_lnum; + #endif + did_it = TRUE; + } +*************** +*** 3783,3789 **** + mp->m_mode = mode; + #ifdef FEAT_EVAL + mp->m_expr = expr; +! mp->m_script_ID = current_SID; + #endif + + /* add the new entry in front of the abbrlist or maphash[] list */ +--- 3784,3791 ---- + mp->m_mode = mode; + #ifdef FEAT_EVAL + mp->m_expr = expr; +! mp->m_script_ctx = current_sctx; +! mp->m_script_ctx.sc_lnum += sourcing_lnum; + #endif + + /* add the new entry in front of the abbrlist or maphash[] list */ +*************** +*** 4097,4103 **** + } + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(mp->m_script_ID); + #endif + out_flush(); /* show one line at a time */ + } +--- 4099,4105 ---- + } + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(mp->m_script_ctx); + #endif + out_flush(); /* show one line at a time */ + } +*** ../vim-8.1.0361/src/globals.h 2018-09-06 13:14:39.144722527 +0200 +--- src/globals.h 2018-09-10 20:12:24.344972850 +0200 +*************** +*** 325,332 **** + EXTERN int want_garbage_collect INIT(= FALSE); + EXTERN int garbage_collect_at_exit INIT(= FALSE); + +! /* ID of script being sourced or was sourced to define the current function. */ +! EXTERN scid_T current_SID INIT(= 0); + #endif + + EXTERN int did_source_packages INIT(= FALSE); +--- 325,332 ---- + EXTERN int want_garbage_collect INIT(= FALSE); + EXTERN int garbage_collect_at_exit INIT(= FALSE); + +! // Script CTX being sourced or was sourced to define the current function. +! EXTERN sctx_T current_sctx INIT(= {0 COMMA 0}); + #endif + + EXTERN int did_source_packages INIT(= FALSE); +*** ../vim-8.1.0361/src/main.c 2018-08-07 22:42:48.965416564 +0200 +--- src/main.c 2018-09-10 20:10:46.434060766 +0200 +*************** +*** 2912,2924 **** + curwin->w_cursor.lnum = 0; /* just in case.. */ + sourcing_name = (char_u *)_("pre-vimrc command line"); + # ifdef FEAT_EVAL +! current_SID = SID_CMDARG; + # endif + for (i = 0; i < cnt; ++i) + do_cmdline_cmd(cmds[i]); + sourcing_name = NULL; + # ifdef FEAT_EVAL +! current_SID = 0; + # endif + TIME_MSG("--cmd commands"); + } +--- 2912,2924 ---- + curwin->w_cursor.lnum = 0; /* just in case.. */ + sourcing_name = (char_u *)_("pre-vimrc command line"); + # ifdef FEAT_EVAL +! current_sctx.sc_sid = SID_CMDARG; + # endif + for (i = 0; i < cnt; ++i) + do_cmdline_cmd(cmds[i]); + sourcing_name = NULL; + # ifdef FEAT_EVAL +! current_sctx.sc_sid = 0; + # endif + TIME_MSG("--cmd commands"); + } +*************** +*** 2942,2948 **** + curwin->w_cursor.lnum = 0; + sourcing_name = (char_u *)"command line"; + #ifdef FEAT_EVAL +! current_SID = SID_CARG; + #endif + for (i = 0; i < parmp->n_commands; ++i) + { +--- 2942,2948 ---- + curwin->w_cursor.lnum = 0; + sourcing_name = (char_u *)"command line"; + #ifdef FEAT_EVAL +! current_sctx.sc_sid = SID_CARG; + #endif + for (i = 0; i < parmp->n_commands; ++i) + { +*************** +*** 2952,2958 **** + } + sourcing_name = NULL; + #ifdef FEAT_EVAL +! current_SID = 0; + #endif + if (curwin->w_cursor.lnum == 0) + curwin->w_cursor.lnum = 1; +--- 2952,2958 ---- + } + sourcing_name = NULL; + #ifdef FEAT_EVAL +! current_sctx.sc_sid = 0; + #endif + if (curwin->w_cursor.lnum == 0) + curwin->w_cursor.lnum = 1; +*************** +*** 3159,3165 **** + char_u *save_sourcing_name; + linenr_T save_sourcing_lnum; + #ifdef FEAT_EVAL +! scid_T save_sid; + #endif + + if ((initstr = mch_getenv(env)) != NULL && *initstr != NUL) +--- 3159,3165 ---- + char_u *save_sourcing_name; + linenr_T save_sourcing_lnum; + #ifdef FEAT_EVAL +! sctx_T save_current_sctx; + #endif + + if ((initstr = mch_getenv(env)) != NULL && *initstr != NUL) +*************** +*** 3171,3184 **** + sourcing_name = env; + sourcing_lnum = 0; + #ifdef FEAT_EVAL +! save_sid = current_SID; +! current_SID = SID_ENV; + #endif + do_cmdline_cmd(initstr); + sourcing_name = save_sourcing_name; + sourcing_lnum = save_sourcing_lnum; + #ifdef FEAT_EVAL +! current_SID = save_sid; + #endif + return OK; + } +--- 3171,3185 ---- + sourcing_name = env; + sourcing_lnum = 0; + #ifdef FEAT_EVAL +! save_current_sctx = current_sctx; +! current_sctx.sc_sid = SID_ENV; +! current_sctx.sc_lnum = 0; + #endif + do_cmdline_cmd(initstr); + sourcing_name = save_sourcing_name; + sourcing_lnum = save_sourcing_lnum; + #ifdef FEAT_EVAL +! current_sctx = save_current_sctx; + #endif + return OK; + } +*** ../vim-8.1.0361/src/menu.c 2018-03-05 21:31:09.000000000 +0100 +--- src/menu.c 2018-09-10 20:07:50.024030312 +0200 +*************** +*** 2259,2265 **** + /* Use the Insert mode entry when returning to Insert mode. */ + if (restart_edit + #ifdef FEAT_EVAL +! && !current_SID + #endif + ) + { +--- 2259,2265 ---- + /* Use the Insert mode entry when returning to Insert mode. */ + if (restart_edit + #ifdef FEAT_EVAL +! && !current_sctx.sc_sid + #endif + ) + { +*************** +*** 2333,2339 **** + * Otherwise put them in the typeahead buffer. */ + if (eap == NULL + #ifdef FEAT_EVAL +! || current_SID != 0 + #endif + ) + { +--- 2333,2339 ---- + * Otherwise put them in the typeahead buffer. */ + if (eap == NULL + #ifdef FEAT_EVAL +! || current_sctx.sc_sid != 0 + #endif + ) + { +*** ../vim-8.1.0361/src/option.c 2018-08-07 22:30:26.662240885 +0200 +--- src/option.c 2018-09-10 20:43:49.293609932 +0200 +*************** +*** 404,423 **** + + struct vimoption + { +! char *fullname; /* full option name */ +! char *shortname; /* permissible abbreviation */ +! long_u flags; /* see below */ +! char_u *var; /* global option: pointer to variable; +! * window-local option: VAR_WIN; +! * buffer-local option: global value */ +! idopt_T indir; /* global option: PV_NONE; +! * local option: indirect option index */ +! char_u *def_val[2]; /* default values for variable (vi and vim) */ + #ifdef FEAT_EVAL +! scid_T scriptID; /* script in which the option was last set */ +! # define SCRIPTID_INIT , 0 + #else +! # define SCRIPTID_INIT + #endif + }; + +--- 404,423 ---- + + struct vimoption + { +! char *fullname; // full option name +! char *shortname; // permissible abbreviation +! long_u flags; // see below +! char_u *var; // global option: pointer to variable; +! // window-local option: VAR_WIN; +! // buffer-local option: global value +! idopt_T indir; // global option: PV_NONE; +! // local option: indirect option index +! char_u *def_val[2]; // default values for variable (vi and vim) + #ifdef FEAT_EVAL +! sctx_T script_ctx; // script context where the option was last set +! # define SCTX_INIT , {0, 0} + #else +! # define SCTX_INIT + #endif + }; + +*************** +*** 515,521 **** + #else + (char_u *)224L, + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, + #if defined(FEAT_GUI_MAC) + (char_u *)&p_antialias, PV_NONE, +--- 515,521 ---- + #else + (char_u *)224L, + #endif +! (char_u *)0L} SCTX_INIT}, + {"antialias", "anti", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, + #if defined(FEAT_GUI_MAC) + (char_u *)&p_antialias, PV_NONE, +*************** +*** 524,558 **** + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)FALSE} + #endif +! SCRIPTID_INIT}, + {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT, + #ifdef FEAT_ARABIC + (char_u *)VAR_WIN, PV_ARAB, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"arabicshape", "arshape", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, + #ifdef FEAT_ARABIC + (char_u *)&p_arshape, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"allowrevins", "ari", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_ari, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"altkeymap", "akm", P_BOOL|P_VI_DEF, + #ifdef FEAT_FKMAP + (char_u *)&p_altkeymap, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"ambiwidth", "ambw", P_STRING|P_VI_DEF|P_RCLR, + #if defined(FEAT_MBYTE) + (char_u *)&p_ambw, PV_NONE, +--- 524,558 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)FALSE} + #endif +! SCTX_INIT}, + {"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT, + #ifdef FEAT_ARABIC + (char_u *)VAR_WIN, PV_ARAB, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"arabicshape", "arshape", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, + #ifdef FEAT_ARABIC + (char_u *)&p_arshape, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"allowrevins", "ari", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_ari, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"altkeymap", "akm", P_BOOL|P_VI_DEF, + #ifdef FEAT_FKMAP + (char_u *)&p_altkeymap, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"ambiwidth", "ambw", P_STRING|P_VI_DEF|P_RCLR, + #if defined(FEAT_MBYTE) + (char_u *)&p_ambw, PV_NONE, +*************** +*** 561,567 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"autochdir", "acd", P_BOOL|P_VI_DEF, + #ifdef FEAT_AUTOCHDIR + (char_u *)&p_acd, PV_NONE, +--- 561,567 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"autochdir", "acd", P_BOOL|P_VI_DEF, + #ifdef FEAT_AUTOCHDIR + (char_u *)&p_acd, PV_NONE, +*************** +*** 570,591 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"autoindent", "ai", P_BOOL|P_VI_DEF, + (char_u *)&p_ai, PV_AI, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"autoprint", "ap", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"autoread", "ar", P_BOOL|P_VI_DEF, + (char_u *)&p_ar, PV_AR, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"autowrite", "aw", P_BOOL|P_VI_DEF, + (char_u *)&p_aw, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"autowriteall","awa", P_BOOL|P_VI_DEF, + (char_u *)&p_awa, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"background", "bg", P_STRING|P_VI_DEF|P_RCLR, + (char_u *)&p_bg, PV_NONE, + { +--- 570,591 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"autoindent", "ai", P_BOOL|P_VI_DEF, + (char_u *)&p_ai, PV_AI, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"autoprint", "ap", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"autoread", "ar", P_BOOL|P_VI_DEF, + (char_u *)&p_ar, PV_AR, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"autowrite", "aw", P_BOOL|P_VI_DEF, + (char_u *)&p_aw, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"autowriteall","awa", P_BOOL|P_VI_DEF, + (char_u *)&p_awa, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"background", "bg", P_STRING|P_VI_DEF|P_RCLR, + (char_u *)&p_bg, PV_NONE, + { +*************** +*** 594,606 **** + #else + (char_u *)"light", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"backspace", "bs", P_STRING|P_VI_DEF|P_VIM|P_ONECOMMA|P_NODUP, + (char_u *)&p_bs, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"backup", "bk", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_bk, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"backupcopy", "bkc", P_STRING|P_VIM|P_ONECOMMA|P_NODUP, + (char_u *)&p_bkc, PV_BKC, + #ifdef UNIX +--- 594,606 ---- + #else + (char_u *)"light", + #endif +! (char_u *)0L} SCTX_INIT}, + {"backspace", "bs", P_STRING|P_VI_DEF|P_VIM|P_ONECOMMA|P_NODUP, + (char_u *)&p_bs, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"backup", "bk", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_bk, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"backupcopy", "bkc", P_STRING|P_VIM|P_ONECOMMA|P_NODUP, + (char_u *)&p_bkc, PV_BKC, + #ifdef UNIX +*************** +*** 608,618 **** + #else + {(char_u *)"auto", (char_u *)"auto"} + #endif +! SCRIPTID_INIT}, + {"backupdir", "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA + |P_NODUP|P_SECURE, + (char_u *)&p_bdir, PV_NONE, +! {(char_u *)DFLT_BDIR, (char_u *)0L} SCRIPTID_INIT}, + {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME, + (char_u *)&p_bex, PV_NONE, + { +--- 608,618 ---- + #else + {(char_u *)"auto", (char_u *)"auto"} + #endif +! SCTX_INIT}, + {"backupdir", "bdir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA + |P_NODUP|P_SECURE, + (char_u *)&p_bdir, PV_NONE, +! {(char_u *)DFLT_BDIR, (char_u *)0L} SCTX_INIT}, + {"backupext", "bex", P_STRING|P_VI_DEF|P_NFNAME, + (char_u *)&p_bex, PV_NONE, + { +*************** +*** 621,627 **** + #else + (char_u *)"~", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"backupskip", "bsk", P_STRING|P_VI_DEF|P_ONECOMMA, + #ifdef FEAT_WILDIGN + (char_u *)&p_bsk, PV_NONE, +--- 621,627 ---- + #else + (char_u *)"~", + #endif +! (char_u *)0L} SCTX_INIT}, + {"backupskip", "bsk", P_STRING|P_VI_DEF|P_ONECOMMA, + #ifdef FEAT_WILDIGN + (char_u *)&p_bsk, PV_NONE, +*************** +*** 630,636 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"balloondelay","bdlay",P_NUM|P_VI_DEF, + #ifdef FEAT_BEVAL + (char_u *)&p_bdlay, PV_NONE, +--- 630,636 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"balloondelay","bdlay",P_NUM|P_VI_DEF, + #ifdef FEAT_BEVAL + (char_u *)&p_bdlay, PV_NONE, +*************** +*** 639,645 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC, + #ifdef FEAT_BEVAL_GUI + (char_u *)&p_beval, PV_NONE, +--- 639,645 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC, + #ifdef FEAT_BEVAL_GUI + (char_u *)&p_beval, PV_NONE, +*************** +*** 648,654 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"balloonevalterm", "bevalterm",P_BOOL|P_VI_DEF|P_NO_MKRC, + #ifdef FEAT_BEVAL_TERM + (char_u *)&p_bevalterm, PV_NONE, +--- 648,654 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"balloonevalterm", "bevalterm",P_BOOL|P_VI_DEF|P_NO_MKRC, + #ifdef FEAT_BEVAL_TERM + (char_u *)&p_bevalterm, PV_NONE, +*************** +*** 657,663 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, + #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) + (char_u *)&p_bexpr, PV_BEXPR, +--- 657,663 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, + #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) + (char_u *)&p_bexpr, PV_BEXPR, +*************** +*** 666,691 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"beautify", "bf", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"belloff", "bo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_bo, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)&p_bin, PV_BIN, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"bioskey", "biosk",P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, + #ifdef FEAT_MBYTE + (char_u *)&p_bomb, PV_BOMB, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"breakat", "brk", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST, + #ifdef FEAT_LINEBREAK + (char_u *)&p_breakat, PV_NONE, +--- 666,691 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"beautify", "bf", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"belloff", "bo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_bo, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)&p_bin, PV_BIN, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"bioskey", "biosk",P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, + #ifdef FEAT_MBYTE + (char_u *)&p_bomb, PV_BOMB, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"breakat", "brk", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST, + #ifdef FEAT_LINEBREAK + (char_u *)&p_breakat, PV_NONE, +*************** +*** 694,700 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN, + #ifdef FEAT_LINEBREAK + (char_u *)VAR_WIN, PV_BRI, +--- 694,700 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN, + #ifdef FEAT_LINEBREAK + (char_u *)VAR_WIN, PV_BRI, +*************** +*** 703,709 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF + |P_ONECOMMA|P_NODUP, + #ifdef FEAT_LINEBREAK +--- 703,709 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF + |P_ONECOMMA|P_NODUP, + #ifdef FEAT_LINEBREAK +*************** +*** 713,719 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCRIPTID_INIT}, + {"browsedir", "bsdir",P_STRING|P_VI_DEF, + #ifdef FEAT_BROWSE + (char_u *)&p_bsdir, PV_NONE, +--- 713,719 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCTX_INIT}, + {"browsedir", "bsdir",P_STRING|P_VI_DEF, + #ifdef FEAT_BROWSE + (char_u *)&p_bsdir, PV_NONE, +*************** +*** 722,740 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, + (char_u *)&p_bh, PV_BH, + {(char_u *)"", (char_u *)0L} +! SCRIPTID_INIT}, + {"buflisted", "bl", P_BOOL|P_VI_DEF|P_NOGLOB, + (char_u *)&p_bl, PV_BL, + {(char_u *)1L, (char_u *)0L} +! SCRIPTID_INIT}, + {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, + (char_u *)&p_bt, PV_BT, + {(char_u *)"", (char_u *)0L} +! SCRIPTID_INIT}, + {"casemap", "cmp", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_MBYTE + (char_u *)&p_cmp, PV_NONE, +--- 722,740 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"bufhidden", "bh", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, + (char_u *)&p_bh, PV_BH, + {(char_u *)"", (char_u *)0L} +! SCTX_INIT}, + {"buflisted", "bl", P_BOOL|P_VI_DEF|P_NOGLOB, + (char_u *)&p_bl, PV_BL, + {(char_u *)1L, (char_u *)0L} +! SCTX_INIT}, + {"buftype", "bt", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB, + (char_u *)&p_bt, PV_BT, + {(char_u *)"", (char_u *)0L} +! SCTX_INIT}, + {"casemap", "cmp", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_MBYTE + (char_u *)&p_cmp, PV_NONE, +*************** +*** 743,749 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP, + #ifdef FEAT_SEARCHPATH + (char_u *)&p_cdpath, PV_NONE, +--- 743,749 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"cdpath", "cd", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP, + #ifdef FEAT_SEARCHPATH + (char_u *)&p_cdpath, PV_NONE, +*************** +*** 752,758 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cedit", NULL, P_STRING, + #ifdef FEAT_CMDWIN + (char_u *)&p_cedit, PV_NONE, +--- 752,758 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"cedit", NULL, P_STRING, + #ifdef FEAT_CMDWIN + (char_u *)&p_cedit, PV_NONE, +*************** +*** 761,767 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"charconvert", "ccv", P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_MBYTE) && defined(FEAT_EVAL) + (char_u *)&p_ccv, PV_NONE, +--- 761,767 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"charconvert", "ccv", P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_MBYTE) && defined(FEAT_EVAL) + (char_u *)&p_ccv, PV_NONE, +*************** +*** 770,783 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cindent", "cin", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CINDENT + (char_u *)&p_cin, PV_CIN, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_CINDENT + (char_u *)&p_cink, PV_CINK, +--- 770,783 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"cindent", "cin", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CINDENT + (char_u *)&p_cin, PV_CIN, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"cinkeys", "cink", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_CINDENT + (char_u *)&p_cink, PV_CINK, +*************** +*** 786,799 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cinoptions", "cino", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_CINDENT + (char_u *)&p_cino, PV_CINO, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"cinwords", "cinw", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + (char_u *)&p_cinw, PV_CINW, +--- 786,799 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"cinoptions", "cino", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_CINDENT + (char_u *)&p_cino, PV_CINO, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"cinwords", "cinw", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + (char_u *)&p_cinw, PV_CINW, +*************** +*** 803,809 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"clipboard", "cb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_CLIPBOARD + (char_u *)&p_cb, PV_NONE, +--- 803,809 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"clipboard", "cb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_CLIPBOARD + (char_u *)&p_cb, PV_NONE, +*************** +*** 817,843 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL, + (char_u *)&p_ch, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {"cmdwinheight", "cwh", P_NUM|P_VI_DEF, + #ifdef FEAT_CMDWIN + (char_u *)&p_cwh, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)7L, (char_u *)0L} SCRIPTID_INIT}, + {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN, + #ifdef FEAT_SYN_HL + (char_u *)VAR_WIN, PV_CC, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR, + (char_u *)&Columns, PV_NONE, +! {(char_u *)80L, (char_u *)0L} SCRIPTID_INIT}, + {"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA + |P_NODUP|P_CURSWANT, + #ifdef FEAT_COMMENTS +--- 817,843 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCTX_INIT}, + {"cmdheight", "ch", P_NUM|P_VI_DEF|P_RALL, + (char_u *)&p_ch, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCTX_INIT}, + {"cmdwinheight", "cwh", P_NUM|P_VI_DEF, + #ifdef FEAT_CMDWIN + (char_u *)&p_cwh, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)7L, (char_u *)0L} SCTX_INIT}, + {"colorcolumn", "cc", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN, + #ifdef FEAT_SYN_HL + (char_u *)VAR_WIN, PV_CC, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR, + (char_u *)&Columns, PV_NONE, +! {(char_u *)80L, (char_u *)0L} SCTX_INIT}, + {"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA + |P_NODUP|P_CURSWANT, + #ifdef FEAT_COMMENTS +*************** +*** 848,854 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_FOLDING + (char_u *)&p_cms, PV_CMS, +--- 848,854 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_FOLDING + (char_u *)&p_cms, PV_CMS, +*************** +*** 857,868 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + /* P_PRI_MKRC isn't needed here, optval_default() + * always returns TRUE for 'compatible' */ + {"compatible", "cp", P_BOOL|P_RALL, + (char_u *)&p_cp, PV_NONE, +! {(char_u *)TRUE, (char_u *)FALSE} SCRIPTID_INIT}, + {"complete", "cpt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_cpt, PV_CPT, +--- 857,868 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + /* P_PRI_MKRC isn't needed here, optval_default() + * always returns TRUE for 'compatible' */ + {"compatible", "cp", P_BOOL|P_RALL, + (char_u *)&p_cp, PV_NONE, +! {(char_u *)TRUE, (char_u *)FALSE} SCTX_INIT}, + {"complete", "cpt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_cpt, PV_CPT, +*************** +*** 871,877 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"concealcursor","cocu", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, + #ifdef FEAT_CONCEAL + (char_u *)VAR_WIN, PV_COCU, +--- 871,877 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"concealcursor","cocu", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, + #ifdef FEAT_CONCEAL + (char_u *)VAR_WIN, PV_COCU, +*************** +*** 880,886 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"conceallevel","cole", P_NUM|P_RWIN|P_VI_DEF, + #ifdef FEAT_CONCEAL + (char_u *)VAR_WIN, PV_COLE, +--- 880,886 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"conceallevel","cole", P_NUM|P_RWIN|P_VI_DEF, + #ifdef FEAT_CONCEAL + (char_u *)VAR_WIN, PV_COLE, +*************** +*** 888,894 **** + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)0L, (char_u *)0L} +! SCRIPTID_INIT}, + {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, + #ifdef FEAT_COMPL_FUNC + (char_u *)&p_cfu, PV_CFU, +--- 888,894 ---- + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)0L, (char_u *)0L} +! SCTX_INIT}, + {"completefunc", "cfu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, + #ifdef FEAT_COMPL_FUNC + (char_u *)&p_cfu, PV_CFU, +*************** +*** 897,903 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"completeopt", "cot", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_cot, PV_NONE, +--- 897,903 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"completeopt", "cot", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_cot, PV_NONE, +*************** +*** 906,929 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"confirm", "cf", P_BOOL|P_VI_DEF, + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + (char_u *)&p_confirm, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"conskey", "consk",P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_ci, PV_CI, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST, + (char_u *)&p_cpo, PV_NONE, + {(char_u *)CPO_VI, (char_u *)CPO_VIM} +! SCRIPTID_INIT}, + {"cryptmethod", "cm", P_STRING|P_ALLOCED|P_VI_DEF, + #ifdef FEAT_CRYPT + (char_u *)&p_cm, PV_CM, +--- 906,929 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"confirm", "cf", P_BOOL|P_VI_DEF, + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + (char_u *)&p_confirm, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"conskey", "consk",P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_ci, PV_CI, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST, + (char_u *)&p_cpo, PV_NONE, + {(char_u *)CPO_VI, (char_u *)CPO_VIM} +! SCTX_INIT}, + {"cryptmethod", "cm", P_STRING|P_ALLOCED|P_VI_DEF, + #ifdef FEAT_CRYPT + (char_u *)&p_cm, PV_CM, +*************** +*** 932,945 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cscopepathcomp", "cspc", P_NUM|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_cspc, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"cscopeprg", "csprg", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_CSCOPE + (char_u *)&p_csprg, PV_NONE, +--- 932,945 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"cscopepathcomp", "cspc", P_NUM|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_cspc, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"cscopeprg", "csprg", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_CSCOPE + (char_u *)&p_csprg, PV_NONE, +*************** +*** 948,954 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cscopequickfix", "csqf", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #if defined(FEAT_CSCOPE) && defined(FEAT_QUICKFIX) + (char_u *)&p_csqf, PV_NONE, +--- 948,954 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"cscopequickfix", "csqf", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #if defined(FEAT_CSCOPE) && defined(FEAT_QUICKFIX) + (char_u *)&p_csqf, PV_NONE, +*************** +*** 957,1011 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_csre, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_cst, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"cscopetagorder", "csto", P_NUM|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_csto, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"cscopeverbose", "csverb", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_csverbose, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"cursorbind", "crb", P_BOOL|P_VI_DEF, + (char_u *)VAR_WIN, PV_CRBIND, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_SYN_HL + (char_u *)VAR_WIN, PV_CUC, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY, + #ifdef FEAT_SYN_HL + (char_u *)VAR_WIN, PV_CUL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"debug", NULL, P_STRING|P_VI_DEF, + (char_u *)&p_debug, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"define", "def", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_FIND_ID + (char_u *)&p_def, PV_DEF, +--- 957,1011 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_csre, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_cst, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"cscopetagorder", "csto", P_NUM|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_csto, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"cscopeverbose", "csverb", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_csverbose, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"cursorbind", "crb", P_BOOL|P_VI_DEF, + (char_u *)VAR_WIN, PV_CRBIND, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_SYN_HL + (char_u *)VAR_WIN, PV_CUC, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"cursorline", "cul", P_BOOL|P_VI_DEF|P_RWINONLY, + #ifdef FEAT_SYN_HL + (char_u *)VAR_WIN, PV_CUL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"debug", NULL, P_STRING|P_VI_DEF, + (char_u *)&p_debug, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"define", "def", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_FIND_ID + (char_u *)&p_def, PV_DEF, +*************** +*** 1014,1041 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"delcombine", "deco", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_MBYTE + (char_u *)&p_deco, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_dict, PV_DICT, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB, + #ifdef FEAT_DIFF + (char_u *)VAR_WIN, PV_DIFF, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT, + #if defined(FEAT_DIFF) && defined(FEAT_EVAL) + (char_u *)&p_dex, PV_NONE, +--- 1014,1041 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"delcombine", "deco", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_MBYTE + (char_u *)&p_deco, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_dict, PV_DICT, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"diff", NULL, P_BOOL|P_VI_DEF|P_RWIN|P_NOGLOB, + #ifdef FEAT_DIFF + (char_u *)VAR_WIN, PV_DIFF, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT, + #if defined(FEAT_DIFF) && defined(FEAT_EVAL) + (char_u *)&p_dex, PV_NONE, +*************** +*** 1044,1050 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"diffopt", "dip", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN|P_ONECOMMA + |P_NODUP, + #ifdef FEAT_DIFF +--- 1044,1050 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"diffopt", "dip", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN|P_ONECOMMA + |P_NODUP, + #ifdef FEAT_DIFF +*************** +*** 1054,1081 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCRIPTID_INIT}, + {"digraph", "dg", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_DIGRAPHS + (char_u *)&p_dg, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"directory", "dir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA + |P_NODUP|P_SECURE, + (char_u *)&p_dir, PV_NONE, +! {(char_u *)DFLT_DIR, (char_u *)0L} SCRIPTID_INIT}, + {"display", "dy", P_STRING|P_VI_DEF|P_ONECOMMA|P_RALL|P_NODUP, + (char_u *)&p_dy, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"eadirection", "ead", P_STRING|P_VI_DEF, + (char_u *)&p_ead, PV_NONE, + {(char_u *)"both", (char_u *)0L} +! SCRIPTID_INIT}, + {"edcompatible","ed", P_BOOL|P_VI_DEF, + (char_u *)&p_ed, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"emoji", "emo", P_BOOL|P_VI_DEF|P_RCLR, + #if defined(FEAT_MBYTE) + (char_u *)&p_emoji, PV_NONE, +--- 1054,1081 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCTX_INIT}, + {"digraph", "dg", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_DIGRAPHS + (char_u *)&p_dg, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"directory", "dir", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA + |P_NODUP|P_SECURE, + (char_u *)&p_dir, PV_NONE, +! {(char_u *)DFLT_DIR, (char_u *)0L} SCTX_INIT}, + {"display", "dy", P_STRING|P_VI_DEF|P_ONECOMMA|P_RALL|P_NODUP, + (char_u *)&p_dy, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"eadirection", "ead", P_STRING|P_VI_DEF, + (char_u *)&p_ead, PV_NONE, + {(char_u *)"both", (char_u *)0L} +! SCTX_INIT}, + {"edcompatible","ed", P_BOOL|P_VI_DEF, + (char_u *)&p_ed, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"emoji", "emo", P_BOOL|P_VI_DEF|P_RCLR, + #if defined(FEAT_MBYTE) + (char_u *)&p_emoji, PV_NONE, +*************** +*** 1084,1090 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML, + #ifdef FEAT_MBYTE + (char_u *)&p_enc, PV_NONE, +--- 1084,1090 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML, + #ifdef FEAT_MBYTE + (char_u *)&p_enc, PV_NONE, +*************** +*** 1093,1111 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"endofline", "eol", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, + (char_u *)&p_eol, PV_EOL, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"equalalways", "ea", P_BOOL|P_VI_DEF|P_RALL, + (char_u *)&p_ea, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"equalprg", "ep", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_ep, PV_EP, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"errorbells", "eb", P_BOOL|P_VI_DEF, + (char_u *)&p_eb, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"errorfile", "ef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_ef, PV_NONE, +--- 1093,1111 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"endofline", "eol", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, + (char_u *)&p_eol, PV_EOL, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"equalalways", "ea", P_BOOL|P_VI_DEF|P_RALL, + (char_u *)&p_ea, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"equalprg", "ep", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_ep, PV_EP, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"errorbells", "eb", P_BOOL|P_VI_DEF, + (char_u *)&p_eb, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"errorfile", "ef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_ef, PV_NONE, +*************** +*** 1114,1120 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"errorformat", "efm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_QUICKFIX + (char_u *)&p_efm, PV_EFM, +--- 1114,1120 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"errorformat", "efm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_QUICKFIX + (char_u *)&p_efm, PV_EFM, +*************** +*** 1123,1141 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"esckeys", "ek", P_BOOL|P_VIM, + (char_u *)&p_ek, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, + {"eventignore", "ei", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_ei, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"expandtab", "et", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_et, PV_ET, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"exrc", "ex", P_BOOL|P_VI_DEF|P_SECURE, + (char_u *)&p_exrc, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF + |P_NO_MKRC, + #ifdef FEAT_MBYTE +--- 1123,1141 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"esckeys", "ek", P_BOOL|P_VIM, + (char_u *)&p_ek, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, + {"eventignore", "ei", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_ei, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"expandtab", "et", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_et, PV_ET, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"exrc", "ex", P_BOOL|P_VI_DEF|P_SECURE, + (char_u *)&p_exrc, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"fileencoding","fenc", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_RBUF + |P_NO_MKRC, + #ifdef FEAT_MBYTE +*************** +*** 1145,1151 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"fileencodings","fencs", P_STRING|P_VI_DEF|P_ONECOMMA, + #ifdef FEAT_MBYTE + (char_u *)&p_fencs, PV_NONE, +--- 1145,1151 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"fileencodings","fencs", P_STRING|P_VI_DEF|P_ONECOMMA, + #ifdef FEAT_MBYTE + (char_u *)&p_fencs, PV_NONE, +*************** +*** 1154,1168 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC + |P_CURSWANT, + (char_u *)&p_ff, PV_FF, +! {(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT}, + {"fileformats", "ffs", P_STRING|P_VIM|P_ONECOMMA|P_NODUP, + (char_u *)&p_ffs, PV_NONE, + {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM} +! SCRIPTID_INIT}, + {"fileignorecase", "fic", P_BOOL|P_VI_DEF, + (char_u *)&p_fic, PV_NONE, + { +--- 1154,1168 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC + |P_CURSWANT, + (char_u *)&p_ff, PV_FF, +! {(char_u *)DFLT_FF, (char_u *)0L} SCTX_INIT}, + {"fileformats", "ffs", P_STRING|P_VIM|P_ONECOMMA|P_NODUP, + (char_u *)&p_ffs, PV_NONE, + {(char_u *)DFLT_FFS_VI, (char_u *)DFLT_FFS_VIM} +! SCTX_INIT}, + {"fileignorecase", "fic", P_BOOL|P_VI_DEF, + (char_u *)&p_fic, PV_NONE, + { +*************** +*** 1171,1198 **** + #else + (char_u *)FALSE, + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME, + (char_u *)&p_ft, PV_FT, + {(char_u *)"", (char_u *)0L} +! SCRIPTID_INIT}, + {"fillchars", "fcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP, + (char_u *)&p_fcs, PV_NONE, + {(char_u *)"vert:|,fold:-", (char_u *)0L} +! SCRIPTID_INIT}, + {"fixendofline", "fixeol", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)&p_fixeol, PV_FIXEOL, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"fkmap", "fk", P_BOOL|P_VI_DEF, + #ifdef FEAT_FKMAP + (char_u *)&p_fkmap, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"flash", "fl", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"foldclose", "fcl", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)&p_fcl, PV_NONE, +--- 1171,1198 ---- + #else + (char_u *)FALSE, + #endif +! (char_u *)0L} SCTX_INIT}, + {"filetype", "ft", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME, + (char_u *)&p_ft, PV_FT, + {(char_u *)"", (char_u *)0L} +! SCTX_INIT}, + {"fillchars", "fcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP, + (char_u *)&p_fcs, PV_NONE, + {(char_u *)"vert:|,fold:-", (char_u *)0L} +! SCTX_INIT}, + {"fixendofline", "fixeol", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)&p_fixeol, PV_FIXEOL, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"fkmap", "fk", P_BOOL|P_VI_DEF, + #ifdef FEAT_FKMAP + (char_u *)&p_fkmap, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"flash", "fl", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"foldclose", "fcl", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)&p_fcl, PV_NONE, +*************** +*** 1201,1207 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldcolumn", "fdc", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDC, +--- 1201,1207 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldcolumn", "fdc", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDC, +*************** +*** 1210,1216 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldenable", "fen", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FEN, +--- 1210,1216 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldenable", "fen", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FEN, +*************** +*** 1219,1225 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #if defined(FEAT_FOLDING) && defined(FEAT_EVAL) + (char_u *)VAR_WIN, PV_FDE, +--- 1219,1225 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldexpr", "fde", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #if defined(FEAT_FOLDING) && defined(FEAT_EVAL) + (char_u *)VAR_WIN, PV_FDE, +*************** +*** 1228,1234 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldignore", "fdi", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDI, +--- 1228,1234 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldignore", "fdi", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDI, +*************** +*** 1237,1243 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDL, +--- 1237,1243 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDL, +*************** +*** 1246,1252 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_FOLDING + (char_u *)&p_fdls, PV_NONE, +--- 1246,1252 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_FOLDING + (char_u *)&p_fdls, PV_NONE, +*************** +*** 1255,1261 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF| + P_RWIN|P_ONECOMMA|P_NODUP, + #ifdef FEAT_FOLDING +--- 1255,1261 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF| + P_RWIN|P_ONECOMMA|P_NODUP, + #ifdef FEAT_FOLDING +*************** +*** 1265,1271 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldmethod", "fdm", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDM, +--- 1265,1271 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldmethod", "fdm", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDM, +*************** +*** 1274,1280 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldminlines","fml", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FML, +--- 1274,1280 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldminlines","fml", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FML, +*************** +*** 1283,1289 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDN, +--- 1283,1289 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN, + #ifdef FEAT_FOLDING + (char_u *)VAR_WIN, PV_FDN, +*************** +*** 1292,1298 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldopen", "fdo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_CURSWANT, + #ifdef FEAT_FOLDING + (char_u *)&p_fdo, PV_NONE, +--- 1292,1298 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldopen", "fdo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_CURSWANT, + #ifdef FEAT_FOLDING + (char_u *)&p_fdo, PV_NONE, +*************** +*** 1302,1308 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #if defined(FEAT_FOLDING) && defined(FEAT_EVAL) + (char_u *)VAR_WIN, PV_FDT, +--- 1302,1308 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"foldtext", "fdt", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|P_RWIN, + #if defined(FEAT_FOLDING) && defined(FEAT_EVAL) + (char_u *)VAR_WIN, PV_FDT, +*************** +*** 1311,1317 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, + #ifdef FEAT_EVAL + (char_u *)&p_fex, PV_FEX, +--- 1311,1317 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"formatexpr", "fex", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, + #ifdef FEAT_EVAL + (char_u *)&p_fex, PV_FEX, +*************** +*** 1320,1337 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"formatoptions","fo", P_STRING|P_ALLOCED|P_VIM|P_FLAGLIST, + (char_u *)&p_fo, PV_FO, + {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM} +! SCRIPTID_INIT}, + {"formatlistpat","flp", P_STRING|P_ALLOCED|P_VI_DEF, + (char_u *)&p_flp, PV_FLP, + {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*", +! (char_u *)0L} SCRIPTID_INIT}, + {"formatprg", "fp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_fp, PV_FP, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"fsync", "fs", P_BOOL|P_SECURE|P_VI_DEF, + #ifdef HAVE_FSYNC + (char_u *)&p_fs, PV_NONE, +--- 1320,1337 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"formatoptions","fo", P_STRING|P_ALLOCED|P_VIM|P_FLAGLIST, + (char_u *)&p_fo, PV_FO, + {(char_u *)DFLT_FO_VI, (char_u *)DFLT_FO_VIM} +! SCTX_INIT}, + {"formatlistpat","flp", P_STRING|P_ALLOCED|P_VI_DEF, + (char_u *)&p_flp, PV_FLP, + {(char_u *)"^\\s*\\d\\+[\\]:.)}\\t ]\\s*", +! (char_u *)0L} SCTX_INIT}, + {"formatprg", "fp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_fp, PV_FP, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"fsync", "fs", P_BOOL|P_SECURE|P_VI_DEF, + #ifdef HAVE_FSYNC + (char_u *)&p_fs, PV_NONE, +*************** +*** 1340,1352 **** + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"gdefault", "gd", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_gd, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"graphic", "gr", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"grepformat", "gfm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_QUICKFIX + (char_u *)&p_gefm, PV_NONE, +--- 1340,1352 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} + #endif +! SCTX_INIT}, + {"gdefault", "gd", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_gd, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"graphic", "gr", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"grepformat", "gfm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_QUICKFIX + (char_u *)&p_gefm, PV_NONE, +*************** +*** 1355,1361 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"grepprg", "gp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_gp, PV_GP, +--- 1355,1361 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"grepprg", "gp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_gp, PV_GP, +*************** +*** 1381,1387 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef CURSOR_SHAPE + (char_u *)&p_guicursor, PV_NONE, +--- 1381,1387 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef CURSOR_SHAPE + (char_u *)&p_guicursor, PV_NONE, +*************** +*** 1396,1402 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP, + #ifdef FEAT_GUI + (char_u *)&p_guifont, PV_NONE, +--- 1396,1402 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"guifont", "gfn", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP, + #ifdef FEAT_GUI + (char_u *)&p_guifont, PV_NONE, +*************** +*** 1405,1411 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"guifontset", "gfs", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA, + #if defined(FEAT_GUI) && defined(FEAT_XFONTSET) + (char_u *)&p_guifontset, PV_NONE, +--- 1405,1411 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"guifontset", "gfs", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA, + #if defined(FEAT_GUI) && defined(FEAT_XFONTSET) + (char_u *)&p_guifontset, PV_NONE, +*************** +*** 1414,1420 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP, + #if defined(FEAT_GUI) && defined(FEAT_MBYTE) + (char_u *)&p_guifontwide, PV_NONE, +--- 1414,1420 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"guifontwide", "gfw", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP, + #if defined(FEAT_GUI) && defined(FEAT_MBYTE) + (char_u *)&p_guifontwide, PV_NONE, +*************** +*** 1423,1436 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"guiheadroom", "ghr", P_NUM|P_VI_DEF, + #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) + (char_u *)&p_ghr, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)50L, (char_u *)0L} SCRIPTID_INIT}, + {"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST, + #if defined(FEAT_GUI) + (char_u *)&p_go, PV_NONE, +--- 1423,1436 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"guiheadroom", "ghr", P_NUM|P_VI_DEF, + #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) + (char_u *)&p_ghr, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)50L, (char_u *)0L} SCTX_INIT}, + {"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST, + #if defined(FEAT_GUI) + (char_u *)&p_go, PV_NONE, +*************** +*** 1443,1456 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"guipty", NULL, P_BOOL|P_VI_DEF, + #if defined(FEAT_GUI) + (char_u *)&p_guipty, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"guitablabel", "gtl", P_STRING|P_VI_DEF|P_RWIN, + #if defined(FEAT_GUI_TABLINE) + (char_u *)&p_gtl, PV_NONE, +--- 1443,1456 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"guipty", NULL, P_BOOL|P_VI_DEF, + #if defined(FEAT_GUI) + (char_u *)&p_guipty, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"guitablabel", "gtl", P_STRING|P_VI_DEF|P_RWIN, + #if defined(FEAT_GUI_TABLINE) + (char_u *)&p_gtl, PV_NONE, +*************** +*** 1459,1465 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN, + #if defined(FEAT_GUI_TABLINE) + (char_u *)&p_gtt, PV_NONE, +--- 1459,1465 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN, + #if defined(FEAT_GUI_TABLINE) + (char_u *)&p_gtt, PV_NONE, +*************** +*** 1468,1484 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"hardtabs", "ht", P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"helpfile", "hf", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_hf, PV_NONE, + {(char_u *)DFLT_HELPFILE, (char_u *)0L} +! SCRIPTID_INIT}, + {"helpheight", "hh", P_NUM|P_VI_DEF, + (char_u *)&p_hh, PV_NONE, +! {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT}, + {"helplang", "hlg", P_STRING|P_VI_DEF|P_ONECOMMA, + #ifdef FEAT_MULTI_LANG + (char_u *)&p_hlg, PV_NONE, +--- 1468,1484 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"hardtabs", "ht", P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"helpfile", "hf", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_hf, PV_NONE, + {(char_u *)DFLT_HELPFILE, (char_u *)0L} +! SCTX_INIT}, + {"helpheight", "hh", P_NUM|P_VI_DEF, + (char_u *)&p_hh, PV_NONE, +! {(char_u *)20L, (char_u *)0L} SCTX_INIT}, + {"helplang", "hlg", P_STRING|P_VI_DEF|P_ONECOMMA, + #ifdef FEAT_MULTI_LANG + (char_u *)&p_hlg, PV_NONE, +*************** +*** 1487,1537 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"hidden", "hid", P_BOOL|P_VI_DEF, + (char_u *)&p_hid, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP, + (char_u *)&p_hl, PV_NONE, + {(char_u *)HIGHLIGHT_INIT, (char_u *)0L} +! SCRIPTID_INIT}, + {"history", "hi", P_NUM|P_VIM, + (char_u *)&p_hi, PV_NONE, +! {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT}, + {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_hkmap, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"hkmapp", "hkp", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_hkmapp, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"hlsearch", "hls", P_BOOL|P_VI_DEF|P_VIM|P_RALL, + (char_u *)&p_hls, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"icon", NULL, P_BOOL|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_icon, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"iconstring", NULL, P_STRING|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_iconstring, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"ignorecase", "ic", P_BOOL|P_VI_DEF, + (char_u *)&p_ic, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_EVAL) && defined(FEAT_MBYTE) + (char_u *)&p_imaf, PV_NONE, +--- 1487,1537 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"hidden", "hid", P_BOOL|P_VI_DEF, + (char_u *)&p_hid, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_ONECOMMA|P_NODUP, + (char_u *)&p_hl, PV_NONE, + {(char_u *)HIGHLIGHT_INIT, (char_u *)0L} +! SCTX_INIT}, + {"history", "hi", P_NUM|P_VIM, + (char_u *)&p_hi, PV_NONE, +! {(char_u *)0L, (char_u *)50L} SCTX_INIT}, + {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_hkmap, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"hkmapp", "hkp", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_hkmapp, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"hlsearch", "hls", P_BOOL|P_VI_DEF|P_VIM|P_RALL, + (char_u *)&p_hls, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"icon", NULL, P_BOOL|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_icon, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"iconstring", NULL, P_STRING|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_iconstring, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"ignorecase", "ic", P_BOOL|P_VI_DEF, + (char_u *)&p_ic, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"imactivatefunc","imaf",P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_EVAL) && defined(FEAT_MBYTE) + (char_u *)&p_imaf, PV_NONE, +*************** +*** 1540,1560 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + # endif +! SCRIPTID_INIT}, + {"imactivatekey","imak",P_STRING|P_VI_DEF, + #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) + (char_u *)&p_imak, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"imcmdline", "imc", P_BOOL|P_VI_DEF, + #ifdef FEAT_MBYTE + (char_u *)&p_imcmdline, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"imdisable", "imd", P_BOOL|P_VI_DEF, + #ifdef FEAT_MBYTE + (char_u *)&p_imdisable, PV_NONE, +--- 1540,1560 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + # endif +! SCTX_INIT}, + {"imactivatekey","imak",P_STRING|P_VI_DEF, + #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) + (char_u *)&p_imak, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"imcmdline", "imc", P_BOOL|P_VI_DEF, + #ifdef FEAT_MBYTE + (char_u *)&p_imcmdline, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"imdisable", "imd", P_BOOL|P_VI_DEF, + #ifdef FEAT_MBYTE + (char_u *)&p_imdisable, PV_NONE, +*************** +*** 1566,1580 **** + #else + {(char_u *)FALSE, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"iminsert", "imi", P_NUM|P_VI_DEF, + (char_u *)&p_iminsert, PV_IMI, + {(char_u *)B_IMODE_NONE, (char_u *)0L} +! SCRIPTID_INIT}, + {"imsearch", "ims", P_NUM|P_VI_DEF, + (char_u *)&p_imsearch, PV_IMS, + {(char_u *)B_IMODE_USE_INSERT, (char_u *)0L} +! SCRIPTID_INIT}, + {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_EVAL) && defined(FEAT_MBYTE) + (char_u *)&p_imsf, PV_NONE, +--- 1566,1580 ---- + #else + {(char_u *)FALSE, (char_u *)0L} + #endif +! SCTX_INIT}, + {"iminsert", "imi", P_NUM|P_VI_DEF, + (char_u *)&p_iminsert, PV_IMI, + {(char_u *)B_IMODE_NONE, (char_u *)0L} +! SCTX_INIT}, + {"imsearch", "ims", P_NUM|P_VI_DEF, + (char_u *)&p_imsearch, PV_IMS, + {(char_u *)B_IMODE_USE_INSERT, (char_u *)0L} +! SCTX_INIT}, + {"imstatusfunc","imsf",P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_EVAL) && defined(FEAT_MBYTE) + (char_u *)&p_imsf, PV_NONE, +*************** +*** 1583,1589 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"imstyle", "imst", P_NUM|P_VI_DEF|P_SECURE, + #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) + (char_u *)&p_imst, PV_NONE, +--- 1583,1589 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"imstyle", "imst", P_NUM|P_VI_DEF|P_SECURE, + #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) + (char_u *)&p_imst, PV_NONE, +*************** +*** 1592,1598 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"include", "inc", P_STRING|P_ALLOCED|P_VI_DEF, + #ifdef FEAT_FIND_ID + (char_u *)&p_inc, PV_INC, +--- 1592,1598 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"include", "inc", P_STRING|P_ALLOCED|P_VI_DEF, + #ifdef FEAT_FIND_ID + (char_u *)&p_inc, PV_INC, +*************** +*** 1601,1607 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF, + #if defined(FEAT_FIND_ID) && defined(FEAT_EVAL) + (char_u *)&p_inex, PV_INEX, +--- 1601,1607 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"includeexpr", "inex", P_STRING|P_ALLOCED|P_VI_DEF, + #if defined(FEAT_FIND_ID) && defined(FEAT_EVAL) + (char_u *)&p_inex, PV_INEX, +*************** +*** 1610,1619 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"incsearch", "is", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_is, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"indentexpr", "inde", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, + #if defined(FEAT_CINDENT) && defined(FEAT_EVAL) + (char_u *)&p_inde, PV_INDE, +--- 1610,1619 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"incsearch", "is", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_is, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"indentexpr", "inde", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, + #if defined(FEAT_CINDENT) && defined(FEAT_EVAL) + (char_u *)&p_inde, PV_INDE, +*************** +*** 1622,1628 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"indentkeys", "indk", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #if defined(FEAT_CINDENT) && defined(FEAT_EVAL) + (char_u *)&p_indk, PV_INDK, +--- 1622,1628 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"indentkeys", "indk", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + #if defined(FEAT_CINDENT) && defined(FEAT_EVAL) + (char_u *)&p_indk, PV_INDK, +*************** +*** 1631,1643 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"infercase", "inf", P_BOOL|P_VI_DEF, + (char_u *)&p_inf, PV_INF, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"insertmode", "im", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_im, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"isfname", "isf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_isf, PV_NONE, + { +--- 1631,1643 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"infercase", "inf", P_BOOL|P_VI_DEF, + (char_u *)&p_inf, PV_INF, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"insertmode", "im", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_im, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"isfname", "isf", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_isf, PV_NONE, + { +*************** +*** 1660,1666 **** + # endif + # endif + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_isi, PV_NONE, + { +--- 1660,1666 ---- + # endif + # endif + #endif +! (char_u *)0L} SCTX_INIT}, + {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_isi, PV_NONE, + { +*************** +*** 1677,1683 **** + (char_u *)"@,48-57,_,192-255", + # endif + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"iskeyword", "isk", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP, + (char_u *)&p_isk, PV_ISK, + { +--- 1677,1683 ---- + (char_u *)"@,48-57,_,192-255", + # endif + #endif +! (char_u *)0L} SCTX_INIT}, + {"iskeyword", "isk", P_STRING|P_ALLOCED|P_VIM|P_COMMA|P_NODUP, + (char_u *)&p_isk, PV_ISK, + { +*************** +*** 1696,1702 **** + ISK_LATIN1 + # endif + #endif +! } SCRIPTID_INIT}, + {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP, + (char_u *)&p_isp, PV_NONE, + { +--- 1696,1702 ---- + ISK_LATIN1 + # endif + #endif +! } SCTX_INIT}, + {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP, + (char_u *)&p_isp, PV_NONE, + { +*************** +*** 1710,1719 **** + ISP_LATIN1, + # endif + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"joinspaces", "js", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_js, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"key", NULL, P_STRING|P_ALLOCED|P_VI_DEF|P_NO_MKRC, + #ifdef FEAT_CRYPT + (char_u *)&p_key, PV_KEY, +--- 1710,1719 ---- + ISP_LATIN1, + # endif + #endif +! (char_u *)0L} SCTX_INIT}, + {"joinspaces", "js", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_js, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"key", NULL, P_STRING|P_ALLOCED|P_VI_DEF|P_NO_MKRC, + #ifdef FEAT_CRYPT + (char_u *)&p_key, PV_KEY, +*************** +*** 1722,1728 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|P_PRI_MKRC, + #ifdef FEAT_KEYMAP + (char_u *)&p_keymap, PV_KMAP, +--- 1722,1728 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"keymap", "kmp", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_RSTAT|P_NFNAME|P_PRI_MKRC, + #ifdef FEAT_KEYMAP + (char_u *)&p_keymap, PV_KMAP, +*************** +*** 1731,1740 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"keymodel", "km", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_km, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_kp, PV_KP, + { +--- 1731,1740 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCTX_INIT}, + {"keymodel", "km", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_km, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_kp, PV_KP, + { +*************** +*** 1751,1757 **** + # endif + # endif + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE, + #ifdef FEAT_LANGMAP + (char_u *)&p_langmap, PV_NONE, +--- 1751,1757 ---- + # endif + # endif + #endif +! (char_u *)0L} SCTX_INIT}, + {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE, + #ifdef FEAT_LANGMAP + (char_u *)&p_langmap, PV_NONE, +*************** +*** 1760,1800 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME, + #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG) + (char_u *)&p_lm, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"langnoremap", "lnr", P_BOOL|P_VI_DEF, + #ifdef FEAT_LANGMAP + (char_u *)&p_lnr, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"langremap", "lrm", P_BOOL|P_VI_DEF, + #ifdef FEAT_LANGMAP + (char_u *)&p_lrm, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL, + (char_u *)&p_ls, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {"lazyredraw", "lz", P_BOOL|P_VI_DEF, + (char_u *)&p_lz, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"linebreak", "lbr", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_LINEBREAK + (char_u *)VAR_WIN, PV_LBR, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR, + (char_u *)&Rows, PV_NONE, + { +--- 1760,1800 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, + #endif +! (char_u *)0L} SCTX_INIT}, + {"langmenu", "lm", P_STRING|P_VI_DEF|P_NFNAME, + #if defined(FEAT_MENU) && defined(FEAT_MULTI_LANG) + (char_u *)&p_lm, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"langnoremap", "lnr", P_BOOL|P_VI_DEF, + #ifdef FEAT_LANGMAP + (char_u *)&p_lnr, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"langremap", "lrm", P_BOOL|P_VI_DEF, + #ifdef FEAT_LANGMAP + (char_u *)&p_lrm, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL, + (char_u *)&p_ls, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCTX_INIT}, + {"lazyredraw", "lz", P_BOOL|P_VI_DEF, + (char_u *)&p_lz, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"linebreak", "lbr", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_LINEBREAK + (char_u *)VAR_WIN, PV_LBR, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR, + (char_u *)&Rows, PV_NONE, + { +*************** +*** 1803,1809 **** + #else + (char_u *)24L, + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"linespace", "lsp", P_NUM|P_VI_DEF|P_RCLR, + #ifdef FEAT_GUI + (char_u *)&p_linespace, PV_NONE, +--- 1803,1809 ---- + #else + (char_u *)24L, + #endif +! (char_u *)0L} SCTX_INIT}, + {"linespace", "lsp", P_NUM|P_VI_DEF|P_RCLR, + #ifdef FEAT_GUI + (char_u *)&p_linespace, PV_NONE, +*************** +*** 1815,1828 **** + #else + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"lisp", NULL, P_BOOL|P_VI_DEF, + #ifdef FEAT_LISP + (char_u *)&p_lisp, PV_LISP, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"lispwords", "lw", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_LISP + (char_u *)&p_lispwords, PV_LW, +--- 1815,1828 ---- + #else + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"lisp", NULL, P_BOOL|P_VI_DEF, + #ifdef FEAT_LISP + (char_u *)&p_lisp, PV_LISP, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"lispwords", "lw", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_LISP + (char_u *)&p_lispwords, PV_LW, +*************** +*** 1831,1846 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"list", NULL, P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_LIST, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"listchars", "lcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP, + (char_u *)&p_lcs, PV_NONE, +! {(char_u *)"eol:$", (char_u *)0L} SCRIPTID_INIT}, + {"loadplugins", "lpl", P_BOOL|P_VI_DEF, + (char_u *)&p_lpl, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"luadll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_LUA) + (char_u *)&p_luadll, PV_NONE, +--- 1831,1846 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCTX_INIT}, + {"list", NULL, P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_LIST, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"listchars", "lcs", P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP, + (char_u *)&p_lcs, PV_NONE, +! {(char_u *)"eol:$", (char_u *)0L} SCTX_INIT}, + {"loadplugins", "lpl", P_BOOL|P_VI_DEF, + (char_u *)&p_lpl, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"luadll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_LUA) + (char_u *)&p_luadll, PV_NONE, +*************** +*** 1849,1855 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR, + #ifdef FEAT_GUI_MAC + (char_u *)&p_macatsui, PV_NONE, +--- 1849,1855 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCTX_INIT}, + {"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR, + #ifdef FEAT_GUI_MAC + (char_u *)&p_macatsui, PV_NONE, +*************** +*** 1858,1867 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"magic", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_magic, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"makeef", "mef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_mef, PV_NONE, +--- 1858,1867 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCTX_INIT}, + {"magic", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_magic, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"makeef", "mef", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_mef, PV_NONE, +*************** +*** 1870,1876 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"makeencoding","menc", P_STRING|P_VI_DEF, + #ifdef FEAT_MBYTE + (char_u *)&p_menc, PV_MENC, +--- 1870,1876 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"makeencoding","menc", P_STRING|P_VI_DEF, + #ifdef FEAT_MBYTE + (char_u *)&p_menc, PV_MENC, +*************** +*** 1879,1885 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"makeprg", "mp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_mp, PV_MP, +--- 1879,1885 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"makeprg", "mp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_mp, PV_MP, +*************** +*** 1892,1943 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"matchpairs", "mps", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_mps, PV_MPS, + {(char_u *)"(:),{:},[:]", (char_u *)0L} +! SCRIPTID_INIT}, + {"matchtime", "mat", P_NUM|P_VI_DEF, + (char_u *)&p_mat, PV_NONE, +! {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT}, + {"maxcombine", "mco", P_NUM|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_MBYTE + (char_u *)&p_mco, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)2, (char_u *)0L} SCRIPTID_INIT}, + {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF, + #ifdef FEAT_EVAL + (char_u *)&p_mfd, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)100L, (char_u *)0L} SCRIPTID_INIT}, + {"maxmapdepth", "mmd", P_NUM|P_VI_DEF, + (char_u *)&p_mmd, PV_NONE, +! {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT}, + {"maxmem", "mm", P_NUM|P_VI_DEF, + (char_u *)&p_mm, PV_NONE, + {(char_u *)DFLT_MAXMEM, (char_u *)0L} +! SCRIPTID_INIT}, + {"maxmempattern","mmp", P_NUM|P_VI_DEF, + (char_u *)&p_mmp, PV_NONE, +! {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT}, + {"maxmemtot", "mmt", P_NUM|P_VI_DEF, + (char_u *)&p_mmt, PV_NONE, + {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L} +! SCRIPTID_INIT}, + {"menuitems", "mis", P_NUM|P_VI_DEF, + #ifdef FEAT_MENU + (char_u *)&p_mis, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)25L, (char_u *)0L} SCRIPTID_INIT}, + {"mesg", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE, + #ifdef FEAT_SPELL + (char_u *)&p_msm, PV_NONE, +--- 1892,1943 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"matchpairs", "mps", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_mps, PV_MPS, + {(char_u *)"(:),{:},[:]", (char_u *)0L} +! SCTX_INIT}, + {"matchtime", "mat", P_NUM|P_VI_DEF, + (char_u *)&p_mat, PV_NONE, +! {(char_u *)5L, (char_u *)0L} SCTX_INIT}, + {"maxcombine", "mco", P_NUM|P_VI_DEF|P_CURSWANT, + #ifdef FEAT_MBYTE + (char_u *)&p_mco, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)2, (char_u *)0L} SCTX_INIT}, + {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF, + #ifdef FEAT_EVAL + (char_u *)&p_mfd, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)100L, (char_u *)0L} SCTX_INIT}, + {"maxmapdepth", "mmd", P_NUM|P_VI_DEF, + (char_u *)&p_mmd, PV_NONE, +! {(char_u *)1000L, (char_u *)0L} SCTX_INIT}, + {"maxmem", "mm", P_NUM|P_VI_DEF, + (char_u *)&p_mm, PV_NONE, + {(char_u *)DFLT_MAXMEM, (char_u *)0L} +! SCTX_INIT}, + {"maxmempattern","mmp", P_NUM|P_VI_DEF, + (char_u *)&p_mmp, PV_NONE, +! {(char_u *)1000L, (char_u *)0L} SCTX_INIT}, + {"maxmemtot", "mmt", P_NUM|P_VI_DEF, + (char_u *)&p_mmt, PV_NONE, + {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L} +! SCTX_INIT}, + {"menuitems", "mis", P_NUM|P_VI_DEF, + #ifdef FEAT_MENU + (char_u *)&p_mis, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)25L, (char_u *)0L} SCTX_INIT}, + {"mesg", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE, + #ifdef FEAT_SPELL + (char_u *)&p_msm, PV_NONE, +*************** +*** 1946,1967 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"modeline", "ml", P_BOOL|P_VIM, + (char_u *)&p_ml, PV_ML, +! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, + {"modelines", "mls", P_NUM|P_VI_DEF, + (char_u *)&p_mls, PV_NONE, +! {(char_u *)5L, (char_u *)0L} SCRIPTID_INIT}, + {"modifiable", "ma", P_BOOL|P_VI_DEF|P_NOGLOB, + (char_u *)&p_ma, PV_MA, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, + (char_u *)&p_mod, PV_MOD, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"more", NULL, P_BOOL|P_VIM, + (char_u *)&p_more, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, + {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST, + (char_u *)&p_mouse, PV_NONE, + { +--- 1946,1967 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"modeline", "ml", P_BOOL|P_VIM, + (char_u *)&p_ml, PV_ML, +! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, + {"modelines", "mls", P_NUM|P_VI_DEF, + (char_u *)&p_mls, PV_NONE, +! {(char_u *)5L, (char_u *)0L} SCTX_INIT}, + {"modifiable", "ma", P_BOOL|P_VI_DEF|P_NOGLOB, + (char_u *)&p_ma, PV_MA, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"modified", "mod", P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, + (char_u *)&p_mod, PV_MOD, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"more", NULL, P_BOOL|P_VIM, + (char_u *)&p_more, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, + {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST, + (char_u *)&p_mouse, PV_NONE, + { +*************** +*** 1970,1990 **** + #else + (char_u *)"", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"mousefocus", "mousef", P_BOOL|P_VI_DEF, + #ifdef FEAT_GUI + (char_u *)&p_mousef, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"mousehide", "mh", P_BOOL|P_VI_DEF, + #ifdef FEAT_GUI + (char_u *)&p_mh, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"mousemodel", "mousem", P_STRING|P_VI_DEF, + (char_u *)&p_mousem, PV_NONE, + { +--- 1970,1990 ---- + #else + (char_u *)"", + #endif +! (char_u *)0L} SCTX_INIT}, + {"mousefocus", "mousef", P_BOOL|P_VI_DEF, + #ifdef FEAT_GUI + (char_u *)&p_mousef, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"mousehide", "mh", P_BOOL|P_VI_DEF, + #ifdef FEAT_GUI + (char_u *)&p_mh, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"mousemodel", "mousem", P_STRING|P_VI_DEF, + (char_u *)&p_mousem, PV_NONE, + { +*************** +*** 1997,2003 **** + (char_u *)"extend", + # endif + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_MOUSESHAPE + (char_u *)&p_mouseshape, PV_NONE, +--- 1997,2003 ---- + (char_u *)"extend", + # endif + #endif +! (char_u *)0L} SCTX_INIT}, + {"mouseshape", "mouses", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_MOUSESHAPE + (char_u *)&p_mouseshape, PV_NONE, +*************** +*** 2006,2015 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"mousetime", "mouset", P_NUM|P_VI_DEF, + (char_u *)&p_mouset, PV_NONE, +! {(char_u *)500L, (char_u *)0L} SCRIPTID_INIT}, + {"mzschemedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_MZSCHEME) + (char_u *)&p_mzschemedll, PV_NONE, +--- 2006,2015 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"mousetime", "mouset", P_NUM|P_VI_DEF, + (char_u *)&p_mouset, PV_NONE, +! {(char_u *)500L, (char_u *)0L} SCTX_INIT}, + {"mzschemedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_MZSCHEME) + (char_u *)&p_mzschemedll, PV_NONE, +*************** +*** 2018,2024 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"mzschemegcdll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_MZSCHEME) + (char_u *)&p_mzschemegcdll, PV_NONE, +--- 2018,2024 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCTX_INIT}, + {"mzschemegcdll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_MZSCHEME) + (char_u *)&p_mzschemegcdll, PV_NONE, +*************** +*** 2027,2057 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"mzquantum", "mzq", P_NUM, + #ifdef FEAT_MZSCHEME + (char_u *)&p_mzq, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)100L, (char_u *)100L} SCRIPTID_INIT}, + {"novice", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"nrformats", "nf", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_nf, PV_NF, + {(char_u *)"bin,octal,hex", (char_u *)0L} +! SCRIPTID_INIT}, + {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_NU, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM, + #ifdef FEAT_LINEBREAK + (char_u *)VAR_WIN, PV_NUW, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)8L, (char_u *)4L} SCRIPTID_INIT}, + {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, + #ifdef FEAT_COMPL_FUNC + (char_u *)&p_ofu, PV_OFU, +--- 2027,2057 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)0L} + #endif +! SCTX_INIT}, + {"mzquantum", "mzq", P_NUM, + #ifdef FEAT_MZSCHEME + (char_u *)&p_mzq, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)100L, (char_u *)100L} SCTX_INIT}, + {"novice", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"nrformats", "nf", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_nf, PV_NF, + {(char_u *)"bin,octal,hex", (char_u *)0L} +! SCTX_INIT}, + {"number", "nu", P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_NU, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"numberwidth", "nuw", P_NUM|P_RWIN|P_VIM, + #ifdef FEAT_LINEBREAK + (char_u *)VAR_WIN, PV_NUW, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)8L, (char_u *)4L} SCTX_INIT}, + {"omnifunc", "ofu", P_STRING|P_ALLOCED|P_VI_DEF|P_SECURE, + #ifdef FEAT_COMPL_FUNC + (char_u *)&p_ofu, PV_OFU, +*************** +*** 2060,2069 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"open", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"opendevice", "odev", P_BOOL|P_VI_DEF, + #if defined(MSWIN) + (char_u *)&p_odev, PV_NONE, +--- 2060,2069 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"open", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"opendevice", "odev", P_BOOL|P_VI_DEF, + #if defined(MSWIN) + (char_u *)&p_odev, PV_NONE, +*************** +*** 2071,2101 **** + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)FALSE, (char_u *)FALSE} +! SCRIPTID_INIT}, + {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_opfunc, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"optimize", "opt", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"packpath", "pp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP + |P_SECURE, + (char_u *)&p_pp, PV_NONE, + {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L} +! SCRIPTID_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +! (char_u *)0L} SCRIPTID_INIT}, + {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC, + (char_u *)&p_paste, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"pastetoggle", "pt", P_STRING|P_VI_DEF, + (char_u *)&p_pt, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"patchexpr", "pex", P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_DIFF) && defined(FEAT_EVAL) + (char_u *)&p_pex, PV_NONE, +--- 2071,2101 ---- + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)FALSE, (char_u *)FALSE} +! SCTX_INIT}, + {"operatorfunc", "opfunc", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_opfunc, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"optimize", "opt", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"packpath", "pp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP + |P_SECURE, + (char_u *)&p_pp, PV_NONE, + {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L} +! SCTX_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +! (char_u *)0L} SCTX_INIT}, + {"paste", NULL, P_BOOL|P_VI_DEF|P_PRI_MKRC, + (char_u *)&p_paste, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"pastetoggle", "pt", P_STRING|P_VI_DEF, + (char_u *)&p_pt, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"patchexpr", "pex", P_STRING|P_VI_DEF|P_SECURE, + #if defined(FEAT_DIFF) && defined(FEAT_EVAL) + (char_u *)&p_pex, PV_NONE, +*************** +*** 2104,2113 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME, + (char_u *)&p_pm, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_path, PV_PATH, + { +--- 2104,2113 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"patchmode", "pm", P_STRING|P_VI_DEF|P_NFNAME, + (char_u *)&p_pm, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP, + (char_u *)&p_path, PV_PATH, + { +*************** +*** 2116,2122 **** + #else + (char_u *)".,/usr/include,,", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"perldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_PERL) + (char_u *)&p_perldll, PV_NONE, +--- 2116,2122 ---- + #else + (char_u *)".,/usr/include,,", + #endif +! (char_u *)0L} SCTX_INIT}, + {"perldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_PERL) + (char_u *)&p_perldll, PV_NONE, +*************** +*** 2125,2148 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_pi, PV_PI, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"previewheight", "pvh", P_NUM|P_VI_DEF, + #if defined(FEAT_QUICKFIX) + (char_u *)&p_pvh, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)12L, (char_u *)0L} SCRIPTID_INIT}, + {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB, + #if defined(FEAT_QUICKFIX) + (char_u *)VAR_WIN, PV_PVW, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE, + #ifdef FEAT_PRINTER + (char_u *)&p_pdev, PV_NONE, +--- 2125,2148 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_pi, PV_PI, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"previewheight", "pvh", P_NUM|P_VI_DEF, + #if defined(FEAT_QUICKFIX) + (char_u *)&p_pvh, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)12L, (char_u *)0L} SCTX_INIT}, + {"previewwindow", "pvw", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB, + #if defined(FEAT_QUICKFIX) + (char_u *)VAR_WIN, PV_PVW, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"printdevice", "pdev", P_STRING|P_VI_DEF|P_SECURE, + #ifdef FEAT_PRINTER + (char_u *)&p_pdev, PV_NONE, +*************** +*** 2151,2157 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"printencoding", "penc", P_STRING|P_VI_DEF, + #ifdef FEAT_POSTSCRIPT + (char_u *)&p_penc, PV_NONE, +--- 2151,2157 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"printencoding", "penc", P_STRING|P_VI_DEF, + #ifdef FEAT_POSTSCRIPT + (char_u *)&p_penc, PV_NONE, +*************** +*** 2160,2166 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE, + #ifdef FEAT_POSTSCRIPT + (char_u *)&p_pexpr, PV_NONE, +--- 2160,2166 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"printexpr", "pexpr", P_STRING|P_VI_DEF|P_SECURE, + #ifdef FEAT_POSTSCRIPT + (char_u *)&p_pexpr, PV_NONE, +*************** +*** 2169,2175 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"printfont", "pfn", P_STRING|P_VI_DEF, + #ifdef FEAT_PRINTER + (char_u *)&p_pfn, PV_NONE, +--- 2169,2175 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"printfont", "pfn", P_STRING|P_VI_DEF, + #ifdef FEAT_PRINTER + (char_u *)&p_pfn, PV_NONE, +*************** +*** 2184,2190 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT, + #ifdef FEAT_PRINTER + (char_u *)&p_header, PV_NONE, +--- 2184,2190 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"printheader", "pheader", P_STRING|P_VI_DEF|P_GETTEXT, + #ifdef FEAT_PRINTER + (char_u *)&p_header, PV_NONE, +*************** +*** 2195,2201 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF, + #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE) + (char_u *)&p_pmcs, PV_NONE, +--- 2195,2201 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"printmbcharset", "pmbcs", P_STRING|P_VI_DEF, + #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE) + (char_u *)&p_pmcs, PV_NONE, +*************** +*** 2204,2210 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"printmbfont", "pmbfn", P_STRING|P_VI_DEF, + #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE) + (char_u *)&p_pmfn, PV_NONE, +--- 2204,2210 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"printmbfont", "pmbfn", P_STRING|P_VI_DEF, + #if defined(FEAT_POSTSCRIPT) && defined(FEAT_MBYTE) + (char_u *)&p_pmfn, PV_NONE, +*************** +*** 2213,2219 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"printoptions", "popt", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_PRINTER + (char_u *)&p_popt, PV_NONE, +--- 2213,2219 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"printoptions", "popt", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_PRINTER + (char_u *)&p_popt, PV_NONE, +*************** +*** 2222,2245 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"prompt", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_prompt, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"pumheight", "ph", P_NUM|P_VI_DEF, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_ph, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"pumwidth", "pw", P_NUM|P_VI_DEF, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_pw, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)15L, (char_u *)15L} SCRIPTID_INIT}, + {"pythonthreedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_PYTHON3) + (char_u *)&p_py3dll, PV_NONE, +--- 2222,2245 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"prompt", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_prompt, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"pumheight", "ph", P_NUM|P_VI_DEF, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_ph, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"pumwidth", "pw", P_NUM|P_VI_DEF, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_pw, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)15L, (char_u *)15L} SCTX_INIT}, + {"pythonthreedll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_PYTHON3) + (char_u *)&p_py3dll, PV_NONE, +*************** +*** 2248,2254 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"pythonthreehome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(FEAT_PYTHON3) + (char_u *)&p_py3home, PV_NONE, +--- 2248,2254 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"pythonthreehome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(FEAT_PYTHON3) + (char_u *)&p_py3home, PV_NONE, +*************** +*** 2257,2263 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_PYTHON) + (char_u *)&p_pydll, PV_NONE, +--- 2257,2263 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"pythondll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_PYTHON) + (char_u *)&p_pydll, PV_NONE, +*************** +*** 2266,2272 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"pythonhome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(FEAT_PYTHON) + (char_u *)&p_pyhome, PV_NONE, +--- 2266,2272 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"pythonhome", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(FEAT_PYTHON) + (char_u *)&p_pyhome, PV_NONE, +*************** +*** 2275,2281 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"pyxversion", "pyx", P_NUM|P_VI_DEF|P_SECURE, + #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) + (char_u *)&p_pyx, PV_NONE, +--- 2275,2281 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"pyxversion", "pyx", P_NUM|P_VI_DEF|P_SECURE, + #if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3) + (char_u *)&p_pyx, PV_NONE, +*************** +*** 2283,2289 **** + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)DEFAULT_PYTHON_VER, (char_u *)0L} +! SCRIPTID_INIT}, + {"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF, + #ifdef FEAT_TEXTOBJ + (char_u *)&p_qe, PV_QE, +--- 2283,2289 ---- + (char_u *)NULL, PV_NONE, + #endif + {(char_u *)DEFAULT_PYTHON_VER, (char_u *)0L} +! SCTX_INIT}, + {"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF, + #ifdef FEAT_TEXTOBJ + (char_u *)&p_qe, PV_QE, +*************** +*** 2292,2320 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB, + (char_u *)&p_ro, PV_RO, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"redraw", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"redrawtime", "rdt", P_NUM|P_VI_DEF, + #ifdef FEAT_RELTIME + (char_u *)&p_rdt, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)2000L, (char_u *)0L} SCRIPTID_INIT}, + {"regexpengine", "re", P_NUM|P_VI_DEF, + (char_u *)&p_re, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_RNU, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"remap", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_remap, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"renderoptions", "rop", P_STRING|P_ONECOMMA|P_RCLR|P_VI_DEF, + #ifdef FEAT_RENDER_OPTIONS + (char_u *)&p_rop, PV_NONE, +--- 2292,2320 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"readonly", "ro", P_BOOL|P_VI_DEF|P_RSTAT|P_NOGLOB, + (char_u *)&p_ro, PV_RO, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"redraw", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"redrawtime", "rdt", P_NUM|P_VI_DEF, + #ifdef FEAT_RELTIME + (char_u *)&p_rdt, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)2000L, (char_u *)0L} SCTX_INIT}, + {"regexpengine", "re", P_NUM|P_VI_DEF, + (char_u *)&p_re, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_RNU, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"remap", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_remap, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"renderoptions", "rop", P_STRING|P_ONECOMMA|P_RCLR|P_VI_DEF, + #ifdef FEAT_RENDER_OPTIONS + (char_u *)&p_rop, PV_NONE, +*************** +*** 2323,2353 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"report", NULL, P_NUM|P_VI_DEF, + (char_u *)&p_report, PV_NONE, +! {(char_u *)2L, (char_u *)0L} SCRIPTID_INIT}, + {"restorescreen", "rs", P_BOOL|P_VI_DEF, + #ifdef WIN3264 + (char_u *)&p_rs, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"revins", "ri", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_ri, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"rightleft", "rl", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_RIGHTLEFT + (char_u *)VAR_WIN, PV_RL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"rightleftcmd", "rlc", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN, + #ifdef FEAT_RIGHTLEFT + (char_u *)VAR_WIN, PV_RLC, +--- 2323,2353 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"report", NULL, P_NUM|P_VI_DEF, + (char_u *)&p_report, PV_NONE, +! {(char_u *)2L, (char_u *)0L} SCTX_INIT}, + {"restorescreen", "rs", P_BOOL|P_VI_DEF, + #ifdef WIN3264 + (char_u *)&p_rs, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"revins", "ri", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_RIGHTLEFT + (char_u *)&p_ri, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"rightleft", "rl", P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_RIGHTLEFT + (char_u *)VAR_WIN, PV_RL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"rightleftcmd", "rlc", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN, + #ifdef FEAT_RIGHTLEFT + (char_u *)VAR_WIN, PV_RLC, +*************** +*** 2356,2362 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"rubydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_RUBY) + (char_u *)&p_rubydll, PV_NONE, +--- 2356,2362 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"rubydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_RUBY) + (char_u *)&p_rubydll, PV_NONE, +*************** +*** 2365,2420 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT, + #ifdef FEAT_CMDL_INFO + (char_u *)&p_ru, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"rulerformat", "ruf", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT, + #ifdef FEAT_STL_OPT + (char_u *)&p_ruf, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"runtimepath", "rtp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP + |P_SECURE, + (char_u *)&p_rtp, PV_NONE, + {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L} +! SCRIPTID_INIT}, + {"scroll", "scr", P_NUM|P_NO_MKRC|P_VI_DEF, + (char_u *)VAR_WIN, PV_SCROLL, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"scrollbind", "scb", P_BOOL|P_VI_DEF, + (char_u *)VAR_WIN, PV_SCBIND, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"scrolljump", "sj", P_NUM|P_VI_DEF|P_VIM, + (char_u *)&p_sj, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {"scrolloff", "so", P_NUM|P_VI_DEF|P_VIM|P_RALL, + (char_u *)&p_so, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_sbo, PV_NONE, + {(char_u *)"ver,jump", (char_u *)0L} +! SCRIPTID_INIT}, + {"sections", "sect", P_STRING|P_VI_DEF, + (char_u *)&p_sections, PV_NONE, + {(char_u *)"SHNHH HUnhsh", (char_u *)0L} +! SCRIPTID_INIT}, + {"secure", NULL, P_BOOL|P_VI_DEF|P_SECURE, + (char_u *)&p_secure, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"selection", "sel", P_STRING|P_VI_DEF, + (char_u *)&p_sel, PV_NONE, + {(char_u *)"inclusive", (char_u *)0L} +! SCRIPTID_INIT}, + {"selectmode", "slm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_slm, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_SESSION + (char_u *)&p_ssop, PV_NONE, +--- 2365,2420 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT, + #ifdef FEAT_CMDL_INFO + (char_u *)&p_ru, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"rulerformat", "ruf", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT, + #ifdef FEAT_STL_OPT + (char_u *)&p_ruf, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"runtimepath", "rtp", P_STRING|P_VI_DEF|P_EXPAND|P_ONECOMMA|P_NODUP + |P_SECURE, + (char_u *)&p_rtp, PV_NONE, + {(char_u *)DFLT_RUNTIMEPATH, (char_u *)0L} +! SCTX_INIT}, + {"scroll", "scr", P_NUM|P_NO_MKRC|P_VI_DEF, + (char_u *)VAR_WIN, PV_SCROLL, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"scrollbind", "scb", P_BOOL|P_VI_DEF, + (char_u *)VAR_WIN, PV_SCBIND, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"scrolljump", "sj", P_NUM|P_VI_DEF|P_VIM, + (char_u *)&p_sj, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCTX_INIT}, + {"scrolloff", "so", P_NUM|P_VI_DEF|P_VIM|P_RALL, + (char_u *)&p_so, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_sbo, PV_NONE, + {(char_u *)"ver,jump", (char_u *)0L} +! SCTX_INIT}, + {"sections", "sect", P_STRING|P_VI_DEF, + (char_u *)&p_sections, PV_NONE, + {(char_u *)"SHNHH HUnhsh", (char_u *)0L} +! SCTX_INIT}, + {"secure", NULL, P_BOOL|P_VI_DEF|P_SECURE, + (char_u *)&p_secure, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"selection", "sel", P_STRING|P_VI_DEF, + (char_u *)&p_sel, PV_NONE, + {(char_u *)"inclusive", (char_u *)0L} +! SCTX_INIT}, + {"selectmode", "slm", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_slm, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_SESSION + (char_u *)&p_ssop, PV_NONE, +*************** +*** 2424,2430 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"shell", "sh", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_sh, PV_NONE, + { +--- 2424,2430 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"shell", "sh", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_sh, PV_NONE, + { +*************** +*** 2437,2443 **** + (char_u *)"sh", + # endif + #endif /* VMS */ +! (char_u *)0L} SCRIPTID_INIT}, + {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_shcf, PV_NONE, + { +--- 2437,2443 ---- + (char_u *)"sh", + # endif + #endif /* VMS */ +! (char_u *)0L} SCTX_INIT}, + {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_shcf, PV_NONE, + { +*************** +*** 2446,2452 **** + #else + (char_u *)"-c", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"shellpipe", "sp", P_STRING|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_sp, PV_NONE, +--- 2446,2452 ---- + #else + (char_u *)"-c", + #endif +! (char_u *)0L} SCTX_INIT}, + {"shellpipe", "sp", P_STRING|P_VI_DEF|P_SECURE, + #ifdef FEAT_QUICKFIX + (char_u *)&p_sp, PV_NONE, +*************** +*** 2461,2490 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"shellquote", "shq", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_shq, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"shellredir", "srr", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_srr, PV_NONE, +! {(char_u *)">", (char_u *)0L} SCRIPTID_INIT}, + {"shellslash", "ssl", P_BOOL|P_VI_DEF, + #ifdef BACKSLASH_IN_FILENAME + (char_u *)&p_ssl, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"shelltemp", "stmp", P_BOOL, + (char_u *)&p_stmp, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, + {"shelltype", "st", P_NUM|P_VI_DEF, + #ifdef AMIGA + (char_u *)&p_st, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"shellxquote", "sxq", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_sxq, PV_NONE, + { +--- 2461,2490 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"shellquote", "shq", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_shq, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"shellredir", "srr", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_srr, PV_NONE, +! {(char_u *)">", (char_u *)0L} SCTX_INIT}, + {"shellslash", "ssl", P_BOOL|P_VI_DEF, + #ifdef BACKSLASH_IN_FILENAME + (char_u *)&p_ssl, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"shelltemp", "stmp", P_BOOL, + (char_u *)&p_stmp, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, + {"shelltype", "st", P_NUM|P_VI_DEF, + #ifdef AMIGA + (char_u *)&p_st, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"shellxquote", "sxq", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_sxq, PV_NONE, + { +*************** +*** 2493,2499 **** + #else + (char_u *)"", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_sxe, PV_NONE, + { +--- 2493,2499 ---- + #else + (char_u *)"", + #endif +! (char_u *)0L} SCTX_INIT}, + {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE, + (char_u *)&p_sxe, PV_NONE, + { +*************** +*** 2502,2528 **** + #else + (char_u *)"", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"shiftround", "sr", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_sr, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"shiftwidth", "sw", P_NUM|P_VI_DEF, + (char_u *)&p_sw, PV_SW, +! {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT}, + {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST, + (char_u *)&p_shm, PV_NONE, + {(char_u *)"", (char_u *)"filnxtToO"} +! SCRIPTID_INIT}, + {"shortname", "sn", P_BOOL|P_VI_DEF, + (char_u *)&p_sn, PV_SN, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL, + #ifdef FEAT_LINEBREAK + (char_u *)&p_sbr, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"showcmd", "sc", P_BOOL|P_VIM, + #ifdef FEAT_CMDL_INFO + (char_u *)&p_sc, PV_NONE, +--- 2502,2528 ---- + #else + (char_u *)"", + #endif +! (char_u *)0L} SCTX_INIT}, + {"shiftround", "sr", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_sr, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"shiftwidth", "sw", P_NUM|P_VI_DEF, + (char_u *)&p_sw, PV_SW, +! {(char_u *)8L, (char_u *)0L} SCTX_INIT}, + {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST, + (char_u *)&p_shm, PV_NONE, + {(char_u *)"", (char_u *)"filnxtToO"} +! SCTX_INIT}, + {"shortname", "sn", P_BOOL|P_VI_DEF, + (char_u *)&p_sn, PV_SN, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL, + #ifdef FEAT_LINEBREAK + (char_u *)&p_sbr, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"showcmd", "sc", P_BOOL|P_VIM, + #ifdef FEAT_CMDL_INFO + (char_u *)&p_sc, PV_NONE, +*************** +*** 2535,2559 **** + #else + (char_u *)TRUE + #endif +! } SCRIPTID_INIT}, + {"showfulltag", "sft", P_BOOL|P_VI_DEF, + (char_u *)&p_sft, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"showmatch", "sm", P_BOOL|P_VI_DEF, + (char_u *)&p_sm, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"showmode", "smd", P_BOOL|P_VIM, + (char_u *)&p_smd, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, + {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL, + (char_u *)&p_stal, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {"sidescroll", "ss", P_NUM|P_VI_DEF, + (char_u *)&p_ss, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF, + (char_u *)&p_siso, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN, + #ifdef FEAT_SIGNS + (char_u *)VAR_WIN, PV_SCL, +--- 2535,2559 ---- + #else + (char_u *)TRUE + #endif +! } SCTX_INIT}, + {"showfulltag", "sft", P_BOOL|P_VI_DEF, + (char_u *)&p_sft, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"showmatch", "sm", P_BOOL|P_VI_DEF, + (char_u *)&p_sm, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"showmode", "smd", P_BOOL|P_VIM, + (char_u *)&p_smd, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, + {"showtabline", "stal", P_NUM|P_VI_DEF|P_RALL, + (char_u *)&p_stal, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCTX_INIT}, + {"sidescroll", "ss", P_NUM|P_VI_DEF, + (char_u *)&p_ss, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"sidescrolloff", "siso", P_NUM|P_VI_DEF|P_VIM|P_RBUF, + (char_u *)&p_siso, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"signcolumn", "scl", P_STRING|P_ALLOCED|P_VI_DEF|P_RWIN, + #ifdef FEAT_SIGNS + (char_u *)VAR_WIN, PV_SCL, +*************** +*** 2562,2597 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"slowopen", "slow", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"smartcase", "scs", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_scs, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"smartindent", "si", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_SMARTINDENT + (char_u *)&p_si, PV_SI, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"smarttab", "sta", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_sta, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"softtabstop", "sts", P_NUM|P_VI_DEF|P_VIM, + (char_u *)&p_sts, PV_STS, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"sourceany", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_SPELL + (char_u *)VAR_WIN, PV_SPELL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF, + #ifdef FEAT_SPELL + (char_u *)&p_spc, PV_SPC, +--- 2562,2597 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"slowopen", "slow", P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"smartcase", "scs", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_scs, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"smartindent", "si", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_SMARTINDENT + (char_u *)&p_si, PV_SI, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"smarttab", "sta", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_sta, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"softtabstop", "sts", P_NUM|P_VI_DEF|P_VIM, + (char_u *)&p_sts, PV_STS, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"sourceany", NULL, P_BOOL|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"spell", NULL, P_BOOL|P_VI_DEF|P_RWIN, + #ifdef FEAT_SPELL + (char_u *)VAR_WIN, PV_SPELL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"spellcapcheck", "spc", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF, + #ifdef FEAT_SPELL + (char_u *)&p_spc, PV_SPC, +*************** +*** 2600,2606 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"spellfile", "spf", P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE + |P_ONECOMMA, + #ifdef FEAT_SPELL +--- 2600,2606 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"spellfile", "spf", P_STRING|P_EXPAND|P_ALLOCED|P_VI_DEF|P_SECURE + |P_ONECOMMA, + #ifdef FEAT_SPELL +*************** +*** 2610,2616 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA + |P_RBUF|P_EXPAND, + #ifdef FEAT_SPELL +--- 2610,2616 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"spelllang", "spl", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA + |P_RBUF|P_EXPAND, + #ifdef FEAT_SPELL +*************** +*** 2620,2626 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_ONECOMMA, + #ifdef FEAT_SPELL + (char_u *)&p_sps, PV_NONE, +--- 2620,2626 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"spellsuggest", "sps", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE|P_ONECOMMA, + #ifdef FEAT_SPELL + (char_u *)&p_sps, PV_NONE, +*************** +*** 2629,2655 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"splitbelow", "sb", P_BOOL|P_VI_DEF, + (char_u *)&p_sb, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"splitright", "spr", P_BOOL|P_VI_DEF, + (char_u *)&p_spr, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"startofline", "sol", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_sol, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"statusline" ,"stl", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT, + #ifdef FEAT_STL_OPT + (char_u *)&p_stl, PV_STL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"suffixes", "su", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_su, PV_NONE, + {(char_u *)".bak,~,.o,.h,.info,.swp,.obj", +! (char_u *)0L} SCRIPTID_INIT}, + {"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_ONECOMMA|P_NODUP, + #ifdef FEAT_SEARCHPATH + (char_u *)&p_sua, PV_SUA, +--- 2629,2655 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"splitbelow", "sb", P_BOOL|P_VI_DEF, + (char_u *)&p_sb, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"splitright", "spr", P_BOOL|P_VI_DEF, + (char_u *)&p_spr, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"startofline", "sol", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_sol, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"statusline" ,"stl", P_STRING|P_VI_DEF|P_ALLOCED|P_RSTAT, + #ifdef FEAT_STL_OPT + (char_u *)&p_stl, PV_STL, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"suffixes", "su", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_su, PV_NONE, + {(char_u *)".bak,~,.o,.h,.info,.swp,.obj", +! (char_u *)0L} SCTX_INIT}, + {"suffixesadd", "sua", P_STRING|P_VI_DEF|P_ALLOCED|P_ONECOMMA|P_NODUP, + #ifdef FEAT_SEARCHPATH + (char_u *)&p_sua, PV_SUA, +*************** +*** 2658,2673 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)&p_swf, PV_SWF, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"swapsync", "sws", P_STRING|P_VI_DEF, + (char_u *)&p_sws, PV_NONE, +! {(char_u *)"fsync", (char_u *)0L} SCRIPTID_INIT}, + {"switchbuf", "swb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_swb, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"synmaxcol", "smc", P_NUM|P_VI_DEF|P_RBUF, + #ifdef FEAT_SYN_HL + (char_u *)&p_smc, PV_SMC, +--- 2658,2673 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"swapfile", "swf", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)&p_swf, PV_SWF, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"swapsync", "sws", P_STRING|P_VI_DEF, + (char_u *)&p_sws, PV_NONE, +! {(char_u *)"fsync", (char_u *)0L} SCTX_INIT}, + {"switchbuf", "swb", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_swb, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"synmaxcol", "smc", P_NUM|P_VI_DEF|P_RBUF, + #ifdef FEAT_SYN_HL + (char_u *)&p_smc, PV_SMC, +*************** +*** 2676,2682 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME, + #ifdef FEAT_SYN_HL + (char_u *)&p_syn, PV_SYN, +--- 2676,2682 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"syntax", "syn", P_STRING|P_ALLOCED|P_VI_DEF|P_NOGLOB|P_NFNAME, + #ifdef FEAT_SYN_HL + (char_u *)&p_syn, PV_SYN, +*************** +*** 2685,2704 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"tabline", "tal", P_STRING|P_VI_DEF|P_RALL, + #ifdef FEAT_STL_OPT + (char_u *)&p_tal, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"tabpagemax", "tpm", P_NUM|P_VI_DEF, + (char_u *)&p_tpm, PV_NONE, +! {(char_u *)10L, (char_u *)0L} SCRIPTID_INIT}, + {"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF, + (char_u *)&p_ts, PV_TS, +! {(char_u *)8L, (char_u *)0L} SCRIPTID_INIT}, + {"tagbsearch", "tbs", P_BOOL|P_VI_DEF, + (char_u *)&p_tbs, PV_NONE, + #ifdef VMS /* binary searching doesn't appear to work on VMS */ +--- 2685,2704 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"tabline", "tal", P_STRING|P_VI_DEF|P_RALL, + #ifdef FEAT_STL_OPT + (char_u *)&p_tal, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"tabpagemax", "tpm", P_NUM|P_VI_DEF, + (char_u *)&p_tpm, PV_NONE, +! {(char_u *)10L, (char_u *)0L} SCTX_INIT}, + {"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF, + (char_u *)&p_ts, PV_TS, +! {(char_u *)8L, (char_u *)0L} SCTX_INIT}, + {"tagbsearch", "tbs", P_BOOL|P_VI_DEF, + (char_u *)&p_tbs, PV_NONE, + #ifdef VMS /* binary searching doesn't appear to work on VMS */ +*************** +*** 2706,2721 **** + #else + {(char_u *)TRUE, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"tagcase", "tc", P_STRING|P_VIM, + (char_u *)&p_tc, PV_TC, +! {(char_u *)"followic", (char_u *)"followic"} SCRIPTID_INIT}, + {"taglength", "tl", P_NUM|P_VI_DEF, + (char_u *)&p_tl, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"tagrelative", "tr", P_BOOL|P_VIM, + (char_u *)&p_tr, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, + {"tags", "tag", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_tags, PV_TAGS, + { +--- 2706,2721 ---- + #else + {(char_u *)TRUE, (char_u *)0L} + #endif +! SCTX_INIT}, + {"tagcase", "tc", P_STRING|P_VIM, + (char_u *)&p_tc, PV_TC, +! {(char_u *)"followic", (char_u *)"followic"} SCTX_INIT}, + {"taglength", "tl", P_NUM|P_VI_DEF, + (char_u *)&p_tl, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"tagrelative", "tr", P_BOOL|P_VIM, + (char_u *)&p_tr, PV_NONE, +! {(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT}, + {"tags", "tag", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_tags, PV_TAGS, + { +*************** +*** 2724,2733 **** + #else + (char_u *)"./tags,tags", + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"tagstack", "tgst", P_BOOL|P_VI_DEF, + (char_u *)&p_tgst, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"tcldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_TCL) + (char_u *)&p_tcldll, PV_NONE, +--- 2724,2733 ---- + #else + (char_u *)"./tags,tags", + #endif +! (char_u *)0L} SCTX_INIT}, + {"tagstack", "tgst", P_BOOL|P_VI_DEF, + (char_u *)&p_tgst, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"tcldll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(DYNAMIC_TCL) + (char_u *)&p_tcldll, PV_NONE, +*************** +*** 2736,2752 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"term", NULL, P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL, + (char_u *)&T_NAME, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"termbidi", "tbidi", P_BOOL|P_VI_DEF, + #ifdef FEAT_ARABIC + (char_u *)&p_tbidi, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR, + #ifdef FEAT_MBYTE + (char_u *)&p_tenc, PV_NONE, +--- 2736,2752 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"term", NULL, P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL, + (char_u *)&T_NAME, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"termbidi", "tbidi", P_BOOL|P_VI_DEF, + #ifdef FEAT_ARABIC + (char_u *)&p_tbidi, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"termencoding", "tenc", P_STRING|P_VI_DEF|P_RCLR, + #ifdef FEAT_MBYTE + (char_u *)&p_tenc, PV_NONE, +*************** +*** 2755,2761 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"termguicolors", "tgc", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, + #ifdef FEAT_TERMGUICOLORS + (char_u *)&p_tgc, PV_NONE, +--- 2755,2761 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"termguicolors", "tgc", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, + #ifdef FEAT_TERMGUICOLORS + (char_u *)&p_tgc, PV_NONE, +*************** +*** 2764,2770 **** + (char_u*)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)FALSE} + #endif +! SCRIPTID_INIT}, + {"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, + #ifdef FEAT_TERMINAL + (char_u *)VAR_WIN, PV_TWK, +--- 2764,2770 ---- + (char_u*)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)FALSE} + #endif +! SCTX_INIT}, + {"termwinkey", "twk", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, + #ifdef FEAT_TERMINAL + (char_u *)VAR_WIN, PV_TWK, +*************** +*** 2773,2779 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"termwinscroll", "twsl", P_NUM|P_VI_DEF|P_VIM|P_RBUF, + #ifdef FEAT_TERMINAL + (char_u *)&p_twsl, PV_TWSL, +--- 2773,2779 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"termwinscroll", "twsl", P_NUM|P_VI_DEF|P_VIM|P_RBUF, + #ifdef FEAT_TERMINAL + (char_u *)&p_twsl, PV_TWSL, +*************** +*** 2782,2788 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"termwinsize", "tws", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, + #ifdef FEAT_TERMINAL + (char_u *)VAR_WIN, PV_TWS, +--- 2782,2788 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"termwinsize", "tws", P_STRING|P_ALLOCED|P_RWIN|P_VI_DEF, + #ifdef FEAT_TERMINAL + (char_u *)VAR_WIN, PV_TWS, +*************** +*** 2791,2804 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"terse", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_terse, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"textauto", "ta", P_BOOL|P_VIM, + (char_u *)&p_ta, PV_NONE, + {(char_u *)DFLT_TEXTAUTO, (char_u *)TRUE} +! SCRIPTID_INIT}, + {"textmode", "tx", P_BOOL|P_VI_DEF|P_NO_MKRC, + (char_u *)&p_tx, PV_TX, + { +--- 2791,2804 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"terse", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_terse, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"textauto", "ta", P_BOOL|P_VIM, + (char_u *)&p_ta, PV_NONE, + {(char_u *)DFLT_TEXTAUTO, (char_u *)TRUE} +! SCTX_INIT}, + {"textmode", "tx", P_BOOL|P_VI_DEF|P_NO_MKRC, + (char_u *)&p_tx, PV_TX, + { +*************** +*** 2807,2846 **** + #else + (char_u *)FALSE, + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF, + (char_u *)&p_tw, PV_TW, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_tsr, PV_TSR, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"tildeop", "top", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_to, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"timeout", "to", P_BOOL|P_VI_DEF, + (char_u *)&p_timeout, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"timeoutlen", "tm", P_NUM|P_VI_DEF, + (char_u *)&p_tm, PV_NONE, +! {(char_u *)1000L, (char_u *)0L} SCRIPTID_INIT}, + {"title", NULL, P_BOOL|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_title, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"titlelen", NULL, P_NUM|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_titlelen, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)85L, (char_u *)0L} SCRIPTID_INIT}, + {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC, + #ifdef FEAT_TITLE + (char_u *)&p_titleold, PV_NONE, +--- 2807,2846 ---- + #else + (char_u *)FALSE, + #endif +! (char_u *)0L} SCTX_INIT}, + {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF, + (char_u *)&p_tw, PV_TW, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME, + #ifdef FEAT_INS_EXPAND + (char_u *)&p_tsr, PV_TSR, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"tildeop", "top", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_to, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"timeout", "to", P_BOOL|P_VI_DEF, + (char_u *)&p_timeout, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"timeoutlen", "tm", P_NUM|P_VI_DEF, + (char_u *)&p_tm, PV_NONE, +! {(char_u *)1000L, (char_u *)0L} SCTX_INIT}, + {"title", NULL, P_BOOL|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_title, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"titlelen", NULL, P_NUM|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_titlelen, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)85L, (char_u *)0L} SCTX_INIT}, + {"titleold", NULL, P_STRING|P_VI_DEF|P_GETTEXT|P_SECURE|P_NO_MKRC, + #ifdef FEAT_TITLE + (char_u *)&p_titleold, PV_NONE, +*************** +*** 2850,2863 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"titlestring", NULL, P_STRING|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_titlestring, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"toolbar", "tb", P_STRING|P_ONECOMMA|P_VI_DEF|P_NODUP, + #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) + (char_u *)&p_toolbar, PV_NONE, +--- 2850,2863 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"titlestring", NULL, P_STRING|P_VI_DEF, + #ifdef FEAT_TITLE + (char_u *)&p_titlestring, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"toolbar", "tb", P_STRING|P_ONECOMMA|P_VI_DEF|P_NODUP, + #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) + (char_u *)&p_toolbar, PV_NONE, +*************** +*** 2866,2872 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"toolbariconsize", "tbis", P_STRING|P_VI_DEF, + #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) + (char_u *)&p_tbis, PV_NONE, +--- 2866,2872 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"toolbariconsize", "tbis", P_STRING|P_VI_DEF, + #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) + (char_u *)&p_tbis, PV_NONE, +*************** +*** 2875,2906 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"ttimeout", NULL, P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_ttimeout, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"ttimeoutlen", "ttm", P_NUM|P_VI_DEF, + (char_u *)&p_ttm, PV_NONE, +! {(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT}, + {"ttybuiltin", "tbi", P_BOOL|P_VI_DEF, + (char_u *)&p_tbi, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF, + (char_u *)&p_tf, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"ttymouse", "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF, + #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS)) + (char_u *)&p_ttym, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"ttyscroll", "tsl", P_NUM|P_VI_DEF, + (char_u *)&p_ttyscroll, PV_NONE, +! {(char_u *)999L, (char_u *)0L} SCRIPTID_INIT}, + {"ttytype", "tty", P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL, + (char_u *)&T_NAME, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"undodir", "udir", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP|P_SECURE + |P_VI_DEF, + #ifdef FEAT_PERSISTENT_UNDO +--- 2875,2906 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"ttimeout", NULL, P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_ttimeout, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"ttimeoutlen", "ttm", P_NUM|P_VI_DEF, + (char_u *)&p_ttm, PV_NONE, +! {(char_u *)-1L, (char_u *)0L} SCTX_INIT}, + {"ttybuiltin", "tbi", P_BOOL|P_VI_DEF, + (char_u *)&p_tbi, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"ttyfast", "tf", P_BOOL|P_NO_MKRC|P_VI_DEF, + (char_u *)&p_tf, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"ttymouse", "ttym", P_STRING|P_NODEFAULT|P_NO_MKRC|P_VI_DEF, + #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS)) + (char_u *)&p_ttym, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"ttyscroll", "tsl", P_NUM|P_VI_DEF, + (char_u *)&p_ttyscroll, PV_NONE, +! {(char_u *)999L, (char_u *)0L} SCTX_INIT}, + {"ttytype", "tty", P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL, + (char_u *)&T_NAME, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"undodir", "udir", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP|P_SECURE + |P_VI_DEF, + #ifdef FEAT_PERSISTENT_UNDO +*************** +*** 2910,2923 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"undofile", "udf", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_PERSISTENT_UNDO + (char_u *)&p_udf, PV_UDF, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"undolevels", "ul", P_NUM|P_VI_DEF, + (char_u *)&p_ul, PV_UL, + { +--- 2910,2923 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"undofile", "udf", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_PERSISTENT_UNDO + (char_u *)&p_udf, PV_UDF, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"undolevels", "ul", P_NUM|P_VI_DEF, + (char_u *)&p_ul, PV_UL, + { +*************** +*** 2926,2941 **** + #else + (char_u *)100L, + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"undoreload", "ur", P_NUM|P_VI_DEF, + (char_u *)&p_ur, PV_NONE, +! { (char_u *)10000L, (char_u *)0L} SCRIPTID_INIT}, + {"updatecount", "uc", P_NUM|P_VI_DEF, + (char_u *)&p_uc, PV_NONE, +! {(char_u *)200L, (char_u *)0L} SCRIPTID_INIT}, + {"updatetime", "ut", P_NUM|P_VI_DEF, + (char_u *)&p_ut, PV_NONE, +! {(char_u *)4000L, (char_u *)0L} SCRIPTID_INIT}, + {"varsofttabstop", "vsts", P_STRING|P_VI_DEF|P_VIM|P_COMMA, + #ifdef FEAT_VARTABS + (char_u *)&p_vsts, PV_VSTS, +--- 2926,2941 ---- + #else + (char_u *)100L, + #endif +! (char_u *)0L} SCTX_INIT}, + {"undoreload", "ur", P_NUM|P_VI_DEF, + (char_u *)&p_ur, PV_NONE, +! { (char_u *)10000L, (char_u *)0L} SCTX_INIT}, + {"updatecount", "uc", P_NUM|P_VI_DEF, + (char_u *)&p_uc, PV_NONE, +! {(char_u *)200L, (char_u *)0L} SCTX_INIT}, + {"updatetime", "ut", P_NUM|P_VI_DEF, + (char_u *)&p_ut, PV_NONE, +! {(char_u *)4000L, (char_u *)0L} SCTX_INIT}, + {"varsofttabstop", "vsts", P_STRING|P_VI_DEF|P_VIM|P_COMMA, + #ifdef FEAT_VARTABS + (char_u *)&p_vsts, PV_VSTS, +*************** +*** 2944,2950 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCRIPTID_INIT}, + {"vartabstop", "vts", P_STRING|P_VI_DEF|P_VIM|P_RBUF|P_COMMA, + #ifdef FEAT_VARTABS + (char_u *)&p_vts, PV_VTS, +--- 2944,2950 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCTX_INIT}, + {"vartabstop", "vts", P_STRING|P_VI_DEF|P_VIM|P_RBUF|P_COMMA, + #ifdef FEAT_VARTABS + (char_u *)&p_vts, PV_VTS, +*************** +*** 2953,2965 **** + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCRIPTID_INIT}, + {"verbose", "vbs", P_NUM|P_VI_DEF, + (char_u *)&p_verbose, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"verbosefile", "vfile", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_vfile, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"viewdir", "vdir", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_SESSION + (char_u *)&p_vdir, PV_NONE, +--- 2953,2965 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)"", (char_u *)NULL} + #endif +! SCTX_INIT}, + {"verbose", "vbs", P_NUM|P_VI_DEF, + (char_u *)&p_verbose, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"verbosefile", "vfile", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + (char_u *)&p_vfile, PV_NONE, +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"viewdir", "vdir", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #ifdef FEAT_SESSION + (char_u *)&p_vdir, PV_NONE, +*************** +*** 2968,2974 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"viewoptions", "vop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_SESSION + (char_u *)&p_vop, PV_NONE, +--- 2968,2974 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"viewoptions", "vop", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_SESSION + (char_u *)&p_vop, PV_NONE, +*************** +*** 2978,2984 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE, + #ifdef FEAT_VIMINFO + (char_u *)&p_viminfo, PV_NONE, +--- 2978,2984 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE, + #ifdef FEAT_VIMINFO + (char_u *)&p_viminfo, PV_NONE, +*************** +*** 2996,3002 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"viminfofile", "vif", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP + |P_SECURE|P_VI_DEF, + #ifdef FEAT_VIMINFO +--- 2996,3002 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"viminfofile", "vif", P_STRING|P_EXPAND|P_ONECOMMA|P_NODUP + |P_SECURE|P_VI_DEF, + #ifdef FEAT_VIMINFO +*************** +*** 3006,3012 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"virtualedit", "ve", P_STRING|P_ONECOMMA|P_NODUP|P_VI_DEF + |P_VIM|P_CURSWANT, + #ifdef FEAT_VIRTUALEDIT +--- 3006,3012 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"virtualedit", "ve", P_STRING|P_ONECOMMA|P_NODUP|P_VI_DEF + |P_VIM|P_CURSWANT, + #ifdef FEAT_VIRTUALEDIT +*************** +*** 3016,3070 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"visualbell", "vb", P_BOOL|P_VI_DEF, + (char_u *)&p_vb, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"w300", NULL, P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"w1200", NULL, P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"w9600", NULL, P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"warn", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_warn, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"weirdinvert", "wiv", P_BOOL|P_VI_DEF|P_RCLR, + (char_u *)&p_wiv, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"whichwrap", "ww", P_STRING|P_VIM|P_ONECOMMA|P_FLAGLIST, + (char_u *)&p_ww, PV_NONE, +! {(char_u *)"", (char_u *)"b,s"} SCRIPTID_INIT}, + {"wildchar", "wc", P_NUM|P_VIM, + (char_u *)&p_wc, PV_NONE, + {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB} +! SCRIPTID_INIT}, + {"wildcharm", "wcm", P_NUM|P_VI_DEF, + (char_u *)&p_wcm, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"wildignore", "wig", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_WILDIGN + (char_u *)&p_wig, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + {"wildignorecase", "wic", P_BOOL|P_VI_DEF, + (char_u *)&p_wic, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"wildmenu", "wmnu", P_BOOL|P_VI_DEF, + #ifdef FEAT_WILDMENU + (char_u *)&p_wmnu, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"wildmode", "wim", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_wim, PV_NONE, +! {(char_u *)"full", (char_u *)0L} SCRIPTID_INIT}, + {"wildoptions", "wop", P_STRING|P_VI_DEF, + #ifdef FEAT_CMDL_COMPL + (char_u *)&p_wop, PV_NONE, +--- 3016,3070 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"visualbell", "vb", P_BOOL|P_VI_DEF, + (char_u *)&p_vb, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"w300", NULL, P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"w1200", NULL, P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"w9600", NULL, P_NUM|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"warn", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_warn, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"weirdinvert", "wiv", P_BOOL|P_VI_DEF|P_RCLR, + (char_u *)&p_wiv, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"whichwrap", "ww", P_STRING|P_VIM|P_ONECOMMA|P_FLAGLIST, + (char_u *)&p_ww, PV_NONE, +! {(char_u *)"", (char_u *)"b,s"} SCTX_INIT}, + {"wildchar", "wc", P_NUM|P_VIM, + (char_u *)&p_wc, PV_NONE, + {(char_u *)(long)Ctrl_E, (char_u *)(long)TAB} +! SCTX_INIT}, + {"wildcharm", "wcm", P_NUM|P_VI_DEF, + (char_u *)&p_wcm, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"wildignore", "wig", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + #ifdef FEAT_WILDIGN + (char_u *)&p_wig, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + {"wildignorecase", "wic", P_BOOL|P_VI_DEF, + (char_u *)&p_wic, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"wildmenu", "wmnu", P_BOOL|P_VI_DEF, + #ifdef FEAT_WILDMENU + (char_u *)&p_wmnu, PV_NONE, + #else + (char_u *)NULL, PV_NONE, + #endif +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"wildmode", "wim", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + (char_u *)&p_wim, PV_NONE, +! {(char_u *)"full", (char_u *)0L} SCTX_INIT}, + {"wildoptions", "wop", P_STRING|P_VI_DEF, + #ifdef FEAT_CMDL_COMPL + (char_u *)&p_wop, PV_NONE, +*************** +*** 3073,3079 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"winaltkeys", "wak", P_STRING|P_VI_DEF, + #ifdef FEAT_WAK + (char_u *)&p_wak, PV_NONE, +--- 3073,3079 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"winaltkeys", "wak", P_STRING|P_VI_DEF, + #ifdef FEAT_WAK + (char_u *)&p_wak, PV_NONE, +*************** +*** 3082,3106 **** + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"window", "wi", P_NUM|P_VI_DEF, + (char_u *)&p_window, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"winheight", "wh", P_NUM|P_VI_DEF, + (char_u *)&p_wh, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)VAR_WIN, PV_WFH, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)VAR_WIN, PV_WFW, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"winminheight", "wmh", P_NUM|P_VI_DEF, + (char_u *)&p_wmh, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {"winminwidth", "wmw", P_NUM|P_VI_DEF, + (char_u *)&p_wmw, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCRIPTID_INIT}, + {"winptydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(WIN3264) && defined(FEAT_TERMINAL) + (char_u *)&p_winptydll, PV_NONE, { +--- 3082,3106 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)NULL, (char_u *)0L} + #endif +! SCTX_INIT}, + {"window", "wi", P_NUM|P_VI_DEF, + (char_u *)&p_window, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"winheight", "wh", P_NUM|P_VI_DEF, + (char_u *)&p_wh, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCTX_INIT}, + {"winfixheight", "wfh", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)VAR_WIN, PV_WFH, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"winfixwidth", "wfw", P_BOOL|P_VI_DEF|P_RSTAT, + (char_u *)VAR_WIN, PV_WFW, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"winminheight", "wmh", P_NUM|P_VI_DEF, + (char_u *)&p_wmh, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCTX_INIT}, + {"winminwidth", "wmw", P_NUM|P_VI_DEF, + (char_u *)&p_wmw, PV_NONE, +! {(char_u *)1L, (char_u *)0L} SCTX_INIT}, + {"winptydll", NULL, P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, + #if defined(WIN3264) && defined(FEAT_TERMINAL) + (char_u *)&p_winptydll, PV_NONE, { +*************** +*** 3114,3138 **** + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCRIPTID_INIT}, + {"winwidth", "wiw", P_NUM|P_VI_DEF, + (char_u *)&p_wiw, PV_NONE, +! {(char_u *)20L, (char_u *)0L} SCRIPTID_INIT}, + {"wrap", NULL, P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_WRAP, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"wrapmargin", "wm", P_NUM|P_VI_DEF, + (char_u *)&p_wm, PV_WM, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"wrapscan", "ws", P_BOOL|P_VI_DEF, + (char_u *)&p_ws, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"write", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_write, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, + {"writeany", "wa", P_BOOL|P_VI_DEF, + (char_u *)&p_wa, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"writebackup", "wb", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_wb, PV_NONE, + { +--- 3114,3138 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)0L, (char_u *)0L} + #endif +! SCTX_INIT}, + {"winwidth", "wiw", P_NUM|P_VI_DEF, + (char_u *)&p_wiw, PV_NONE, +! {(char_u *)20L, (char_u *)0L} SCTX_INIT}, + {"wrap", NULL, P_BOOL|P_VI_DEF|P_RWIN, + (char_u *)VAR_WIN, PV_WRAP, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"wrapmargin", "wm", P_NUM|P_VI_DEF, + (char_u *)&p_wm, PV_WM, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"wrapscan", "ws", P_BOOL|P_VI_DEF, + (char_u *)&p_ws, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"write", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_write, PV_NONE, +! {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, + {"writeany", "wa", P_BOOL|P_VI_DEF, + (char_u *)&p_wa, PV_NONE, +! {(char_u *)FALSE, (char_u *)0L} SCTX_INIT}, + {"writebackup", "wb", P_BOOL|P_VI_DEF|P_VIM, + (char_u *)&p_wb, PV_NONE, + { +*************** +*** 3141,3155 **** + #else + (char_u *)FALSE, + #endif +! (char_u *)0L} SCRIPTID_INIT}, + {"writedelay", "wd", P_NUM|P_VI_DEF, + (char_u *)&p_wd, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + + /* terminal output codes */ + #define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \ + (char_u *)&vvv, PV_NONE, \ +! {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, + + p_term("t_AB", T_CAB) + p_term("t_AF", T_CAF) +--- 3141,3155 ---- + #else + (char_u *)FALSE, + #endif +! (char_u *)0L} SCTX_INIT}, + {"writedelay", "wd", P_NUM|P_VI_DEF, + (char_u *)&p_wd, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + + /* terminal output codes */ + #define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \ + (char_u *)&vvv, PV_NONE, \ +! {(char_u *)"", (char_u *)0L} SCTX_INIT}, + + p_term("t_AB", T_CAB) + p_term("t_AF", T_CAF) +*************** +*** 3233,3239 **** + /* terminal key codes are not in here */ + + /* end marker */ +! {NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCRIPTID_INIT} + }; + + #define PARAM_COUNT (sizeof(options) / sizeof(struct vimoption)) +--- 3233,3239 ---- + /* terminal key codes are not in here */ + + /* end marker */ +! {NULL, NULL, 0, NULL, PV_NONE, {NULL, NULL} SCTX_INIT} + }; + + #define PARAM_COUNT (sizeof(options) / sizeof(struct vimoption)) +*************** +*** 3314,3320 **** + static char_u *compile_cap_prog(synblock_T *synblock); + #endif + #ifdef FEAT_EVAL +! static void set_option_scriptID_idx(int opt_idx, int opt_flags, int id); + #endif + static char_u *set_bool_option(int opt_idx, char_u *varp, int value, int opt_flags); + static char_u *set_num_option(int opt_idx, char_u *varp, long value, char_u *errbuf, size_t errbuflen, int opt_flags); +--- 3314,3320 ---- + static char_u *compile_cap_prog(synblock_T *synblock); + #endif + #ifdef FEAT_EVAL +! static void set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx); + #endif + static char_u *set_bool_option(int opt_idx, char_u *varp, int value, int opt_flags); + static char_u *set_num_option(int opt_idx, char_u *varp, long value, char_u *errbuf, size_t errbuflen, int opt_flags); +*************** +*** 3854,3860 **** + } + + #ifdef FEAT_EVAL +! set_option_scriptID_idx(opt_idx, opt_flags, current_SID); + #endif + } + +--- 3854,3860 ---- + } + + #ifdef FEAT_EVAL +! set_option_sctx_idx(opt_idx, opt_flags, current_sctx); + #endif + } + +*************** +*** 4679,4690 **** + { + /* Mention where the option was last set. */ + if (varp == options[opt_idx].var) +! last_set_msg(options[opt_idx].scriptID); + else if ((int)options[opt_idx].indir & PV_WIN) +! last_set_msg(curwin->w_p_scriptID[ + (int)options[opt_idx].indir & PV_MASK]); + else if ((int)options[opt_idx].indir & PV_BUF) +! last_set_msg(curbuf->b_p_scriptID[ + (int)options[opt_idx].indir & PV_MASK]); + } + #endif +--- 4679,4690 ---- + { + /* Mention where the option was last set. */ + if (varp == options[opt_idx].var) +! last_set_msg(options[opt_idx].script_ctx); + else if ((int)options[opt_idx].indir & PV_WIN) +! last_set_msg(curwin->w_p_script_ctx[ + (int)options[opt_idx].indir & PV_MASK]); + else if ((int)options[opt_idx].indir & PV_BUF) +! last_set_msg(curbuf->b_p_script_ctx[ + (int)options[opt_idx].indir & PV_MASK]); + } + #endif +*************** +*** 5889,5896 **** + * Set a string option to a new value (without checking the effect). + * The string is copied into allocated memory. + * if ("opt_idx" == -1) "name" is used, otherwise "opt_idx" is used. +! * When "set_sid" is zero set the scriptID to current_SID. When "set_sid" is +! * SID_NONE don't set the scriptID. Otherwise set the scriptID to "set_sid". + */ + void + set_string_option_direct( +--- 5889,5897 ---- + * Set a string option to a new value (without checking the effect). + * The string is copied into allocated memory. + * if ("opt_idx" == -1) "name" is used, otherwise "opt_idx" is used. +! * When "set_sid" is zero set the scriptID to current_sctx.sc_sid. When +! * "set_sid" is SID_NONE don't set the scriptID. Otherwise set the scriptID to +! * "set_sid". + */ + void + set_string_option_direct( +*************** +*** 5943,5950 **** + } + # ifdef FEAT_EVAL + if (set_sid != SID_NONE) +! set_option_scriptID_idx(idx, opt_flags, +! set_sid == 0 ? current_SID : set_sid); + # endif + } + } +--- 5944,5961 ---- + } + # ifdef FEAT_EVAL + if (set_sid != SID_NONE) +! { +! sctx_T script_ctx; +! +! if (set_sid == 0) +! script_ctx = current_sctx; +! else +! { +! script_ctx.sc_sid = set_sid; +! script_ctx.sc_lnum = 0; +! } +! set_option_sctx_idx(idx, opt_flags, script_ctx); +! } + # endif + } + } +*************** +*** 7656,7662 **** + { + #ifdef FEAT_EVAL + /* Remember where the option was set. */ +! set_option_scriptID_idx(opt_idx, opt_flags, current_SID); + #endif + /* + * Free string options that are in allocated memory. +--- 7667,7673 ---- + { + #ifdef FEAT_EVAL + /* Remember where the option was set. */ +! set_option_sctx_idx(opt_idx, opt_flags, current_sctx); + #endif + /* + * Free string options that are in allocated memory. +*************** +*** 8215,8239 **** + + #if defined(FEAT_EVAL) || defined(PROTO) + /* +! * Set the scriptID for an option, taking care of setting the buffer- or + * window-local value. + */ + static void +! set_option_scriptID_idx(int opt_idx, int opt_flags, int id) + { + int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0; + int indir = (int)options[opt_idx].indir; + + /* Remember where the option was set. For local options need to do that + * in the buffer or window structure. */ + if (both || (opt_flags & OPT_GLOBAL) || (indir & (PV_BUF|PV_WIN)) == 0) +! options[opt_idx].scriptID = id; + if (both || (opt_flags & OPT_LOCAL)) + { + if (indir & PV_BUF) +! curbuf->b_p_scriptID[indir & PV_MASK] = id; + else if (indir & PV_WIN) +! curwin->w_p_scriptID[indir & PV_MASK] = id; + } + } + #endif +--- 8226,8253 ---- + + #if defined(FEAT_EVAL) || defined(PROTO) + /* +! * Set the script_ctx for an option, taking care of setting the buffer- or + * window-local value. + */ + static void +! set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx) + { + int both = (opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0; + int indir = (int)options[opt_idx].indir; ++ sctx_T new_script_ctx = script_ctx; ++ ++ new_script_ctx.sc_lnum += sourcing_lnum; + + /* Remember where the option was set. For local options need to do that + * in the buffer or window structure. */ + if (both || (opt_flags & OPT_GLOBAL) || (indir & (PV_BUF|PV_WIN)) == 0) +! options[opt_idx].script_ctx = new_script_ctx; + if (both || (opt_flags & OPT_LOCAL)) + { + if (indir & PV_BUF) +! curbuf->b_p_script_ctx[indir & PV_MASK] = new_script_ctx; + else if (indir & PV_WIN) +! curwin->w_p_script_ctx[indir & PV_MASK] = new_script_ctx; + } + } + #endif +*************** +*** 8262,8268 **** + *(int *)varp = value; /* set the new value */ + #ifdef FEAT_EVAL + /* Remember where the option was set. */ +! set_option_scriptID_idx(opt_idx, opt_flags, current_SID); + #endif + + #ifdef FEAT_GUI +--- 8276,8282 ---- + *(int *)varp = value; /* set the new value */ + #ifdef FEAT_EVAL + /* Remember where the option was set. */ +! set_option_sctx_idx(opt_idx, opt_flags, current_sctx); + #endif + + #ifdef FEAT_GUI +*************** +*** 8898,8904 **** + *pp = value; + #ifdef FEAT_EVAL + /* Remember where the option was set. */ +! set_option_scriptID_idx(opt_idx, opt_flags, current_SID); + #endif + #ifdef FEAT_GUI + need_mouse_correct = TRUE; +--- 8912,8918 ---- + *pp = value; + #ifdef FEAT_EVAL + /* Remember where the option was set. */ +! set_option_sctx_idx(opt_idx, opt_flags, current_sctx); + #endif + #ifdef FEAT_GUI + need_mouse_correct = TRUE; +*** ../vim-8.1.0361/src/proto/eval.pro 2018-08-01 19:05:59.278223228 +0200 +--- src/proto/eval.pro 2018-09-10 19:45:33.380367357 +0200 +*************** +*** 119,125 **** + int read_viminfo_varlist(vir_T *virp, int writing); + void write_viminfo_varlist(FILE *fp); + int store_session_globals(FILE *fd); +! void last_set_msg(scid_T scriptID); + void reset_v_option_vars(void); + void prepare_assert_error(garray_T *gap); + void assert_error(garray_T *gap); +--- 119,125 ---- + int read_viminfo_varlist(vir_T *virp, int writing); + void write_viminfo_varlist(FILE *fp); + int store_session_globals(FILE *fd); +! void last_set_msg(sctx_T script_ctx); + void reset_v_option_vars(void); + void prepare_assert_error(garray_T *gap); + void assert_error(garray_T *gap); +*** ../vim-8.1.0361/src/structs.h 2018-09-10 17:50:32.713306941 +0200 +--- src/structs.h 2018-09-10 20:18:06.669433878 +0200 +*************** +*** 75,80 **** +--- 75,93 ---- + #endif + + /* ++ * SCript ConteXt (SCTX): identifies a script script line. ++ * When sourcing a script "sc_lnum" is zero, "sourcing_lnum" is the current ++ * line number. When executing a user function "sc_lnum" is the line where the ++ * function was defined, "sourcing_lnum" is the line number inside the ++ * function. When stored with a function, mapping, option, etc. "sc_lnum" is ++ * the line number in the script "sc_sid". ++ */ ++ typedef struct { ++ scid_T sc_sid; // script ID ++ linenr_T sc_lnum; // line number ++ } sctx_T; ++ ++ /* + * Reference to a buffer that stores the value of buf_free_count. + * bufref_valid() only needs to check "buf" when the count differs. + */ +*************** +*** 278,285 **** + #endif + + #ifdef FEAT_EVAL +! int wo_scriptID[WV_COUNT]; /* SIDs for window-local options */ +! # define w_p_scriptID w_onebuf_opt.wo_scriptID + #endif + } winopt_T; + +--- 291,298 ---- + #endif + + #ifdef FEAT_EVAL +! sctx_T wo_script_ctx[WV_COUNT]; /* SCTXs for window-local options */ +! # define w_p_script_ctx w_onebuf_opt.wo_script_ctx + #endif + } winopt_T; + +*************** +*** 541,547 **** + int xp_pattern_len; /* bytes in xp_pattern before cursor */ + #if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) + char_u *xp_arg; /* completion function */ +! int xp_scriptID; /* SID for completion function */ + #endif + int xp_backslash; /* one of the XP_BS_ values */ + #ifndef BACKSLASH_IN_FILENAME +--- 554,560 ---- + int xp_pattern_len; /* bytes in xp_pattern before cursor */ + #if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) + char_u *xp_arg; /* completion function */ +! sctx_T xp_script_ctx; /* SCTX for completion function */ + #endif + int xp_backslash; /* one of the XP_BS_ values */ + #ifndef BACKSLASH_IN_FILENAME +*************** +*** 1071,1077 **** + char m_nowait; /* used */ + #ifdef FEAT_EVAL + char m_expr; /* used, m_str is an expression */ +! scid_T m_script_ID; /* ID of script where map was defined */ + #endif + }; + +--- 1084,1090 ---- + char m_nowait; /* used */ + #ifdef FEAT_EVAL + char m_expr; /* used, m_str is an expression */ +! sctx_T m_script_ctx; /* SCTX where map was defined */ + #endif + }; + +*************** +*** 1361,1367 **** + int uf_tml_idx; /* index of line being timed; -1 if none */ + int uf_tml_execed; /* line being timed was executed */ + #endif +! scid_T uf_script_ID; /* ID of script where function was defined, + used for s: variables */ + int uf_refcount; /* reference count, see func_name_refcount() */ + funccall_T *uf_scoped; /* l: local variables for closure */ +--- 1374,1380 ---- + int uf_tml_idx; /* index of line being timed; -1 if none */ + int uf_tml_execed; /* line being timed was executed */ + #endif +! sctx_T uf_script_ctx; /* SCTX where function was defined, + used for s: variables */ + int uf_refcount; /* reference count, see func_name_refcount() */ + funccall_T *uf_scoped; /* l: local variables for closure */ +*************** +*** 2123,2129 **** + int b_p_initialized; /* set when options initialized */ + + #ifdef FEAT_EVAL +! int b_p_scriptID[BV_COUNT]; /* SIDs for buffer-local options */ + #endif + + int b_p_ai; /* 'autoindent' */ +--- 2136,2142 ---- + int b_p_initialized; /* set when options initialized */ + + #ifdef FEAT_EVAL +! sctx_T b_p_script_ctx[BV_COUNT]; /* SCTXs for buffer-local options */ + #endif + + int b_p_ai; /* 'autoindent' */ +*** ../vim-8.1.0361/src/syntax.c 2018-07-20 19:56:06.006997358 +0200 +--- src/syntax.c 2018-09-10 20:08:06.315847823 +0200 +*************** +*** 58,64 **** + int sg_link; /* link to this highlight group ID */ + int sg_set; /* combination of SG_* flags */ + #ifdef FEAT_EVAL +! scid_T sg_scriptID; /* script in which the group was last set */ + #endif + }; + +--- 58,64 ---- + int sg_link; /* link to this highlight group ID */ + int sg_set; /* combination of SG_* flags */ + #ifdef FEAT_EVAL +! sctx_T sg_script_ctx; /* script in which the group was last set */ + #endif + }; + +*************** +*** 7507,7513 **** + } + else if (HL_TABLE()[from_id - 1].sg_link != to_id + #ifdef FEAT_EVAL +! || HL_TABLE()[from_id - 1].sg_scriptID != current_SID + #endif + || HL_TABLE()[from_id - 1].sg_cleared) + { +--- 7507,7514 ---- + } + else if (HL_TABLE()[from_id - 1].sg_link != to_id + #ifdef FEAT_EVAL +! || HL_TABLE()[from_id - 1].sg_script_ctx.sc_sid +! != current_sctx.sc_sid + #endif + || HL_TABLE()[from_id - 1].sg_cleared) + { +*************** +*** 7515,7521 **** + HL_TABLE()[from_id - 1].sg_set |= SG_LINK; + HL_TABLE()[from_id - 1].sg_link = to_id; + #ifdef FEAT_EVAL +! HL_TABLE()[from_id - 1].sg_scriptID = current_SID; + #endif + HL_TABLE()[from_id - 1].sg_cleared = FALSE; + redraw_all_later(SOME_VALID); +--- 7516,7523 ---- + HL_TABLE()[from_id - 1].sg_set |= SG_LINK; + HL_TABLE()[from_id - 1].sg_link = to_id; + #ifdef FEAT_EVAL +! HL_TABLE()[from_id - 1].sg_script_ctx = current_sctx; +! HL_TABLE()[from_id - 1].sg_script_ctx.sc_lnum += sourcing_lnum; + #endif + HL_TABLE()[from_id - 1].sg_cleared = FALSE; + redraw_all_later(SOME_VALID); +*************** +*** 8277,8283 **** + else + set_hl_attr(idx); + #ifdef FEAT_EVAL +! HL_TABLE()[idx].sg_scriptID = current_SID; + #endif + } + +--- 8279,8286 ---- + else + set_hl_attr(idx); + #ifdef FEAT_EVAL +! HL_TABLE()[idx].sg_script_ctx = current_sctx; +! HL_TABLE()[idx].sg_script_ctx.sc_lnum += sourcing_lnum; + #endif + } + +*************** +*** 8404,8410 **** + /* Clear the script ID only when there is no link, since that is not + * cleared. */ + if (HL_TABLE()[idx].sg_link == 0) +! HL_TABLE()[idx].sg_scriptID = 0; + #endif + } + +--- 8407,8416 ---- + /* Clear the script ID only when there is no link, since that is not + * cleared. */ + if (HL_TABLE()[idx].sg_link == 0) +! { +! HL_TABLE()[idx].sg_script_ctx.sc_sid = 0; +! HL_TABLE()[idx].sg_script_ctx.sc_lnum = 0; +! } + #endif + } + +*************** +*** 9272,9278 **** + highlight_list_arg(id, didh, LIST_STRING, 0, (char_u *)"cleared", ""); + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(sgp->sg_scriptID); + #endif + } + +--- 9278,9284 ---- + highlight_list_arg(id, didh, LIST_STRING, 0, (char_u *)"cleared", ""); + #ifdef FEAT_EVAL + if (p_verbose > 0) +! last_set_msg(sgp->sg_script_ctx); + #endif + } + +*** ../vim-8.1.0361/src/testdir/test_alot.vim 2018-08-07 21:39:09.251060096 +0200 +--- src/testdir/test_alot.vim 2018-09-10 19:45:33.380367357 +0200 +*************** +*** 14,19 **** +--- 14,20 ---- + source test_execute_func.vim + source test_expand.vim + source test_expand_dllpath.vim ++ source test_expand_func.vim + source test_expr.vim + source test_feedkeys.vim + source test_file_perm.vim +*** ../vim-8.1.0361/src/testdir/test_expand_func.vim 2018-09-10 21:02:19.285589846 +0200 +--- src/testdir/test_expand_func.vim 2018-09-10 19:52:46.982566605 +0200 +*************** +*** 0 **** +--- 1,66 ---- ++ " Tests for expand() ++ ++ let s:sfile = expand('') ++ let s:slnum = str2nr(expand('')) ++ let s:sflnum = str2nr(expand('')) ++ ++ func s:expand_sfile() ++ return expand('') ++ endfunc ++ ++ func s:expand_slnum() ++ return str2nr(expand('')) ++ endfunc ++ ++ func s:expand_sflnum() ++ return str2nr(expand('')) ++ endfunc ++ ++ func Test_expand_sfile() ++ call assert_match('test_expand_func\.vim$', s:sfile) ++ call assert_match('^function .*\.\.Test_expand_sfile$', expand('')) ++ ++ " Call in script-local function ++ call assert_match('^function .*\.\.Test_expand_sfile\[5\]\.\.\d\+_expand_sfile$', s:expand_sfile()) ++ ++ " Call in command ++ command Sfile echo expand('') ++ call assert_match('^function .*\.\.Test_expand_sfile$', trim(execute('Sfile'))) ++ delcommand Sfile ++ endfunc ++ ++ func Test_expand_slnum() ++ call assert_equal(4, s:slnum) ++ call assert_equal(2, str2nr(expand(''))) ++ ++ " Line-continuation ++ call assert_equal( ++ \ 5, ++ \ str2nr(expand(''))) ++ ++ " Call in script-local function ++ call assert_equal(1, s:expand_slnum()) ++ ++ " Call in command ++ command Slnum echo expand('') ++ call assert_equal(14, str2nr(trim(execute('Slnum')))) ++ delcommand Slnum ++ endfunc ++ ++ func Test_expand_sflnum() ++ call assert_equal(5, s:sflnum) ++ call assert_equal(52, str2nr(expand(''))) ++ ++ " Line-continuation ++ call assert_equal( ++ \ 55, ++ \ str2nr(expand(''))) ++ ++ " Call in script-local function ++ call assert_equal(16, s:expand_sflnum()) ++ ++ " Call in command ++ command Flnum echo expand('') ++ call assert_equal(64, str2nr(trim(execute('Flnum')))) ++ delcommand Flnum ++ endfunc +*** ../vim-8.1.0361/src/testdir/test_maparg.vim 2018-05-21 13:28:40.320041589 +0200 +--- src/testdir/test_maparg.vim 2018-09-10 20:53:41.911220447 +0200 +*************** +*** 13,31 **** + set cpo-=< + set encoding=utf8 + " Test maparg() with a string result + map foo isfoo + vnoremap