Changeset cf8ec94
- Timestamp:
- Jul 23, 2014, 12:36:01 AM (10 years ago)
- Branches:
- clfs-3.0.0-sysvinit, sysvinit
- Children:
- 28efa58
- Parents:
- 4d9d90c (diff), 4a2299c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 1 added
- 1 deleted
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
BOOK/introduction/common/changelog.xml
r4d9d90c rcf8ec94 38 38 39 39 <listitem> 40 <para>21 July 2014</para> 41 <itemizedlist> 42 <listitem> 43 <para>[William Harrington] - Update MPFR 3.1.2 fixes patch for patch 44 level 10 update.</para> 45 </listitem> 46 <listitem> 47 <para>[William Harrington] - Update VIM 7.4 Branch Update patch to 48 patch level 373.</para> 49 </listitem> 50 <listitem> 51 <para>[William Harrington] - Update Linux to 3.14.13.</para> 52 </listitem> 53 </itemizedlist> 54 </listitem> 55 56 <listitem> 40 57 <para>18 July 2014</para> 41 58 <itemizedlist> -
BOOK/packages.ent
r4d9d90c rcf8ec94 292 292 293 293 <!ENTITY linux-version "3.14"> 294 <!ENTITY linux-version2 "&linux-version;.1 2">294 <!ENTITY linux-version2 "&linux-version;.13"> 295 295 <!ENTITY linux-size "78,399 KB"> 296 296 <!ENTITY linux-url "&kernel;linux/kernel/v&linux-dl-version;/linux-&linux-version;.tar.xz"> -
BOOK/patches.ent
r4d9d90c rcf8ec94 46 46 47 47 <!ENTITY linux-sublevel-patch "patch-&linux-version2;.xz"> 48 <!ENTITY linux-sublevel-patch-md5 " 89a5af1f3609d0c27e63fea298dd80ed">49 <!ENTITY linux-sublevel-patch-size "3 24KB">48 <!ENTITY linux-sublevel-patch-md5 "132470897fc5d57f5ac7d658100cc430"> 49 <!ENTITY linux-sublevel-patch-size "338 KB"> 50 50 51 <!ENTITY mpfr-fixes-patch "mpfr-&mpfr-version;-fixes- 3.patch">52 <!ENTITY mpfr-fixes-patch-md5 " 34cec761c2e53658aad1214d77b7f184">53 <!ENTITY mpfr-fixes-patch-size " 45 KB">51 <!ENTITY mpfr-fixes-patch "mpfr-&mpfr-version;-fixes-4.patch"> 52 <!ENTITY mpfr-fixes-patch-md5 "b6c1c0dcbf7661298037eeb346a8669c"> 53 <!ENTITY mpfr-fixes-patch-size "55 KB"> 54 54 55 55 <!ENTITY ncurses-bashfix-patch "ncurses-&ncurses-version;-bash_fix-1.patch"> … … 75 75 <!-- Vim branch update patch area --> 76 76 77 <!ENTITY vim-branch_update-patch "vim-&vim-version;-branch_update- 4.patch">78 <!ENTITY vim-branch_update-patch-md5 " 242c96838a05da13b47d25fb62bf8418">79 <!ENTITY vim-branch_update-patch-size " 2,846KB">77 <!ENTITY vim-branch_update-patch "vim-&vim-version;-branch_update-5.patch"> 78 <!ENTITY vim-branch_update-patch-md5 "ef591881ff7aa8baac8aecc201e20f12"> 79 <!ENTITY vim-branch_update-patch-size "3,139 KB"> 80 80 81 81 <!-- Start of multilib patches --> -
patches/mpfr-3.1.2-fixes-4.patch
r4d9d90c rcf8ec94 1 1 Submitted By: William Harrington (kb0iic at cross-lfs dot org) 2 Date: 2014-0 5-092 Date: 2014-07-21 3 3 Initial Package Version: 3.1.2 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches of mpfr current to patch level 8.6 Description: Contains all upstream patches of mpfr current to patch level 10. 7 7 8 8 diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES … … 1279 1279 + return "3.1.2-p8"; 1280 1280 } 1281 diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES 1282 --- mpfr-3.1.2-a/PATCHES 2014-06-30 15:15:25.533266905 +0000 1283 +++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:15:25.617269178 +0000 1284 @@ -0,0 +1 @@ 1285 +div-overflow 1286 diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION 1287 --- mpfr-3.1.2-a/VERSION 2014-06-30 15:15:25.529266797 +0000 1288 +++ mpfr-3.1.2-b/VERSION 2014-06-30 15:15:25.617269178 +0000 1289 @@ -1 +1 @@ 1290 -3.1.2-p8 1291 +3.1.2-p9 1292 diff -Naurd mpfr-3.1.2-a/src/div.c mpfr-3.1.2-b/src/div.c 1293 --- mpfr-3.1.2-a/src/div.c 2013-03-13 15:37:33.000000000 +0000 1294 +++ mpfr-3.1.2-b/src/div.c 2014-06-30 15:15:25.585268312 +0000 1295 @@ -750,7 +750,9 @@ 1296 truncate_check_qh: 1297 if (qh) 1298 { 1299 - qexp ++; 1300 + if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) 1301 + qexp ++; 1302 + /* else qexp is now incorrect, but one will still get an overflow */ 1303 q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; 1304 } 1305 goto truncate; 1306 @@ -765,7 +767,9 @@ 1307 inex = 1; /* always here */ 1308 if (mpn_add_1 (q0p, q0p, q0size, MPFR_LIMB_ONE << sh)) 1309 { 1310 - qexp ++; 1311 + if (MPFR_LIKELY (qexp < MPFR_EXP_MAX)) 1312 + qexp ++; 1313 + /* else qexp is now incorrect, but one will still get an overflow */ 1314 q0p[q0size - 1] = MPFR_LIMB_HIGHBIT; 1315 } 1316 1317 diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h 1318 --- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:15:25.533266905 +0000 1319 +++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:15:25.613269070 +0000 1320 @@ -27,7 +27,7 @@ 1321 #define MPFR_VERSION_MAJOR 3 1322 #define MPFR_VERSION_MINOR 1 1323 #define MPFR_VERSION_PATCHLEVEL 2 1324 -#define MPFR_VERSION_STRING "3.1.2-p8" 1325 +#define MPFR_VERSION_STRING "3.1.2-p9" 1326 1327 /* Macros dealing with MPFR VERSION */ 1328 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) 1329 diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c 1330 --- mpfr-3.1.2-a/src/version.c 2014-06-30 15:15:25.533266905 +0000 1331 +++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:15:25.613269070 +0000 1332 @@ -25,5 +25,5 @@ 1333 const char * 1334 mpfr_get_version (void) 1335 { 1336 - return "3.1.2-p8"; 1337 + return "3.1.2-p9"; 1338 } 1339 diff -Naurd mpfr-3.1.2-a/tests/tdiv.c mpfr-3.1.2-b/tests/tdiv.c 1340 --- mpfr-3.1.2-a/tests/tdiv.c 2013-03-13 15:37:44.000000000 +0000 1341 +++ mpfr-3.1.2-b/tests/tdiv.c 2014-06-30 15:15:25.585268312 +0000 1342 @@ -1104,6 +1104,96 @@ 1343 #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) 1344 #include "tgeneric.c" 1345 1346 +static void 1347 +test_extreme (void) 1348 +{ 1349 + mpfr_t x, y, z; 1350 + mpfr_exp_t emin, emax; 1351 + mpfr_prec_t p[4] = { 8, 32, 64, 256 }; 1352 + int xi, yi, zi, j, r; 1353 + unsigned int flags, ex_flags; 1354 + 1355 + emin = mpfr_get_emin (); 1356 + emax = mpfr_get_emax (); 1357 + 1358 + mpfr_set_emin (MPFR_EMIN_MIN); 1359 + mpfr_set_emax (MPFR_EMAX_MAX); 1360 + 1361 + for (xi = 0; xi < 4; xi++) 1362 + { 1363 + mpfr_init2 (x, p[xi]); 1364 + mpfr_setmax (x, MPFR_EMAX_MAX); 1365 + MPFR_ASSERTN (mpfr_check (x)); 1366 + for (yi = 0; yi < 4; yi++) 1367 + { 1368 + mpfr_init2 (y, p[yi]); 1369 + mpfr_setmin (y, MPFR_EMIN_MIN); 1370 + for (j = 0; j < 2; j++) 1371 + { 1372 + MPFR_ASSERTN (mpfr_check (y)); 1373 + for (zi = 0; zi < 4; zi++) 1374 + { 1375 + mpfr_init2 (z, p[zi]); 1376 + RND_LOOP (r) 1377 + { 1378 + mpfr_clear_flags (); 1379 + mpfr_div (z, x, y, (mpfr_rnd_t) r); 1380 + flags = __gmpfr_flags; 1381 + MPFR_ASSERTN (mpfr_check (z)); 1382 + ex_flags = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT; 1383 + if (flags != ex_flags) 1384 + { 1385 + printf ("Bad flags in test_extreme on z = a/b" 1386 + " with %s and\n", 1387 + mpfr_print_rnd_mode ((mpfr_rnd_t) r)); 1388 + printf ("a = "); 1389 + mpfr_dump (x); 1390 + printf ("b = "); 1391 + mpfr_dump (y); 1392 + printf ("Expected flags:"); 1393 + flags_out (ex_flags); 1394 + printf ("Got flags: "); 1395 + flags_out (flags); 1396 + printf ("z = "); 1397 + mpfr_dump (z); 1398 + exit (1); 1399 + } 1400 + mpfr_clear_flags (); 1401 + mpfr_div (z, y, x, (mpfr_rnd_t) r); 1402 + flags = __gmpfr_flags; 1403 + MPFR_ASSERTN (mpfr_check (z)); 1404 + ex_flags = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT; 1405 + if (flags != ex_flags) 1406 + { 1407 + printf ("Bad flags in test_extreme on z = a/b" 1408 + " with %s and\n", 1409 + mpfr_print_rnd_mode ((mpfr_rnd_t) r)); 1410 + printf ("a = "); 1411 + mpfr_dump (y); 1412 + printf ("b = "); 1413 + mpfr_dump (x); 1414 + printf ("Expected flags:"); 1415 + flags_out (ex_flags); 1416 + printf ("Got flags: "); 1417 + flags_out (flags); 1418 + printf ("z = "); 1419 + mpfr_dump (z); 1420 + exit (1); 1421 + } 1422 + } 1423 + mpfr_clear (z); 1424 + } /* zi */ 1425 + mpfr_nextabove (y); 1426 + } /* j */ 1427 + mpfr_clear (y); 1428 + } /* yi */ 1429 + mpfr_clear (x); 1430 + } /* xi */ 1431 + 1432 + set_emin (emin); 1433 + set_emax (emax); 1434 +} 1435 + 1436 int 1437 main (int argc, char *argv[]) 1438 { 1439 @@ -1130,6 +1220,7 @@ 1440 test_20070603 (); 1441 test_20070628 (); 1442 test_generic (2, 800, 50); 1443 + test_extreme (); 1444 1445 tests_end_mpfr (); 1446 return 0; 1447 diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES 1448 --- mpfr-3.1.2-a/PATCHES 2014-06-30 15:17:53.337268149 +0000 1449 +++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:17:53.417270314 +0000 1450 @@ -0,0 +1 @@ 1451 +vasprintf 1452 diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION 1453 --- mpfr-3.1.2-a/VERSION 2014-06-30 15:17:53.337268149 +0000 1454 +++ mpfr-3.1.2-b/VERSION 2014-06-30 15:17:53.413270206 +0000 1455 @@ -1 +1 @@ 1456 -3.1.2-p9 1457 +3.1.2-p10 1458 diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h 1459 --- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:17:53.337268149 +0000 1460 +++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:17:53.413270206 +0000 1461 @@ -27,7 +27,7 @@ 1462 #define MPFR_VERSION_MAJOR 3 1463 #define MPFR_VERSION_MINOR 1 1464 #define MPFR_VERSION_PATCHLEVEL 2 1465 -#define MPFR_VERSION_STRING "3.1.2-p9" 1466 +#define MPFR_VERSION_STRING "3.1.2-p10" 1467 1468 /* Macros dealing with MPFR VERSION */ 1469 #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) 1470 diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c 1471 --- mpfr-3.1.2-a/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000 1472 +++ mpfr-3.1.2-b/src/vasprintf.c 2014-06-30 15:17:53.377269231 +0000 1473 @@ -884,14 +884,18 @@ 1474 first digit, we want the exponent for radix two and the decimal 1475 point AFTER the first digit. */ 1476 { 1477 - MPFR_ASSERTN (exp > MPFR_EMIN_MIN /4); /* possible overflow */ 1478 + /* An integer overflow is normally not possible since MPFR_EXP_MIN 1479 + is twice as large as MPFR_EMIN_MIN. */ 1480 + MPFR_ASSERTN (exp > (MPFR_EXP_MIN + 3) / 4); 1481 exp = (exp - 1) * 4; 1482 } 1483 else 1484 /* EXP is the exponent for decimal point BEFORE the first digit, we 1485 want the exponent for decimal point AFTER the first digit. */ 1486 { 1487 - MPFR_ASSERTN (exp > MPFR_EMIN_MIN); /* possible overflow */ 1488 + /* An integer overflow is normally not possible since MPFR_EXP_MIN 1489 + is twice as large as MPFR_EMIN_MIN. */ 1490 + MPFR_ASSERTN (exp > MPFR_EXP_MIN); 1491 --exp; 1492 } 1493 } 1494 diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c 1495 --- mpfr-3.1.2-a/src/version.c 2014-06-30 15:17:53.337268149 +0000 1496 +++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:17:53.413270206 +0000 1497 @@ -25,5 +25,5 @@ 1498 const char * 1499 mpfr_get_version (void) 1500 { 1501 - return "3.1.2-p9"; 1502 + return "3.1.2-p10"; 1503 } 1504 diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c 1505 --- mpfr-3.1.2-a/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000 1506 +++ mpfr-3.1.2-b/tests/tsprintf.c 2014-06-30 15:17:53.377269231 +0000 1507 @@ -1184,6 +1184,69 @@ 1508 check_emax_aux (MPFR_EMAX_MAX); 1509 } 1510 1511 +static void 1512 +check_emin_aux (mpfr_exp_t e) 1513 +{ 1514 + mpfr_t x; 1515 + char *s1, s2[256]; 1516 + int i; 1517 + mpfr_exp_t emin; 1518 + mpz_t ee; 1519 + 1520 + MPFR_ASSERTN (e >= LONG_MIN); 1521 + emin = mpfr_get_emin (); 1522 + set_emin (e); 1523 + 1524 + mpfr_init2 (x, 16); 1525 + mpz_init (ee); 1526 + 1527 + mpfr_setmin (x, e); 1528 + mpz_set_si (ee, e); 1529 + mpz_sub_ui (ee, ee, 1); 1530 + 1531 + i = mpfr_asprintf (&s1, "%Ra", x); 1532 + MPFR_ASSERTN (i > 0); 1533 + 1534 + gmp_snprintf (s2, 256, "0x1p%Zd", ee); 1535 + 1536 + if (strcmp (s1, s2) != 0) 1537 + { 1538 + printf ("Error in check_emin_aux for emin = %ld\n", (long) e); 1539 + printf ("Expected %s\n", s2); 1540 + printf ("Got %s\n", s1); 1541 + exit (1); 1542 + } 1543 + 1544 + mpfr_free_str (s1); 1545 + 1546 + i = mpfr_asprintf (&s1, "%Rb", x); 1547 + MPFR_ASSERTN (i > 0); 1548 + 1549 + gmp_snprintf (s2, 256, "1p%Zd", ee); 1550 + 1551 + if (strcmp (s1, s2) != 0) 1552 + { 1553 + printf ("Error in check_emin_aux for emin = %ld\n", (long) e); 1554 + printf ("Expected %s\n", s2); 1555 + printf ("Got %s\n", s1); 1556 + exit (1); 1557 + } 1558 + 1559 + mpfr_free_str (s1); 1560 + 1561 + mpfr_clear (x); 1562 + mpz_clear (ee); 1563 + set_emin (emin); 1564 +} 1565 + 1566 +static void 1567 +check_emin (void) 1568 +{ 1569 + check_emin_aux (-15); 1570 + check_emin_aux (mpfr_get_emin ()); 1571 + check_emin_aux (MPFR_EMIN_MIN); 1572 +} 1573 + 1574 int 1575 main (int argc, char **argv) 1576 { 1577 @@ -1203,6 +1266,7 @@ 1578 decimal (); 1579 mixed (); 1580 check_emax (); 1581 + check_emin (); 1582 1583 #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) 1584 locale_da_DK (); -
patches/vim-7.4-branch_update-5.patch
r4d9d90c rcf8ec94 1 1 Submitted By: William Harrington (kb0iic at cross-lfs dot org) 2 Date: 2014-0 5-312 Date: 2014-07-21 3 3 Initial Package Version: 7.4 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 7.4.3 16.6 Description: Contains all upstream patches up to 7.4.373. 7 7 8 8 diff -Naur vim74.orig/.hg_archival.txt vim74/.hg_archival.txt 9 9 --- vim74.orig/.hg_archival.txt 1970-01-01 00:00:00.000000000 +0000 10 +++ vim74/.hg_archival.txt 2014-0 6-01 00:42:48.067546692+000010 +++ vim74/.hg_archival.txt 2014-07-21 23:33:10.410210199 +0000 11 11 @@ -0,0 +1,5 @@ 12 12 +repo: 770908d1cb47c04be0aef5c173b17ab8be6b6476 13 +node: bed71c37618c11240596390f277d4f5e60d35ebc13 +node: 32a77cc160d922036ee28363f1a183f8e37f77ed 14 14 +branch: default 15 +latesttag: v7-4-3 1616 +latesttagdistance: 115 +latesttag: v7-4-373 16 +latesttagdistance: 2 17 17 diff -Naur vim74.orig/.hgignore vim74/.hgignore 18 18 --- vim74.orig/.hgignore 1970-01-01 00:00:00.000000000 +0000 19 +++ vim74/.hgignore 2014-0 6-01 00:42:48.107546590+000020 @@ -0,0 +1,7 4@@19 +++ vim74/.hgignore 2014-07-21 23:33:10.436876796 +0000 20 @@ -0,0 +1,75 @@ 21 21 +syntax: glob 22 22 + … … 85 85 + 86 86 +# Generated by "make test" 87 +src/po/*.ck 88 +src/testdir/mbyte.vim 89 +src/testdir/mzscheme.vim 90 +src/testdir/lua.vim 91 +src/testdir/small.vim 92 +src/testdir/tiny.vim 87 +src/po/*.ck 88 +src/testdir/mbyte.vim 89 +src/testdir/mzscheme.vim 90 +src/testdir/lua.vim 91 +src/testdir/small.vim 92 +src/testdir/tiny.vim 93 93 +src/testdir/test*.out 94 94 +src/testdir/test.log 95 +src/memfile_test 95 96 diff -Naur vim74.orig/.hgtags vim74/.hgtags 96 97 --- vim74.orig/.hgtags 1970-01-01 00:00:00.000000000 +0000 97 +++ vim74/.hgtags 2014-0 6-01 00:42:48.127546539 +000098 @@ -0,0 +1,30 41@@98 +++ vim74/.hgtags 2014-07-21 23:33:10.453543419 +0000 99 @@ -0,0 +1,3098 @@ 99 100 +004eb98eb3c30714cb6a24ec3e810275080a8413 v7-1-117 100 101 +006e9c8a6a8ad354a5cb6adcce6ebfceddeb20ee v7-0079 … … 3138 3139 +646616b6ff4defcc7bef0b198b540f6d965a8126 v7-4-315 3139 3140 +0fc665889e8f0af532cb4e3be2f0ff0421bf2fbc v7-4-316 3141 +8ffcb546d782121dfc9d88c7edc6f62421efce89 v7-4-317 3142 +5c47dacf397c1c65d2dfc237b3ff395c66ec3d4d v7-4-318 3143 +a076237d1c3849535681e82946a9041ed5525d7f v7-4-319 3144 +f7bc601823e5c81e2ca412506a42eff9fd790ace v7-4-320 3145 +c052937aae8ca5082f308b8ff0712c7eccdd30c8 v7-4-321 3146 +fd96c55d683d76ece4ba01490d9796c13c988cdc v7-4-322 3147 +238f5027830cad22e17a970483af9b160869cdf3 v7-4-323 3148 +c476e0ac8b406693c3877baffa0e97ff25e59b06 v7-4-324 3149 +1f288d2475488c3f44c7248e99019e2612580716 v7-4-325 3150 +1dbcb23ae7a8b68ddbc28b4feb794c4c1db12395 v7-4-326 3151 +99d8f2d72dcd4b850de81998cc9b1120c8165762 v7-4-327 3152 +01d9ffdd6e6ffb39faf946e13ec63bd7dc31e162 v7-4-328 3153 +018df65085f8990c1407442f8c783d4cee72a479 v7-4-329 3154 +f9fa2e506b9f07549cd91074835c5c553db7b3a7 v7-4-330 3155 +6d984caa0409fd284722c44cb09a0a2b5360bd4f v7-4-331 3156 +8fed02d53b45848b0fff60de13d06858963cfb17 v7-4-332 3157 +8ae50e3ef8bf733c0869c01b5132d02feffc0955 v7-4-333 3158 +03d260a8ea0c0c67f424c387dbe2af5754e5e589 v7-4-334 3159 +8ad2ecd116021ad5c945426e8bb80d741392b780 v7-4-335 3160 +a42ba1e5099290a86cac1a9ac490c49e82e4c2cf v7-4-336 3161 +0206ac84ff5fdce6d893c470e0909d2aed547a24 v7-4-337 3162 +ef83b423ebf7de11c1063c795dd2186a9b59b90f v7-4-338 3163 +fd7110d0c3bf4fea3cfa3d16da6c2a945d327c27 v7-4-339 3164 +03f95f5e311b84653df70fb3c08a9d92cf21b8f0 v7-4-340 3165 +adc4a84f72eb44dae657af713922a6e2c1f64ae3 v7-4-341 3166 +8dcc6f142460b2d5eee119a174d441d46d95cd99 v7-4-342 3167 +539ce56d8f35fe2deb5c4f57335e1adf97ae4e74 v7-4-343 3168 +ce284c205558d103326a4c3f22f181774690b3eb v7-4-344 3169 +ea2c5dfee1b04d216ebf992c5f46ecbdfee2854a v7-4-345 3170 +3248c6e40aee01a7254d111dd846c6ec7889a804 v7-4-346 3171 +a162d41f10e1c3c8673d86d8b0c58fdaf1bddeaf v7-4-347 3172 +0b7586868f6da0372af7510650240e22dc1e6e64 v7-4-348 3173 +79950dae1d7de8fc2cb0f8ddd087d403e2b9ce8e v7-4-349 3174 +ad005d0114c1d2d83490787ef7ea2a3c6e5e7b9e v7-4-350 3175 +f9ec944e4474c649faad642797ffd798a7102549 v7-4-351 3176 +b4962cf3a1c06a1f60f1d750df8fcf7035b00b99 v7-4-352 3177 +d42a1d3b74d40f580359dbd139d2d0dfa7235252 v7-4-353 3178 +5deaa4e9812d4b4ae59d8a3e70bf19983e07e6da v7-4-354 3179 +9a4efda75b5ef0f496d6a29c0a4dfcc7c03412f9 v7-4-355 3180 +34465a179ce21c827cab4c65a75e6b490600a96f v7-4-356 3181 +4eedfc4911a1db9c4874689f6c652be0094838f2 v7-4-357 3182 +771b97ba3b4768c77f2070423a93152d6977f012 v7-4-358 3183 +182c7b987283a567121e9c43d831779d1c88645f v7-4-359 3184 +761687c6808f4c9c80d33a919a6bb506dfe9f674 v7-4-360 3185 +a97e5b9dbc26800830e46cf3c1aa6efbfe258097 v7-4-361 3186 +7fa2bed947fde3514a700c96861a537d816d6fd4 v7-4-362 3187 +ff3816167b73fde35017d364b1a820014cd42e76 v7-4-363 3188 +7b324826757595b21b0410a7b6f00227d73c655f v7-4-364 3189 +4625fa27ba6f5b06294675b7f0d1bf8ae8f249fb v7-4-365 3190 +ad775b58706587b6acfb0bb2c732e184efe4f778 v7-4-366 3191 +bdbe2037066df6a463346be1768a56d98001fb36 v7-4-367 3192 +021e16be3c026c9f883b2aba0b48469ecbae5d88 v7-4-368 3193 +72ee0db83788638c36bbcb076cabc2ba6c8cd4e7 v7-4-369 3194 +50575818a97fa4777e52272f5ffc769179d76a8d v7-4-370 3195 +d44f298c43c74555f4ea21b710d377133f948d61 v7-4-371 3196 +a122efb555c4f08405051369310451a627ed524b v7-4-372 3197 +353330c512a9488cf5c1a3f8b8a57fa8cdd83a7a v7-4-373 3140 3198 diff -Naur vim74.orig/Filelist vim74/Filelist 3141 3199 --- vim74.orig/Filelist 2013-07-13 13:23:38.000000000 +0000 3142 +++ vim74/Filelist 2014-0 6-01 00:42:48.197546361+00003200 +++ vim74/Filelist 2014-07-21 23:33:10.503543288 +0000 3143 3201 @@ -3,6 +3,7 @@ 3144 3202 … … 3167 3225 diff -Naur vim74.orig/runtime/autoload/clojurecomplete.vim vim74/runtime/autoload/clojurecomplete.vim 3168 3226 --- vim74.orig/runtime/autoload/clojurecomplete.vim 2013-02-06 14:35:23.000000000 +0000 3169 +++ vim74/runtime/autoload/clojurecomplete.vim 2014-0 6-01 00:42:49.274210286+00003227 +++ vim74/runtime/autoload/clojurecomplete.vim 2014-07-21 23:33:11.583540470 +0000 3170 3228 @@ -1,20 +1,22 @@ 3171 3229 " Vim completion script … … 3208 3266 diff -Naur vim74.orig/runtime/autoload/getscript.vim vim74/runtime/autoload/getscript.vim 3209 3267 --- vim74.orig/runtime/autoload/getscript.vim 2013-04-17 13:40:44.000000000 +0000 3210 +++ vim74/runtime/autoload/getscript.vim 2014-0 6-01 00:42:49.320876834+00003268 +++ vim74/runtime/autoload/getscript.vim 2014-07-21 23:33:11.626873690 +0000 3211 3269 @@ -1,8 +1,8 @@ 3212 3270 " --------------------------------------------------------------------- … … 3240 3298 3241 3299 " this loop updates the GetLatestVimScripts.dat file 3300 diff -Naur vim74.orig/runtime/autoload/htmlcomplete.vim vim74/runtime/autoload/htmlcomplete.vim 3301 --- vim74.orig/runtime/autoload/htmlcomplete.vim 2011-04-28 11:13:20.000000000 +0000 3302 +++ vim74/runtime/autoload/htmlcomplete.vim 2014-07-21 23:33:11.673540235 +0000 3303 @@ -1,7 +1,49 @@ 3304 " Vim completion script 3305 " Language: HTML and XHTML 3306 " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) 3307 -" Last Change: 2011 Apr 28 3308 +" Last Change: 2014 Jun 20 3309 + 3310 +" Distinguish between HTML versions. 3311 +" To use with other HTML versions add another "elseif" condition to match 3312 +" proper DOCTYPE. 3313 +function! htmlcomplete#DetectOmniFlavor() 3314 + if &filetype == 'xhtml' 3315 + let b:html_omni_flavor = 'xhtml10s' 3316 + else 3317 + let b:html_omni_flavor = 'html401t' 3318 + endif 3319 + let i = 1 3320 + let line = "" 3321 + while i < 10 && i < line("$") 3322 + let line = getline(i) 3323 + if line =~ '<!DOCTYPE.*\<DTD ' 3324 + break 3325 + endif 3326 + let i += 1 3327 + endwhile 3328 + if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above 3329 + if line =~ ' HTML 3\.2' 3330 + let b:html_omni_flavor = 'html32' 3331 + elseif line =~ ' XHTML 1\.1' 3332 + let b:html_omni_flavor = 'xhtml11' 3333 + else " two-step detection with strict/frameset/transitional 3334 + if line =~ ' XHTML 1\.0' 3335 + let b:html_omni_flavor = 'xhtml10' 3336 + elseif line =~ ' HTML 4\.01' 3337 + let b:html_omni_flavor = 'html401' 3338 + elseif line =~ ' HTML 4.0\>' 3339 + let b:html_omni_flavor = 'html40' 3340 + endif 3341 + if line =~ '\<Transitional\>' 3342 + let b:html_omni_flavor .= 't' 3343 + elseif line =~ '\<Frameset\>' 3344 + let b:html_omni_flavor .= 'f' 3345 + else 3346 + let b:html_omni_flavor .= 's' 3347 + endif 3348 + endif 3349 + endif 3350 +endfunction 3351 3352 function! htmlcomplete#CompleteTags(findstart, base) 3353 if a:findstart 3242 3354 diff -Naur vim74.orig/runtime/autoload/netrw.vim vim74/runtime/autoload/netrw.vim 3243 3355 --- vim74.orig/runtime/autoload/netrw.vim 2013-05-19 03:28:33.000000000 +0000 3244 +++ vim74/runtime/autoload/netrw.vim 2014-0 6-01 00:42:49.417543255+00003356 +++ vim74/runtime/autoload/netrw.vim 2014-07-21 23:33:11.806873220 +0000 3245 3357 @@ -1,10 +1,10 @@ 3246 3358 " netrw.vim: Handles file transfer and remote directory listing across … … 10754 10866 diff -Naur vim74.orig/runtime/autoload/netrwSettings.vim vim74/runtime/autoload/netrwSettings.vim 10755 10867 --- vim74.orig/runtime/autoload/netrwSettings.vim 2013-05-03 19:53:43.000000000 +0000 10756 +++ vim74/runtime/autoload/netrwSettings.vim 2014-0 6-01 00:42:49.474209777+000010868 +++ vim74/runtime/autoload/netrwSettings.vim 2014-07-21 23:33:11.856873090 +0000 10757 10869 @@ -1,7 +1,7 @@ 10758 10870 " netrwSettings.vim: makes netrw settings simpler … … 10788 10900 diff -Naur vim74.orig/runtime/autoload/netrw_gitignore.vim vim74/runtime/autoload/netrw_gitignore.vim 10789 10901 --- vim74.orig/runtime/autoload/netrw_gitignore.vim 1970-01-01 00:00:00.000000000 +0000 10790 +++ vim74/runtime/autoload/netrw_gitignore.vim 2014-0 6-01 00:42:49.487543077+000010902 +++ vim74/runtime/autoload/netrw_gitignore.vim 2014-07-21 23:33:12.126872385 +0000 10791 10903 @@ -0,0 +1,71 @@ 10792 10904 +" netrw_gitignore#Hide: gitignore-based hiding … … 10863 10975 diff -Naur vim74.orig/runtime/autoload/phpcomplete.vim vim74/runtime/autoload/phpcomplete.vim 10864 10976 --- vim74.orig/runtime/autoload/phpcomplete.vim 2011-12-08 15:38:25.000000000 +0000 10865 +++ vim74/runtime/autoload/phpcomplete.vim 2014-0 6-01 00:42:49.544209599+000010977 +++ vim74/runtime/autoload/phpcomplete.vim 2014-07-21 23:33:12.173538930 +0000 10866 10978 @@ -1,27 +1,101 @@ 10867 10979 " Vim completion script … … 10872 10984 +" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) 10873 10985 +" URL: https://github.com/shawncplus/phpcomplete.vim 10874 +" Last Change: 2014 May 0810986 +" Last Change: 2014 May 30 10875 10987 " 10876 10988 -" TODO: … … 10980 11092 10981 11093 if phpbegin == [0,0] && phpend == [0,0] 10982 @@ -37,5116 +111,2449 @@ 11094 @@ -35,5118 +109,2464 @@ 11095 " locate the start of the word 11096 let line = getline('.') 10983 11097 let start = col('.') - 1 10984 11098 - let curline = line('.') 10985 11099 let compl_begin = col('.') - 2 10986 11100 - while start >= 0 && line[start - 1] =~ '[a-zA-Z_0-9\x7f-\xff$]' … … 10991 11105 - return start 10992 11106 + let b:phpbegin = phpbegin 10993 + let b:compl_context = phpcomplete#GetCurrentInstruction(line('.'), col('.') - 2, phpbegin)11107 + let b:compl_context = phpcomplete#GetCurrentInstruction(line('.'), max([0, col('.') - 2]), phpbegin) 10994 11108 10995 11109 + return start … … 11194 11308 + let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.classname_match_pattern.'"') 11195 11309 + for classname in builtin_classnames 11196 + call add(res, {'word': classname, 'kind': 'c'})11310 + call add(res, {'word': g:php_builtin_classes[tolower(classname)].name, 'kind': 'c'}) 11197 11311 endfor 11198 11312 + let builtin_interfacenames = filter(keys(copy(g:php_builtin_interfacenames)), 'v:val =~? "^'.classname_match_pattern.'"') 11199 11313 + for interfacename in builtin_interfacenames 11200 + call add(res, {'word': interfacename, 'kind': 'i'})11314 + call add(res, {'word': g:php_builtin_interfaces[tolower(interfacename)].name, 'kind': 'i'}) 11201 11315 + endfor 11202 11316 + endif … … 11506 11620 + for [classname, info] in items(g:php_builtin_classnames) 11507 11621 + if classname =~? '^'.base 11508 + let builtin_classnames[leading_slash. classname] = info11622 + let builtin_classnames[leading_slash.g:php_builtin_classes[tolower(classname)].name] = info 11509 11623 endif 11510 11624 endfor … … 16638 16752 - \ 'include(': 'string filename | resource', 16639 16753 - \ 'include_once(': 'string filename | resource', 16754 - \ 'require(': 'string filename | resource', 16640 16755 + for line in file 16641 16756 + let c_name = matchstr(line, '\c\(class\|interface\)\s*\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') … … 16698 16813 + let menu = g:php_builtin_classes[tolower(classname)]['methods']['__construct']['signature'] 16699 16814 + endif 16700 + call add(res, {'word': leading_slash. classname, 'kind': 'c', 'menu': menu})16815 + call add(res, {'word': leading_slash.g:php_builtin_classes[tolower(classname)].name, 'kind': 'c', 'menu': menu}) 16701 16816 + endfor 16702 16817 + endif … … 16792 16907 + let f_args = matchstr(i, 16793 16908 + \ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|\_$\)') 16794 + if f_name != '' 16909 + if f_name != '' && stridx(f_name, '__') != 0 16795 16910 + let c_functions[f_name.'('] = f_args 16796 16911 + if g:phpcomplete_parse_docblock_comments 16797 + let c_doc[f_name.'('] = phpcomplete#GetDocBlock(a:sccontent, 'function\s* \<'.f_name.'\>')16912 + let c_doc[f_name.'('] = phpcomplete#GetDocBlock(a:sccontent, 'function\s*&\?\<'.f_name.'\>') 16798 16913 + endif 16799 16914 + endif … … 16915 17030 + " methods 16916 17031 + for [method_name, method_info] in items(class_info.methods) 16917 + if a:base == '' || method_name =~? '^'.a:base17032 + if stridx(method_name, '__') != 0 && (a:base == '' || method_name =~? '^'.a:base) 16918 17033 + call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature }) 16919 17034 + endif … … 17183 17298 + return unknown_result 17184 17299 + 17185 + elseif filereadable(classlocation)17300 + elseif classlocation != '' && filereadable(classlocation) 17186 17301 + " Read the next method from the stack and extract only the name 17187 17302 + … … 17191 17306 + " try to find the method's return type in docblock comment 17192 17307 + for classstructure in classcontents 17193 + let doclock_target_pattern = 'function\s\+ '.method.'\|\(public\|private\|protected\|var\).\+\$'.method17308 + let doclock_target_pattern = 'function\s\+&\?'.method.'\|\(public\|private\|protected\|var\).\+\$'.method 17194 17309 + let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), doclock_target_pattern) 17195 17310 + if doc_str != '' … … 17223 17338 + let fullnamespace = class_candidate_namespace 17224 17339 + endif 17225 + let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports) 17340 + " make @return self, static, $this the same way 17341 + " (not exactly what php means by these) 17342 + if returnclass == 'self' || returnclass == 'static' || returnclass == '$this' 17343 + let classname_candidate = a:classname_candidate 17344 + let class_candidate_namespace = a:class_candidate_namespace 17345 + else 17346 + let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports) 17347 + endif 17226 17348 + endif 17227 17349 + … … 17362 17484 + let classname_candidate = return_type 17363 17485 + let class_candidate_namespace = '\' 17364 + else 17486 + elseif function_file != '' && filereadable(function_file) 17365 17487 + let file_lines = readfile(function_file) 17366 + let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s* \<'.function_name.'\>')17488 + let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>') 17367 17489 + let docblock = phpcomplete#ParseDocBlock(docblock_str) 17368 17490 + if has_key(docblock.return, 'type') … … 17380 17502 + endif 17381 17503 + else 17504 + " extract the variable name from the context 17505 + let object = methodstack[0] 17506 + let object_is_array = (object =~ '\v^[^[]+\[' ? 1 : 0) 17507 + let object = matchstr(object, variable_name_pattern) 17508 + 17382 17509 + " check Constant lookup 17383 17510 + let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::') … … 17386 17513 + endif 17387 17514 + 17388 + " extract the variable name from the context 17389 + let object = methodstack[0] 17390 + let object_is_array = (object =~ '\v^[^[]+\[' ? 1 : 0) 17391 + let object = matchstr(object, variable_name_pattern) 17392 + 17393 + " scan the file backwards from current line for explicit type declaration (@var $variable Classname) 17394 + let i = 1 " start from the current line - 1 17395 + while i < a:start_line 17396 + let line = getline(a:start_line - i) 17397 + " in file lookup for /* @var $foo Class */ 17398 + if line =~# '@var\s\+'.object.'\s\+'.class_name_pattern 17399 + let classname_candidate = matchstr(line, '@var\s\+'.object.'\s\+\zs'.class_name_pattern.'\(\[\]\)\?') 17400 + break 17401 + elseif line !~ '^\s*$' 17402 + " type indicator comments should be next to the variable 17403 + " non empty lines break the search 17404 + break 17405 + endif 17406 + let i += 1 17407 + endwhile 17515 + if classname_candidate == '' 17516 + " scan the file backwards from current line for explicit type declaration (@var $variable Classname) 17517 + let i = 1 " start from the current line - 1 17518 + while i < a:start_line 17519 + let line = getline(a:start_line - i) 17520 + " in file lookup for /* @var $foo Class */ 17521 + if line =~# '@var\s\+'.object.'\s\+'.class_name_pattern 17522 + let classname_candidate = matchstr(line, '@var\s\+'.object.'\s\+\zs'.class_name_pattern.'\(\[\]\)\?') 17523 + let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports) 17524 + break 17525 + elseif line !~ '^\s*$' 17526 + " type indicator comments should be next to the variable 17527 + " non empty lines break the search 17528 + break 17529 + endif 17530 + let i += 1 17531 + endwhile 17532 + endif 17408 17533 + 17409 17534 + if classname_candidate != '' … … 17415 17540 + " scan the file backwards from the current line 17416 17541 + let i = 1 17417 + while i < a:start_line 17542 + while i < a:start_line " {{{ 17418 17543 + let line = getline(a:start_line - i) 17419 17544 + … … 17527 17652 + let class_candidate_namespace = '\' 17528 17653 + break 17529 + else 17654 + elseif function_file != '' && filereadable(function_file) 17530 17655 + let file_lines = readfile(function_file) 17531 + let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s* \<'.function_name.'\>')17656 + let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>') 17532 17657 + let docblock = phpcomplete#ParseDocBlock(docblock_str) 17533 17658 + if has_key(docblock.return, 'type') … … 17579 17704 + 17580 17705 + let i += 1 17581 + endwhile 17706 + endwhile " }}} 17582 17707 + 17583 17708 + if classname_candidate != '' … … 17650 17775 + endif 17651 17776 + 17777 + return '' 17652 17778 +endfunction 17653 17779 +" }}} … … 17660 17786 + endif 17661 17787 + 17788 + 17662 17789 + " do in-file lookup for function definition 17663 17790 + let i = 1 17664 17791 + let buffer_lines = getline(1, line('$')) 17665 17792 + for line in buffer_lines 17666 + if line =~? '^\s*function\s\+ '.a:function_name.'\s*('17793 + if line =~? '^\s*function\s\+&\?'.a:function_name.'\s*(' 17667 17794 + return expand('%:p') 17668 17795 + endif … … 17692 17819 + return no_namespace_candidate 17693 17820 + endif 17821 + 17822 + return '' 17694 17823 +endfunction 17695 17824 +" }}} … … 17782 17911 + silent! below 1new 17783 17912 + silent! 0put =cfile 17784 + call search('\(class\|interface\)\ s\+'.a:class_name.'\(\>\|$\)')17913 + call search('\(class\|interface\)\_s\+'.a:class_name.'\(\>\|$\)') 17785 17914 + let cfline = line('.') 17786 17915 + call search('{') … … 17815 17944 + endif 17816 17945 + let classlocation = phpcomplete#GetClassLocation(extends_class, namespace) 17817 + if filereadable(classlocation)17946 + if classlocation != '' && filereadable(classlocation) 17818 17947 + let full_file_path = fnamemodify(classlocation, ':p') 17819 17948 + let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), extends_class) … … 18132 18261 + let import['kind'] = 'c' 18133 18262 + let import['builtin'] = 1 18134 + elseif has_key(g:php_builtin_interface s, import.name)18263 + elseif has_key(g:php_builtin_interfacenames, tolower(import.name)) 18135 18264 + let import['kind'] = 'i' 18136 18265 + let import['builtin'] = 1 … … 18360 18489 + endfor 18361 18490 + 18362 + let g:php_builtin_classnames[class _info.name] = ''18491 + let g:php_builtin_classnames[classname] = '' 18363 18492 + for [method_name, method_info] in items(class_info.methods) 18364 18493 + let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature … … 18379 18508 + let g:php_builtin_interfacenames[interfacename] = '' 18380 18509 + for [method_name, method_info] in items(class_info.methods) 18381 + let g:php_builtin_object_functions[ classname.'::'.method_name.'('] = method_info.signature18510 + let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature 18382 18511 + endfor 18383 18512 + for [method_name, method_info] in items(class_info.static_methods) 18384 + let g:php_builtin_object_functions[ classname.'::'.method_name.'('] = method_info.signature18513 + let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature 18385 18514 + endfor 18386 18515 +endfor … … 18391 18520 + \ 'include(': 'string filename | resource', 18392 18521 + \ 'include_once(': 'string filename | resource', 18393 18522 + \ 'require(': 'string filename | resource', 18394 18523 \ 'require_once(': 'string filename | resource', 18395 18524 \ } … … 18426 18555 diff -Naur vim74.orig/runtime/colors/README.txt vim74/runtime/colors/README.txt 18427 18556 --- vim74.orig/runtime/colors/README.txt 2010-05-15 11:03:31.000000000 +0000 18428 +++ vim74/runtime/colors/README.txt 2014-0 6-01 00:42:49.970875179+000018557 +++ vim74/runtime/colors/README.txt 2014-07-21 23:33:12.600204483 +0000 18429 18558 @@ -36,6 +36,14 @@ 18430 18559 removed in your color scheme. Use something like "gui=NONE" to remove the … … 18444 18573 diff -Naur vim74.orig/runtime/colors/delek.vim vim74/runtime/colors/delek.vim 18445 18574 --- vim74.orig/runtime/colors/delek.vim 2010-05-15 11:03:31.000000000 +0000 18446 +++ vim74/runtime/colors/delek.vim 2014-0 6-01 00:42:50.027541702+000018575 +++ vim74/runtime/colors/delek.vim 2014-07-21 23:33:12.646871028 +0000 18447 18576 @@ -1,10 +1,10 @@ 18448 18577 " Vim color file … … 18474 18603 diff -Naur vim74.orig/runtime/colors/industry.vim vim74/runtime/colors/industry.vim 18475 18604 --- vim74.orig/runtime/colors/industry.vim 1970-01-01 00:00:00.000000000 +0000 18476 +++ vim74/runtime/colors/industry.vim 2014-0 6-01 00:42:50.067541600+000018605 +++ vim74/runtime/colors/industry.vim 2014-07-21 23:33:12.710204196 +0000 18477 18606 @@ -0,0 +1,40 @@ 18478 18607 +" Vim color file … … 18518 18647 diff -Naur vim74.orig/runtime/compiler/gcc.vim vim74/runtime/compiler/gcc.vim 18519 18648 --- vim74.orig/runtime/compiler/gcc.vim 2011-12-15 20:20:22.000000000 +0000 18520 +++ vim74/runtime/compiler/gcc.vim 2014-0 6-01 00:42:50.447540632+000018649 +++ vim74/runtime/compiler/gcc.vim 2014-07-21 23:33:13.026870036 +0000 18521 18650 @@ -25,10 +25,10 @@ 18522 18651 \%f:%l:\ %tarning:\ %m, … … 18536 18665 diff -Naur vim74.orig/runtime/doc/autocmd.txt vim74/runtime/doc/autocmd.txt 18537 18666 --- vim74.orig/runtime/doc/autocmd.txt 2013-08-10 11:24:52.000000000 +0000 18538 +++ vim74/runtime/doc/autocmd.txt 2014-0 6-01 00:42:51.010872531+000018667 +++ vim74/runtime/doc/autocmd.txt 2014-07-21 23:33:13.573535276 +0000 18539 18668 @@ -1,4 +1,4 @@ 18540 18669 -*autocmd.txt* For Vim version 7.4. Last change: 2013 Aug 04 … … 18594 18723 diff -Naur vim74.orig/runtime/doc/change.txt vim74/runtime/doc/change.txt 18595 18724 --- vim74.orig/runtime/doc/change.txt 2013-08-10 11:24:52.000000000 +0000 18596 +++ vim74/runtime/doc/change.txt 2014-0 6-01 00:42:51.047539105+000018725 +++ vim74/runtime/doc/change.txt 2014-07-21 23:33:13.596868549 +0000 18597 18726 @@ -1,4 +1,4 @@ 18598 18727 -*change.txt* For Vim version 7.4. Last change: 2013 Jul 17 18599 +*change.txt* For Vim version 7.4. Last change: 2014 Feb 1118728 +*change.txt* For Vim version 7.4. Last change: 2014 Jun 26 18600 18729 18601 18730 … … 18661 18790 *:sor* *:sort* 18662 18791 :[range]sor[t][!] [i][u][r][n][x][o] [/{pattern}/] 18792 @@ -1707,8 +1717,8 @@ 18793 quite useless. 18794 18795 The details about sorting depend on the library function used. There is no 18796 -guarantee that sorting is "stable" or obeys the current locale. You will have 18797 -to try it out. 18798 +guarantee that sorting obeys the current locale. You will have to try it out. 18799 +Vim does do a "stable" sort. 18800 18801 The sorting can be interrupted, but if you interrupt it too late in the 18802 process you may end up with duplicated lines. This also depends on the system 18663 18803 diff -Naur vim74.orig/runtime/doc/cmdline.txt vim74/runtime/doc/cmdline.txt 18664 18804 --- vim74.orig/runtime/doc/cmdline.txt 2013-08-10 11:24:52.000000000 +0000 18665 +++ vim74/runtime/doc/cmdline.txt 2014-0 6-01 00:42:51.080872353+000018805 +++ vim74/runtime/doc/cmdline.txt 2014-07-21 23:33:13.640201769 +0000 18666 18806 @@ -1,4 +1,4 @@ 18667 18807 -*cmdline.txt* For Vim version 7.4. Last change: 2013 Mar 16 … … 18713 18853 diff -Naur vim74.orig/runtime/doc/develop.txt vim74/runtime/doc/develop.txt 18714 18854 --- vim74.orig/runtime/doc/develop.txt 2013-08-10 11:24:52.000000000 +0000 18715 +++ vim74/runtime/doc/develop.txt 2014-0 6-01 00:42:51.124205576+000018855 +++ vim74/runtime/doc/develop.txt 2014-07-21 23:33:13.676868340 +0000 18716 18856 @@ -1,4 +1,4 @@ 18717 18857 -*develop.txt* For Vim version 7.4. Last change: 2013 Apr 27 … … 18730 18870 diff -Naur vim74.orig/runtime/doc/diff.txt vim74/runtime/doc/diff.txt 18731 18871 --- vim74.orig/runtime/doc/diff.txt 2013-08-10 11:24:52.000000000 +0000 18732 +++ vim74/runtime/doc/diff.txt 2014-0 6-01 00:42:51.130872226+000018872 +++ vim74/runtime/doc/diff.txt 2014-07-21 23:33:13.686868314 +0000 18733 18873 @@ -1,4 +1,4 @@ 18734 18874 -*diff.txt* For Vim version 7.4. Last change: 2013 Jul 07 … … 18765 18905 diff -Naur vim74.orig/runtime/doc/digraph.txt vim74/runtime/doc/digraph.txt 18766 18906 --- vim74.orig/runtime/doc/digraph.txt 2013-08-10 11:24:52.000000000 +0000 18767 +++ vim74/runtime/doc/digraph.txt 2014-0 6-01 00:42:51.154205500+000018907 +++ vim74/runtime/doc/digraph.txt 2014-07-21 23:33:13.713534911 +0000 18768 18908 @@ -1,4 +1,4 @@ 18769 18909 -*digraph.txt* For Vim version 7.4. Last change: 2011 Jan 15 18770 +*digraph.txt* For Vim version 7.4. Last change: 2014 Apr 1718910 +*digraph.txt* For Vim version 7.4. Last change: 2014 Jun 19 18771 18911 18772 18912 … … 18781 18921 Percent sign % Greek/Cyrillic special 18782 18922 Plus + smalls: Arabic, capitals: Hebrew 18783 @@ -1077,7 +1077,7 @@ 18923 @@ -170,6 +170,11 @@ 18924 used for the euro sign, while both of them are the character 164, 0xa4. For 18925 compatibility with zsh Eu can also be used for the euro sign. 18926 18927 +ROUBLE 18928 + 18929 +The rouble sign was added in 2014 as 0x20bd. Vim supports the digraphs =R and 18930 +=P for this. Note that R= and P= are other characters. 18931 + 18932 *digraph-table* 18933 char digraph hex dec official name ~ 18934 ^@ NU 0x00 0 NULL (NUL) 18935 @@ -966,6 +971,8 @@ 18936 ⧠Pt 20A7 8359 PESETA SIGN 18937 â© W= 20A9 8361 WON SIGN 18938 ⬠Eu 20AC 8364 EURO SIGN 18939 +✠=R 20BD 8381 ROUBLE SIGN 18940 +✠=P 20BD 8381 ROUBLE SIGN 18941 â oC 2103 8451 DEGREE CELSIUS 18942 â 18943 co 2105 8453 CARE OF 18944 â oF 2109 8457 DEGREE FAHRENHEIT 18945 @@ -1077,7 +1084,7 @@ 18784 18946 ⥠-T 22A5 8869 UP TACK 18785 18947 â … … 18793 18955 diff -Naur vim74.orig/runtime/doc/editing.txt vim74/runtime/doc/editing.txt 18794 18956 --- vim74.orig/runtime/doc/editing.txt 2013-08-10 11:24:53.000000000 +0000 18795 +++ vim74/runtime/doc/editing.txt 2014-0 6-01 00:42:51.197538723+000018957 +++ vim74/runtime/doc/editing.txt 2014-07-21 23:33:13.746868157 +0000 18796 18958 @@ -1,4 +1,4 @@ 18797 18959 -*editing.txt* For Vim version 7.4. Last change: 2013 Aug 03 18798 +*editing.txt* For Vim version 7.4. Last change: 2014 May 0218960 +*editing.txt* For Vim version 7.4. Last change: 2014 Jul 19 18799 18961 18800 18962 … … 18808 18970 *:keepalt* *:keepa* 18809 18971 :keepalt {cmd} Execute {cmd} while keeping the current alternate file 18810 @@ -1468,14 +1469,15 @@ 18972 @@ -1361,6 +1362,11 @@ 18973 {only available when compiled with the |+cryptv| feature} *E833* 18974 18975 The text in the swap file and the undo file is also encrypted. *E843* 18976 +However, this is done block-by-block and may reduce the time needed to crack a 18977 +password. You can disable the swap file, but then a crash will cause you to 18978 +lose your work. The undo file can be disabled without much disadvantage. > 18979 + :set noundofile 18980 + :noswapfile edit secrets 18981 18982 Note: The text in memory is not encrypted. A system administrator may be able 18983 to see your text while you are editing it. When filtering text with 18984 @@ -1468,14 +1474,15 @@ 18811 18985 ============================================================================== 18812 18986 10. Timestamps *timestamp* *timestamps* … … 18834 19008 diff -Naur vim74.orig/runtime/doc/eval.txt vim74/runtime/doc/eval.txt 18835 19009 --- vim74.orig/runtime/doc/eval.txt 2013-08-10 11:24:53.000000000 +0000 18836 +++ vim74/runtime/doc/eval.txt 2014-0 6-01 00:42:51.230871971+000019010 +++ vim74/runtime/doc/eval.txt 2014-07-21 23:33:13.853534545 +0000 18837 19011 @@ -1,4 +1,4 @@ 18838 19012 -*eval.txt* For Vim version 7.4. Last change: 2013 Aug 03 18839 +*eval.txt* For Vim version 7.4. Last change: 2014 May 0719013 +*eval.txt* For Vim version 7.4. Last change: 2014 Jul 19 18840 19014 18841 19015 … … 19007 19181 has( {feature}) Number TRUE if feature {feature} supported 19008 19182 has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} 19009 @@ -1968,7 +1994,8 @@ 19183 @@ -1861,6 +1887,8 @@ 19184 Number position where {pat} matches in {expr} 19185 matchadd( {group}, {pattern}[, {priority}[, {id}]]) 19186 Number highlight {pattern} with {group} 19187 +matchaddpos( {group}, {list}[, {priority}[, {id}]]) 19188 + Number highlight positions with {group} 19189 matcharg( {nr}) List arguments of |:match| 19190 matchdelete( {id}) Number delete match identified by {id} 19191 matchend( {expr}, {pat}[, {start}[, {count}]]) 19192 @@ -1968,7 +1996,8 @@ 19010 19193 Number last index of {needle} in {haystack} 19011 19194 strtrans( {expr}) String translate string to make it printable … … 19017 19200 String all {pat} in {expr} replaced with {sub} 19018 19201 synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} 19019 @@ -1978,6 +200 5,7 @@19202 @@ -1978,6 +2007,7 @@ 19020 19203 synconcealed( {lnum}, {col}) List info about concealing 19021 19204 synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col} … … 19025 19208 tabpagenr( [{arg}]) Number number of current or last tab page 19026 19209 tabpagewinnr( {tabarg}[, {arg}]) 19027 @@ -1995,6 +202 3,8 @@19210 @@ -1995,6 +2025,8 @@ 19028 19211 type( {name}) Number type of variable {name} 19029 19212 undofile( {name}) String undo file name for {name} … … 19034 19217 virtcol( {expr}) Number screen column of cursor or mark 19035 19218 visualmode( [expr]) String last visual mode used 19036 @@ -2076,6 +210 6,18 @@19219 @@ -2076,6 +2108,18 @@ 19037 19220 argidx() The result is the current index in the argument list. 0 is 19038 19221 the first file. argc() - 1 is the last one. See |arglist|. … … 19053 19236 argv([{nr}]) The result is the {nr}th file in the argument list of the 19054 19237 current window. See |arglist|. "argv(0)" is the first one. 19055 @@ -2260,7 +230 2,10 @@19238 @@ -2260,7 +2304,10 @@ 19056 19239 {expr}. Use zero for the first character, it returns zero. 19057 19240 This function is only useful when there are multibyte … … 19065 19248 echo matchstr(str, ".", byteidx(str, 3)) 19066 19249 < will display the fourth character. Another way to do the 19067 @@ -2269,7 +231 4,20 @@19250 @@ -2269,7 +2316,20 @@ 19068 19251 echo strpart(s, 0, byteidx(s, 1)) 19069 19252 < If there are less than {nr} characters -1 is returned. … … 19087 19270 call({func}, {arglist} [, {dict}]) *call()* *E699* 19088 19271 Call function {func} with the items in |List| {arglist} as 19089 @@ -2544,9 +260 2,14 @@19272 @@ -2544,9 +2604,14 @@ 19090 19273 cursor({list}) 19091 19274 Positions the cursor at the column (byte count) {col} in the … … 19098 19281 + [{lnum}, {col}, {off}] 19099 19282 + [{lnum}, {col}, {off}, {curswant}] 19100 + This is like the return value of |getpos()| or |getcurpos |,19283 + This is like the return value of |getpos()| or |getcurpos()|, 19101 19284 + but without the first item. 19102 19285 + … … 19104 19287 If {lnum} is greater than the number of lines in the buffer, 19105 19288 the cursor will be positioned at the last line in the buffer. 19106 @@ -2555,6 +26 18,8 @@19289 @@ -2555,6 +2620,8 @@ 19107 19290 the cursor will be positioned at the last character in the 19108 19291 line. … … 19113 19296 screen columns from the start of the character. E.g., a 19114 19297 position within a <Tab> or after the last character. 19115 @@ -2671,6 +273 6,15 @@19298 @@ -2671,6 +2738,15 @@ 19116 19299 0 does not exist 19117 19300 -1 not implemented on this system … … 19129 19312 exists({expr}) The result is a Number, which is non-zero if {expr} is 19130 19313 defined, zero otherwise. The {expr} argument is a string, 19131 @@ -2683,7 +275 7,8 @@19314 @@ -2683,7 +2759,8 @@ 19132 19315 string) 19133 19316 *funcname built-in function (see |functions|) … … 19139 19322 |internal-variables|). Also works 19140 19323 for |curly-braces-names|, |Dictionary| 19141 @@ -2789,7 +286 4,7 @@19324 @@ -2789,7 +2866,7 @@ 19142 19325 <afile> autocmd file name 19143 19326 <abuf> autocmd buffer number (as a String!) … … 19148 19331 <cword> word under the cursor 19149 19332 <cWORD> WORD under the cursor 19150 @@ -3175,7 +325 0,7 @@19333 @@ -3175,7 +3252,7 @@ 19151 19334 If [expr] is 1, only check if a character is available, it is 19152 19335 not consumed. Return zero if no character available. … … 19157 19340 result is a number. Use nr2char() to convert it to a String. 19158 19341 Otherwise a String is returned with the encoded character. 19159 @@ -3185,7 +326 0,7@@19342 @@ -3185,7 +3262,11 @@ 19160 19343 String when a modifier (shift, control, alt) was used that is 19161 19344 not included in the character. 19162 19345 19163 19346 - When {expr} is 1 only the first byte is returned. For a 19347 + When [expr] is 0 and Esc is typed, there will be a short delay 19348 + while Vim waits to see if this is the start of an escape 19349 + sequence. 19350 + 19164 19351 + When [expr] is 1 only the first byte is returned. For a 19165 19352 one-byte character it is the character itself as a number. 19166 19353 Use nr2char() to convert it to a String. 19167 19354 19168 @@ -3268,6 +334 3,17 @@19355 @@ -3268,6 +3349,17 @@ 19169 19356 Returns an empty string otherwise. 19170 19357 Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|. … … 19184 19371 getcwd() The result is a String, which is the name of the current 19185 19372 working directory. 19186 @@ -3417,7 +3503,7 @@ 19373 @@ -3389,6 +3481,34 @@ 19374 'pattern': 'FIXME', 'priority': 10, 'id': 2}] > 19375 :unlet m 19376 < 19377 + *getpid()* 19378 +getpid() Return a Number which is the process ID of the Vim process. 19379 + On Unix and MS-Windows this is a unique number, until Vim 19380 + exits. On MS-DOS it's always zero. 19381 + 19382 + *getpos()* 19383 +getpos({expr}) Get the position for {expr}. For possible values of {expr} 19384 + see |line()|. For getting the cursor position see 19385 + |getcurpos()|. 19386 + The result is a |List| with four numbers: 19387 + [bufnum, lnum, col, off] 19388 + "bufnum" is zero, unless a mark like '0 or 'A is used, then it 19389 + is the buffer number of the mark. 19390 + "lnum" and "col" are the position in the buffer. The first 19391 + column is 1. 19392 + The "off" number is zero, unless 'virtualedit' is used. Then 19393 + it is the offset in screen columns from the start of the 19394 + character. E.g., a position within a <Tab> or after the last 19395 + character. 19396 + Note that for '< and '> Visual mode matters: when it is "V" 19397 + (visual line mode) the column of '< is zero and the column of 19398 + '> is a large number. 19399 + This can be used to save and restore the position of a mark: > 19400 + let save_a_mark = getpos("'a") 19401 + ... 19402 + call setpos(''a', save_a_mark 19403 +< Also see |getcurpos()| and |setpos()|. 19404 + 19405 19406 getqflist() *getqflist()* 19407 Returns a list with all the current quickfix errors. Each 19408 @@ -3417,7 +3537,7 @@ 19187 19409 :endfor 19188 19410 … … 19193 19415 {regname}. Example: > 19194 19416 :let cliptext = getreg('*') 19195 @@ -3426,6 +35 12,11 @@19417 @@ -3426,6 +3546,11 @@ 19196 19418 getreg('=', 1) returns the expression itself, so that it can 19197 19419 be restored with |setreg()|. For other registers the extra … … 19205 19427 19206 19428 19207 @@ -3435,7 +35 26,7 @@19429 @@ -3435,7 +3560,7 @@ 19208 19430 "v" for |characterwise| text 19209 19431 "V" for |linewise| text … … 19214 19436 If {regname} is not specified, |v:register| is used. 19215 19437 19216 @@ -3513,11 +36 04,12 @@19438 @@ -3513,11 +3638,12 @@ 19217 19439 See |expand()| for expanding special Vim variables. See 19218 19440 |system()| for getting the raw output of an external command. … … 19229 19451 |glob()|. A path separator is inserted when needed. 19230 19452 To add a comma inside a directory name escape it with a 19231 @@ -3525,11 +36 17,19 @@19453 @@ -3525,11 +3651,19 @@ 19232 19454 trailing backslash, remove it if you put a comma after it. 19233 19455 If the expansion fails for one of the directories, there is no … … 19250 19472 For example, to find all "README.txt" files in the directories 19251 19473 in 'runtimepath' and below: > 19252 @@ -4109,6 +42 09,8 @@19474 @@ -4109,6 +4243,8 @@ 19253 19475 (|mapmode-ic|) 19254 19476 "sid" The script local ID, used for <sid> mappings … … 19259 19481 The mappings local to the current buffer are checked first, 19260 19482 then the global mappings. 19261 @@ -4210,6 +43 12,9 @@19483 @@ -4210,6 +4346,9 @@ 19262 19484 "match"). It will be highlighted with {group}. Returns an 19263 19485 identification number (ID), which can be used to delete the … … 19269 19491 The optional {priority} argument assigns a priority to the 19270 19492 match. A match with a high priority will have its 19271 @@ -4408,7 +4513,8 @@ 19272 19273 *getpos()* 19274 getpos({expr}) Get the position for {expr}. For possible values of {expr} 19493 @@ -4243,6 +4382,41 @@ 19494 available from |getmatches()|. All matches can be deleted in 19495 one operation by |clearmatches()|. 19496 19497 +matchaddpos({group}, {pos}[, {priority}[, {id}]]) *matchaddpos()* 19498 + Same as |matchadd()|, but requires a list of positions {pos} 19499 + instead of a pattern. This command is faster than |matchadd()| 19500 + because it does not require to handle regular expressions and 19501 + sets buffer line boundaries to redraw screen. It is supposed 19502 + to be used when fast match additions and deletions are 19503 + required, for example to highlight matching parentheses. 19504 + 19505 + The list {pos} can contain one of these items: 19506 + - A number. This whole line will be highlighted. The first 19507 + line has number 1. 19508 + - A list with one number, e.g., [23]. The whole line with this 19509 + number will be highlighted. 19510 + - A list with two numbers, e.g., [23, 11]. The first number is 19511 + the line number, the second one is the column number (first 19512 + column is 1, the value must correspond to the byte index as 19513 + |col()| would return). The character at this position will 19514 + be highlighted. 19515 + - A list with three numbers, e.g., [23, 11, 3]. As above, but 19516 + the third number gives the length of the highlight in bytes. 19517 + 19518 + The maximum number of positions is 8. 19519 + 19520 + Example: > 19521 + :highlight MyGroup ctermbg=green guibg=green 19522 + :let m = matchaddpos("MyGroup", [[23, 24], 34]) 19523 +< Deletion of the pattern: > 19524 + :call matchdelete(m) 19525 + 19526 +< Matches added by |matchaddpos()| are returned by 19527 + |getmatches()| with an entry "pos1", "pos2", etc., with the 19528 + value a list like the {pos} item. 19529 + These matches cannot be set via |setmatches()|, however they 19530 + can still be deleted by |clearmatches()|. 19531 + 19532 matcharg({nr}) *matcharg()* 19533 Selects the {nr} match item, as set with a |:match|, 19534 |:2match| or |:3match| command. 19535 @@ -4401,30 +4575,6 @@ 19536 characters. nr2char(0) is a real NUL and terminates the 19537 string, thus results in an empty string. 19538 19539 - *getpid()* 19540 -getpid() Return a Number which is the process ID of the Vim process. 19541 - On Unix and MS-Windows this is a unique number, until Vim 19542 - exits. On MS-DOS it's always zero. 19543 - 19544 - *getpos()* 19545 -getpos({expr}) Get the position for {expr}. For possible values of {expr} 19275 19546 - see |line()|. 19276 + see |line()|. For getting the cursor position see 19277 + |getcurpos()|. 19278 The result is a |List| with four numbers: 19279 [bufnum, lnum, col, off] 19280 "bufnum" is zero, unless a mark like '0 or 'A is used, then it 19281 @@ -4419,11 +4525,14 @@ 19282 it is the offset in screen columns from the start of the 19283 character. E.g., a position within a <Tab> or after the last 19284 character. 19547 - The result is a |List| with four numbers: 19548 - [bufnum, lnum, col, off] 19549 - "bufnum" is zero, unless a mark like '0 or 'A is used, then it 19550 - is the buffer number of the mark. 19551 - "lnum" and "col" are the position in the buffer. The first 19552 - column is 1. 19553 - The "off" number is zero, unless 'virtualedit' is used. Then 19554 - it is the offset in screen columns from the start of the 19555 - character. E.g., a position within a <Tab> or after the last 19556 - character. 19285 19557 - This can be used to save and restore the cursor position: > 19286 19558 - let save_cursor = getpos(".") … … 19288 19560 - call setpos('.', save_cursor) 19289 19561 -< Also see |setpos()|. 19290 + Note that for '< and '> Visual mode matters: when it is "V" 19291 + (visual line mode) the column of '< is zero and the column of 19292 + '> is a large number. 19293 + This can be used to save and restore the position of a mark: > 19294 + let save_a_mark = getpos("'a") 19295 + ... 19296 + call setpos(''a', save_a_mark 19297 +< Also see |getcurpos()| and |setpos()|. 19298 19562 - 19299 19563 or({expr}, {expr}) *or()* 19300 19564 Bitwise OR on the two arguments. The arguments are converted 19301 @@ -5223,8 +5332,9 @@ 19565 to a number. A List, Dict or Float argument causes an error. 19566 @@ -5223,8 +5373,9 @@ 19302 19567 . the cursor 19303 19568 'x mark x … … 19310 19575 "bufnum" is the buffer number. Zero can be used for the 19311 19576 current buffer. Setting the cursor is only possible for 19312 @@ -5242,13 +53 52,26 @@19577 @@ -5242,13 +5393,26 @@ 19313 19578 character. E.g., a position within a <Tab> or after the last 19314 19579 character. … … 19339 19604 19340 19605 setqflist({list} [, {action}]) *setqflist()* 19341 @@ -5300,6 +54 23,8 @@19606 @@ -5300,6 +5464,8 @@ 19342 19607 *setreg()* 19343 19608 setreg({regname}, {value} [,{options}]) … … 19348 19613 then the value is appended. 19349 19614 {options} can also contain a register type specification: 19350 @@ -5312,10 +54 37,15 @@19615 @@ -5312,10 +5478,15 @@ 19351 19616 in the longest line (counting a <Tab> as 1 character). 19352 19617 … … 19368 19633 Examples: > 19369 19634 :call setreg(v:register, @*) 19370 @@ -5323,8 +54 53,11 @@19635 @@ -5323,8 +5494,11 @@ 19371 19636 :call setreg('a', "1\n2\n3", 'b5') 19372 19637 … … 19382 19647 .... 19383 19648 :call setreg('a', var_a, var_amode) 19384 @@ -5390,6 +55 23,7 @@19649 @@ -5390,6 +5564,7 @@ 19385 19650 < This results in a directory listing for the file under the 19386 19651 cursor. Example of use with |system()|: > … … 19390 19655 19391 19656 shiftwidth() *shiftwidth()* 19392 @@ -5449,20 +5 583,26@@19657 @@ -5449,20 +5624,40 @@ 19393 19658 19394 19659 … … 19400 19665 + If you want a list to remain unmodified make a copy first: > 19401 19666 :let sortedlist = sort(copy(mylist)) 19402 < Uses the string representation of each item to sort on. 19403 Numbers sort after Strings, |Lists| after Numbers. 19404 For sorting text in the current buffer use |:sort|. 19405 + 19406 When {func} is given and it is one then case is ignored. 19667 -< Uses the string representation of each item to sort on. 19668 - Numbers sort after Strings, |Lists| after Numbers. 19669 - For sorting text in the current buffer use |:sort|. 19670 - When {func} is given and it is one then case is ignored. 19407 19671 - {dict} is for functions with the "dict" attribute. It will be 19408 19672 - used to set the local variable "self". |Dictionary-function| 19673 + 19674 +< When {func} is omitted, is empty or zero, then sort() uses the 19675 + string representation of each item to sort on. Numbers sort 19676 + after Strings, |Lists| after Numbers. For sorting text in the 19677 + current buffer use |:sort|. 19678 + 19679 + When {func} is given and it is is '1' or 'i' then case is 19680 + ignored. 19681 + 19682 + When {func} is given and it is 'n' then all items will be 19683 + sorted numerical (Implementation detail: This uses the 19684 + strtod() function to parse numbers, Strings, Lists, Dicts and 19685 + Funcrefs will be considered as being 0). 19686 + 19409 19687 When {func} is a |Funcref| or a function name, this function 19410 19688 is called to compare items. The function is invoked with two … … 19416 19694 + used to set the local variable "self". |Dictionary-function| 19417 19695 + 19696 + The sort is stable, items which compare equal (as number or as 19697 + string) will keep their relative position. E.g., when sorting 19698 + on numbers, text strings will sort next to each other, in the 19699 + same order as they were originally. 19700 + 19418 19701 + Also see |uniq()|. 19419 19702 + … … 19421 19704 func MyCompare(i1, i2) 19422 19705 return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1 19423 @@ -5604,7 +57 44,7 @@19706 @@ -5604,7 +5799,7 @@ 19424 19707 19425 19708 strdisplaywidth({expr}[, {col}]) *strdisplaywidth()* … … 19430 19713 screen column where to start. This matters for Tab 19431 19714 characters. 19432 @@ -5729,12 +5 869,23 @@19715 @@ -5729,12 +5924,23 @@ 19433 19716 Ambiguous, this function's return value depends on 'ambiwidth'. 19434 19717 Also see |strlen()|, |strdisplaywidth()| and |strchars()|. … … 19455 19738 :s/\d\+/\=submatch(0) + 1/ 19456 19739 < This finds the first number in the line and adds one to it. 19457 @@ -5867,19 +60 18,29 @@19740 @@ -5867,19 +6073,29 @@ 19458 19741 valid positions. 19459 19742 … … 19494 19777 < To make the result more system-independent, the shell output 19495 19778 is filtered to replace <CR> with <NL> for Macintosh, and 19496 @@ -5906,6 +6 067,16 @@19779 @@ -5906,6 +6122,16 @@ 19497 19780 Use |:checktime| to force a check. 19498 19781 … … 19511 19794 The result is a |List|, where each item is the number of the 19512 19795 buffer associated with each window in the current tab page. 19513 @@ -5928,7 +6 099,7 @@19796 @@ -5928,7 +6154,7 @@ 19514 19797 The number can be used with the |:tab| command. 19515 19798 … … 19520 19803 {tabarg} specifies the number of tab page to be used. 19521 19804 {arg} is used like with |winnr()|: 19522 @@ -6128,6 +6 299,14 @@19805 @@ -6128,6 +6354,14 @@ 19523 19806 blocks. Each item may again have an "alt" 19524 19807 item. … … 19535 19818 Return a |List| with all the values of {dict}. The |List| is 19536 19819 in arbitrary order. 19537 @@ -6257,6 +64 36,16 @@19820 @@ -6257,6 +6491,16 @@ 19538 19821 winrestview({dict}) 19539 19822 Uses the |Dictionary| returned by |winsaveview()| to restore … … 19552 19835 If the window size changed the result won't be the same. 19553 19836 19554 @@ -6271,7 +6460,9 @@ 19555 not opened when moving around. 19837 @@ -6268,10 +6512,12 @@ 19838 buffer and you want to go back to the original view. 19839 This does not save fold information. Use the 'foldenable' 19840 option to temporarily switch off folding, so that folds are 19841 - not opened when moving around. 19842 + not opened when moving around. This may have side effects. 19556 19843 The return value includes: 19557 19844 lnum cursor line number … … 19563 19850 curswant column for vertical movement 19564 19851 topline first line in the window 19565 @@ -6330,13 +6521,24 @@ 19852 @@ -6322,7 +6568,7 @@ 19853 19854 19855 *feature-list* 19856 -There are three types of features: 19857 +There are four types of features: 19858 1. Features that are only supported when they have been enabled when Vim 19859 was compiled |+feature-list|. Example: > 19860 :if has("cindent") 19861 @@ -6330,13 +6576,24 @@ 19566 19862 Example: > 19567 19863 :if has("gui_running") … … 19592 19888 amiga Amiga version of Vim. 19593 19889 arabic Compiled with Arabic support |Arabic|. 19594 @@ -6503,7 +6705,9 @@ 19890 @@ -6407,8 +6664,8 @@ 19891 keymap Compiled with 'keymap' support. 19892 langmap Compiled with 'langmap' support. 19893 libcall Compiled with |libcall()| support. 19894 -linebreak Compiled with 'linebreak', 'breakat' and 'showbreak' 19895 - support. 19896 +linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and 19897 + 'breakindent' support. 19898 lispindent Compiled with support for lisp indenting. 19899 listcmds Compiled with commands for the buffer list |:files| 19900 and the argument list |arglist|. 19901 @@ -6503,7 +6760,9 @@ 19595 19902 writebackup Compiled with 'writebackup' default on. 19596 19903 xfontset Compiled with X fontset support |xfontset|. … … 19603 19910 xsmp_interact Compiled with interactive X session management support. 19604 19911 xterm_clipboard Compiled with support for xterm clipboard. 19605 @@ -6553,6 +6 757,8 @@19912 @@ -6553,6 +6812,8 @@ 19606 19913 and autocommands defined in the script. It is also possible to call the 19607 19914 function from a mapping defined in the script, but then |<SID>| must be used … … 19612 19919 *:fu* *:function* *E128* *E129* *E123* 19613 19920 :fu[nction] List all functions and their arguments. 19614 @@ -6576,11 +6 782,15 @@19921 @@ -6576,11 +6837,15 @@ 19615 19922 < 19616 19923 See |:verbose-cmd| for more information. … … 19630 19937 {name} can also be a |Dictionary| entry that is a 19631 19938 |Funcref|: > 19632 @@ -6599,7 +68 09,7 @@19939 @@ -6599,7 +6864,7 @@ 19633 19940 19634 19941 For the {arguments} see |function-argument|. … … 19639 19946 expected to take care of a range itself. The range is 19640 19947 passed as "a:firstline" and "a:lastline". If [range] 19641 @@ -6608,10 +68 18,10 @@19948 @@ -6608,10 +6873,10 @@ 19642 19949 of each line. See |function-range-example|. 19643 19950 The cursor is still moved to the first line of the … … 19652 19959 be invoked through an entry in a |Dictionary|. The 19653 19960 local variable "self" will then be set to the 19654 @@ -7273,6 +7 483,8 @@19961 @@ -7273,6 +7538,8 @@ 19655 19962 {pattern}, so long as it does not have a special 19656 19963 meaning (e.g., '|' or '"') and doesn't occur inside … … 19661 19968 an error message because it may vary in different 19662 19969 locales. 19663 @@ -7416,13 +76 28,22 @@19970 @@ -7416,13 +7683,22 @@ 19664 19971 for Vim commands, |shellescape()| for |:!| commands. 19665 19972 Examples: > … … 19691 19998 diff -Naur vim74.orig/runtime/doc/filetype.txt vim74/runtime/doc/filetype.txt 19692 19999 --- vim74.orig/runtime/doc/filetype.txt 2013-08-10 11:24:53.000000000 +0000 19693 +++ vim74/runtime/doc/filetype.txt 2014-0 6-01 00:42:51.354204990+000020000 +++ vim74/runtime/doc/filetype.txt 2014-07-21 23:33:13.986867531 +0000 19694 20001 @@ -1,4 +1,4 @@ 19695 20002 -*filetype.txt* For Vim version 7.4. Last change: 2013 May 25 … … 19729 20036 diff -Naur vim74.orig/runtime/doc/fold.txt vim74/runtime/doc/fold.txt 19730 20037 --- vim74.orig/runtime/doc/fold.txt 2013-08-10 11:24:53.000000000 +0000 19731 +++ vim74/runtime/doc/fold.txt 2014-0 6-01 00:42:51.370871615 +000020038 +++ vim74/runtime/doc/fold.txt 2014-07-21 23:33:13.996867505 +0000 19732 20039 @@ -1,4 +1,4 @@ 19733 20040 -*fold.txt* For Vim version 7.4. Last change: 2010 May 13 … … 19752 20059 diff -Naur vim74.orig/runtime/doc/gui.txt vim74/runtime/doc/gui.txt 19753 20060 --- vim74.orig/runtime/doc/gui.txt 2013-08-10 11:24:53.000000000 +0000 19754 +++ vim74/runtime/doc/gui.txt 2014-0 6-01 00:42:51.410871513+000020061 +++ vim74/runtime/doc/gui.txt 2014-07-21 23:33:14.040200725 +0000 19755 20062 @@ -1,4 +1,4 @@ 19756 20063 -*gui.txt* For Vim version 7.4. Last change: 2013 Jun 12 … … 19782 20089 diff -Naur vim74.orig/runtime/doc/gui_x11.txt vim74/runtime/doc/gui_x11.txt 19783 20090 --- vim74.orig/runtime/doc/gui_x11.txt 2013-08-10 11:24:54.000000000 +0000 19784 +++ vim74/runtime/doc/gui_x11.txt 2014-0 6-01 00:42:51.460871386+000020091 +++ vim74/runtime/doc/gui_x11.txt 2014-07-21 23:33:14.100200568 +0000 19785 20092 @@ -1,4 +1,4 @@ 19786 20093 -*gui_x11.txt* For Vim version 7.4. Last change: 2011 Sep 14 … … 19800 20107 diff -Naur vim74.orig/runtime/doc/if_lua.txt vim74/runtime/doc/if_lua.txt 19801 20108 --- vim74.orig/runtime/doc/if_lua.txt 2013-08-10 11:24:55.000000000 +0000 19802 +++ vim74/runtime/doc/if_lua.txt 2014-0 6-01 00:42:51.564204456+000020109 +++ vim74/runtime/doc/if_lua.txt 2014-07-21 23:33:14.180200360 +0000 19803 20110 @@ -1,4 +1,4 @@ 19804 20111 -*if_lua.txt* For Vim version 7.4. Last change: 2012 Jun 29 … … 19818 20125 diff -Naur vim74.orig/runtime/doc/if_perl.txt vim74/runtime/doc/if_perl.txt 19819 20126 --- vim74.orig/runtime/doc/if_perl.txt 2013-08-10 11:24:55.000000000 +0000 19820 +++ vim74/runtime/doc/if_perl.txt 2014-0 6-01 00:42:51.620870978 +000020127 +++ vim74/runtime/doc/if_perl.txt 2014-07-21 23:33:14.236866878 +0000 19821 20128 @@ -1,4 +1,4 @@ 19822 20129 -*if_perl.txt* For Vim version 7.4. Last change: 2012 Oct 25 … … 19827 20134 diff -Naur vim74.orig/runtime/doc/indent.txt vim74/runtime/doc/indent.txt 19828 20135 --- vim74.orig/runtime/doc/indent.txt 2013-08-10 11:24:56.000000000 +0000 19829 +++ vim74/runtime/doc/indent.txt 2014-0 6-01 00:42:51.750870647+000020136 +++ vim74/runtime/doc/indent.txt 2014-07-21 23:33:14.356866565 +0000 19830 20137 @@ -1,4 +1,4 @@ 19831 20138 -*indent.txt* For Vim version 7.4. Last change: 2013 Aug 03 … … 19972 20279 diff -Naur vim74.orig/runtime/doc/index.txt vim74/runtime/doc/index.txt 19973 20280 --- vim74.orig/runtime/doc/index.txt 2013-08-10 11:24:56.000000000 +0000 19974 +++ vim74/runtime/doc/index.txt 2014-0 6-01 00:42:51.770870596+000020281 +++ vim74/runtime/doc/index.txt 2014-07-21 23:33:14.376866513 +0000 19975 20282 @@ -1,4 +1,4 @@ 19976 20283 -*index.txt* For Vim version 7.4. Last change: 2013 Jul 17 … … 20030 20337 |:nunmap| :nun[map] like ":unmap" but for Normal mode 20031 20338 |:nunmenu| :nunme[nu] remove menu for Normal mode 20339 diff -Naur vim74.orig/runtime/doc/insert.txt vim74/runtime/doc/insert.txt 20340 --- vim74.orig/runtime/doc/insert.txt 2013-08-10 11:24:56.000000000 +0000 20341 +++ vim74/runtime/doc/insert.txt 2014-07-21 23:33:14.403533110 +0000 20342 @@ -1,4 +1,4 @@ 20343 -*insert.txt* For Vim version 7.4. Last change: 2013 Jul 12 20344 +*insert.txt* For Vim version 7.4. Last change: 2014 Jul 06 20345 20346 20347 VIM REFERENCE MANUAL by Bram Moolenaar 20348 @@ -1302,7 +1302,7 @@ 20349 XHTML *ft-xhtml-omni* 20350 20351 CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is 20352 -designed to support writing of XHTML 1.0 Strict files but will also works for 20353 +designed to support writing of XHTML 1.0 Strict files but will also work for 20354 other versions of HTML. Features: 20355 20356 - after "<" complete tag name depending on context (no div suggestion inside 20357 diff -Naur vim74.orig/runtime/doc/intro.txt vim74/runtime/doc/intro.txt 20358 --- vim74.orig/runtime/doc/intro.txt 2013-08-10 11:24:56.000000000 +0000 20359 +++ vim74/runtime/doc/intro.txt 2014-07-21 23:33:14.423533058 +0000 20360 @@ -1,4 +1,4 @@ 20361 -*intro.txt* For Vim version 7.4. Last change: 2013 Jun 17 20362 +*intro.txt* For Vim version 7.4. Last change: 2014 May 24 20363 20364 20365 VIM REFERENCE MANUAL by Bram Moolenaar 20366 @@ -136,9 +136,10 @@ 20367 Bug reports: *bugs* *bug-reports* *bugreport.vim* 20368 20369 Send bug reports to: Vim Developers <vim_dev@vim.org> 20370 -This is a maillist, many people will see the message. If you don't want that, 20371 -e.g. because it is a security issue, send it to <bugs@vim.org>, this only goes 20372 -to the Vim maintainer (that's Bram). 20373 +This is a maillist, you need to become a member first and many people will see 20374 +the message. If you don't want that, e.g. because it is a security issue, 20375 +send it to <bugs@vim.org>, this only goes to the Vim maintainer (that's Bram). 20376 + 20377 Please be brief; all the time that is spent on answering mail is subtracted 20378 from the time that is spent on improving Vim! Always give a reproducible 20379 example and try to find out which settings or other things influence the 20032 20380 diff -Naur vim74.orig/runtime/doc/map.txt vim74/runtime/doc/map.txt 20033 20381 --- vim74.orig/runtime/doc/map.txt 2013-08-10 11:24:56.000000000 +0000 20034 +++ vim74/runtime/doc/map.txt 2014-0 6-01 00:42:51.837537093+000020382 +++ vim74/runtime/doc/map.txt 2014-07-21 23:33:14.446866330 +0000 20035 20383 @@ -1,4 +1,4 @@ 20036 20384 -*map.txt* For Vim version 7.4. Last change: 2013 Aug 03 20037 +*map.txt* For Vim version 7.4. Last change: 2014 May 1020385 +*map.txt* For Vim version 7.4. Last change: 2014 Jun 02 20038 20386 20039 20387 20040 20388 VIM REFERENCE MANUAL by Bram Moolenaar 20389 @@ -60,17 +60,17 @@ 20390 {rhs}, is then further scanned for mappings. This 20391 allows for nested and recursive use of mappings. 20392 20393 - 20394 -:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* 20395 -:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap* 20396 -:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap* 20397 -:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap* 20398 -:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap* 20399 -:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap* 20400 -:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!* 20401 -:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap* 20402 -:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap* 20403 -:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap* 20404 + *:nore* *:norem* 20405 +:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* *:nor* 20406 +:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap* 20407 +:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap* 20408 +:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap* 20409 +:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap* 20410 +:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap* 20411 +:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!* 20412 +:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap* 20413 +:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap* 20414 +:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap* 20415 Map the key sequence {lhs} to {rhs} for the modes 20416 where the map command applies. Disallow mapping of 20417 {rhs}, to avoid nested and recursive mappings. Often 20041 20418 @@ -306,9 +306,21 @@ 20042 20419 to type a count with a zero. … … 20056 20433 +:lmap :lnoremap :lunmap Insert, Command-line, Lang-Arg 20057 20434 +:cmap :cnoremap :cunmap Command-line 20435 + 20058 20436 20059 20437 - commands: modes: ~ 20060 +20061 20438 + COMMANDS MODES ~ 20062 20439 Normal Visual+Select Operator-pending ~ … … 20099 20476 To avoid mapping of the characters you type in insert or Command-line mode, 20100 20477 type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste' 20101 @@ -1359,6 +1371,8 @@ 20478 @@ -816,12 +828,10 @@ 20479 let &selection = "inclusive" 20480 let reg_save = @@ 20481 20482 - if a:0 " Invoked from Visual mode, use '< and '> marks. 20483 - silent exe "normal! `<" . a:type . "`>y" 20484 + if a:0 " Invoked from Visual mode, use gv command. 20485 + silent exe "normal! gvy" 20486 elseif a:type == 'line' 20487 silent exe "normal! '[V']y" 20488 - elseif a:type == 'block' 20489 - silent exe "normal! `[\<C-V>`]y" 20490 else 20491 silent exe "normal! `[v`]y" 20492 endif 20493 @@ -1359,6 +1369,8 @@ 20102 20494 In the cases of the -count and -register attributes, if the optional argument 20103 20495 is supplied, it is removed from the argument list and is available to the … … 20110 20502 diff -Naur vim74.orig/runtime/doc/motion.txt vim74/runtime/doc/motion.txt 20111 20503 --- vim74.orig/runtime/doc/motion.txt 2013-08-10 11:24:57.000000000 +0000 20112 +++ vim74/runtime/doc/motion.txt 2014-0 6-01 00:42:51.920870214+000020504 +++ vim74/runtime/doc/motion.txt 2014-07-21 23:33:14.526866121 +0000 20113 20505 @@ -1,4 +1,4 @@ 20114 20506 -*motion.txt* For Vim version 7.4. Last change: 2013 Jul 17 … … 20128 20520 diff -Naur vim74.orig/runtime/doc/options.txt vim74/runtime/doc/options.txt 20129 20521 --- vim74.orig/runtime/doc/options.txt 2013-08-10 11:24:57.000000000 +0000 20130 +++ vim74/runtime/doc/options.txt 2014-0 6-01 00:42:51.970870087+000020522 +++ vim74/runtime/doc/options.txt 2014-07-21 23:33:14.600199263 +0000 20131 20523 @@ -1,4 +1,4 @@ 20132 20524 -*options.txt* For Vim version 7.4. Last change: 2013 Jul 09 20133 +*options.txt* For Vim version 7.4. Last change: 2014 May 1320525 +*options.txt* For Vim version 7.4. Last change: 2014 Jun 26 20134 20526 20135 20527 … … 20144 20536 global 20145 20537 {not in Vi} 20146 @@ -1884,8 +1884,8 @@ 20538 @@ -1200,6 +1200,38 @@ 20539 break if 'linebreak' is on. Only works for ASCII and also for 8-bit 20540 characters when 'encoding' is an 8-bit encoding. 20541 20542 + *'breakindent'* *'bri'* 20543 +'breakindent' 'bri' boolean (default off) 20544 + local to window 20545 + {not in Vi} 20546 + {not available when compiled without the |+linebreak| 20547 + feature} 20548 + Every wrapped line will continue visually indented (same amount of 20549 + space as the beginning of that line), thus preserving horizontal blocks 20550 + of text. 20551 + 20552 + *'breakindentopt'* *'briopt'* 20553 +'breakindentopt' 'briopt' string (default empty) 20554 + local to window 20555 + {not in Vi} 20556 + {not available when compiled without the |+linebreak| 20557 + feature} 20558 + Settings for 'breakindent'. It can consist of the following optional 20559 + items and must be separated by a comma: 20560 + min:{n} Minimum text width that will be kept after 20561 + applying 'breakindent', even if the resulting 20562 + text should normally be narrower. This prevents 20563 + text indented almost to the right window border 20564 + occupying lot of vertical space when broken. 20565 + shift:{n} After applying 'breakindent', the wrapped line's 20566 + beginning will be shifted by the given number of 20567 + characters. It permits dynamic French paragraph 20568 + indentation (negative) or emphasizing the line 20569 + continuation (positive). 20570 + sbr Display the 'showbreak' value before applying the 20571 + additional indent. 20572 + The default value for min is 20 and shift is 0. 20573 + 20574 *'browsedir'* *'bsdir'* 20575 'browsedir' 'bsdir' string (default: "last") 20576 global 20577 @@ -1884,8 +1916,8 @@ 20147 20578 global 20148 20579 {not in Vi} … … 20155 20586 Commas can be added for readability. 20156 20587 To avoid problems with flags that are added in the future, use the 20157 @@ -2477,7 +2 477,7 @@20588 @@ -2477,7 +2509,7 @@ 20158 20589 20159 20590 *'directory'* *'dir'* … … 20164 20595 global 20165 20596 List of directory names for the swap file, separated with commas. 20166 @@ -4492,6 +4492,8 @@ 20597 @@ -3920,12 +3952,13 @@ 20598 NOTE: This option is reset when 'compatible' is set. 20599 20600 *'history'* *'hi'* 20601 -'history' 'hi' number (Vim default: 20, Vi default: 0) 20602 +'history' 'hi' number (Vim default: 50, Vi default: 0) 20603 global 20604 {not in Vi} 20605 A history of ":" commands, and a history of previous search patterns 20606 - are remembered. This option decides how many entries may be stored in 20607 + is remembered. This option decides how many entries may be stored in 20608 each of these histories (see |cmdline-editing|). 20609 + The maximum value is 10000. 20610 NOTE: This option is set to the Vi default value when 'compatible' is 20611 set and to the Vim default value when 'compatible' is reset. 20612 20613 @@ -4492,6 +4525,8 @@ 20167 20614 be able to execute Normal mode commands. 20168 20615 This is the opposite of the 'keymap' option, where characters are … … 20174 20621 :set langmap=ÎA,ÎB,ΚC,ÎD,ÎE,ΊF,ÎG,ÎH,ÎI,ÎJ,ÎK,ÎL,ÎM,ÎN,ÎO,Î P,QQ,ΡR,ΣS,΀T,ÎU,ΩV,WW,ΧX,Î¥Y,ÎZ,αa,βb,Ïc,ÎŽd,εe,Ïf,γg,ηh,ιi,Οj,κk,λl,ÎŒm,Îœn,οo,Ïp,qq,Ïr,Ïs,Ït,Ξu,Ïv,Ïw,Ïx,Ï 20175 20622 y,ζz 20176 @@ -4629,7 +4631,7 @@ 20623 @@ -4572,12 +4607,13 @@ 20624 {not in Vi} 20625 {not available when compiled without the |+linebreak| 20626 feature} 20627 - If on Vim will wrap long lines at a character in 'breakat' rather 20628 + If on, Vim will wrap long lines at a character in 'breakat' rather 20629 than at the last character that fits on the screen. Unlike 20630 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file, 20631 - it only affects the way the file is displayed, not its contents. The 20632 - value of 'showbreak' is used to put in front of wrapped lines. 20633 - This option is not used when the 'wrap' option is off or 'list' is on. 20634 + it only affects the way the file is displayed, not its contents. 20635 + If 'breakindent' is set, line is visually indented. Then, the value 20636 + of 'showbreak' is used to put in front of wrapped lines. This option 20637 + is not used when the 'wrap' option is off. 20638 Note that <Tab> characters after an <EOL> are mostly not displayed 20639 with the right amount of white space. 20640 20641 @@ -4629,7 +4665,7 @@ 20177 20642 20178 20643 *'lispwords'* *'lw'* … … 20183 20648 {not available when compiled without the |+lispindent| 20184 20649 feature} 20185 @@ -4757,8 +47 59,9 @@20650 @@ -4757,8 +4793,9 @@ 20186 20651 global or local to buffer |global-local| 20187 20652 {not in Vi} … … 20195 20660 about including spaces and backslashes. 20196 20661 Note that a '|' must be escaped twice: once for ":set" and once for 20197 @@ -6251,6 +62 54,9 @@20662 @@ -6251,6 +6288,9 @@ 20198 20663 A don't give the "ATTENTION" message when an existing swap file 20199 20664 is found. … … 20205 20670 This gives you the opportunity to avoid that a change between buffers 20206 20671 requires you to hit <Enter>, but still gives as useful a message as 20207 @@ -6555,6 +65 61,9 @@20672 @@ -6555,6 +6595,9 @@ 20208 20673 region by listing them: "en_us,en_ca" supports both US and Canadian 20209 20674 English, but not words specific for Australia, New Zealand or Great … … 20215 20680 As a special case the name of a .spl file can be given as-is. The 20216 20681 first "_xx" in the name is removed and used as the region name 20217 @@ -6615,6 +66 24,10 @@20682 @@ -6615,6 +6658,10 @@ 20218 20683 top of the suggestion list with the internal methods. 20219 20684 Lines without a slash are ignored, use this for … … 20226 20691 20227 20692 expr:{expr} Evaluate expression {expr}. Use a function to avoid 20228 @@ -6878,6 +6 891,8 @@20693 @@ -6878,6 +6925,8 @@ 20229 20694 immediately deleted. When 'swapfile' is set, and 'updatecount' is 20230 20695 non-zero, a swap file is immediately created. … … 20235 20700 This option is used together with 'bufhidden' and 'buftype' to 20236 20701 specify special kinds of buffers. See |special-buffers|. 20237 @@ -7498,8 +75 13,8 @@20702 @@ -7498,8 +7547,8 @@ 20238 20703 "s" = button state 20239 20704 "c" = column plus 33 … … 20246 20711 mouse position while the mouse is dragged. This works 20247 20712 much faster and more precise. Your xterm must at 20248 @@ -7521,29 +75 36,35 @@20713 @@ -7521,29 +7570,35 @@ 20249 20714 pterm QNX pterm mouse handling. 20250 20715 *urxvt-mouse* … … 20296 20761 < 20297 20762 *'ttyscroll'* *'tsl'* 20298 @@ -7594,7 +76 15,7 @@20763 @@ -7594,7 +7649,7 @@ 20299 20764 *'undolevels'* *'ul'* 20300 20765 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS, … … 20305 20770 Maximum number of changes that can be undone. Since undo information 20306 20771 is kept in memory, higher numbers will cause more memory to be used 20307 @@ -7605,8 +76 26,9 @@20772 @@ -7605,8 +7660,9 @@ 20308 20773 < But you can also get Vi compatibility by including the 'u' flag in 20309 20774 'cpoptions', and still be able to use CTRL-R to repeat undo. … … 20319 20784 diff -Naur vim74.orig/runtime/doc/os_vms.txt vim74/runtime/doc/os_vms.txt 20320 20785 --- vim74.orig/runtime/doc/os_vms.txt 2013-08-10 11:24:59.000000000 +0000 20321 +++ vim74/runtime/doc/os_vms.txt 2014-0 6-01 00:42:52.130869680+000020786 +++ vim74/runtime/doc/os_vms.txt 2014-07-21 23:33:14.766865495 +0000 20322 20787 @@ -1,4 +1,4 @@ 20323 20788 -*os_vms.txt* For Vim version 7.4. Last change: 2011 Aug 14 … … 20360 20825 diff -Naur vim74.orig/runtime/doc/os_win32.txt vim74/runtime/doc/os_win32.txt 20361 20826 --- vim74.orig/runtime/doc/os_win32.txt 2013-08-10 11:24:59.000000000 +0000 20362 +++ vim74/runtime/doc/os_win32.txt 2014-0 6-01 00:42:52.144202979+000020827 +++ vim74/runtime/doc/os_win32.txt 2014-07-21 23:33:14.783532118 +0000 20363 20828 @@ -93,7 +93,7 @@ 20364 20829 $PATH *win32-PATH* … … 20372 20837 diff -Naur vim74.orig/runtime/doc/pattern.txt vim74/runtime/doc/pattern.txt 20373 20838 --- vim74.orig/runtime/doc/pattern.txt 2013-08-10 11:24:59.000000000 +0000 20374 +++ vim74/runtime/doc/pattern.txt 2014-0 6-01 00:42:52.164202928+000020839 +++ vim74/runtime/doc/pattern.txt 2014-07-21 23:33:14.803532066 +0000 20375 20840 @@ -1,4 +1,4 @@ 20376 20841 -*pattern.txt* For Vim version 7.4. Last change: 2013 Jul 06 20377 +*pattern.txt* For Vim version 7.4. Last change: 2014 May 1320842 +*pattern.txt* For Vim version 7.4. Last change: 2014 May 28 20378 20843 20379 20844 … … 20423 20888 When a composing character appears at the start of the pattern of after an 20424 20889 item that doesn't include the composing character, a match is found at any 20890 @@ -1325,7 +1332,7 @@ 20891 patterns defined by both |matchadd()| and |:match|. 20892 20893 Highlighting matches using |:match| are limited to three 20894 - matches (aside from |:match|, |:2match| and |:3match|are 20895 + matches (aside from |:match|, |:2match| and |:3match| are 20896 available). |matchadd()| does not have this limitation and in 20897 addition makes it possible to prioritize matches. 20898 20425 20899 diff -Naur vim74.orig/runtime/doc/pi_getscript.txt vim74/runtime/doc/pi_getscript.txt 20426 20900 --- vim74.orig/runtime/doc/pi_getscript.txt 2013-08-10 11:24:59.000000000 +0000 20427 +++ vim74/runtime/doc/pi_getscript.txt 2014-0 6-01 00:42:52.197536177+000020901 +++ vim74/runtime/doc/pi_getscript.txt 2014-07-21 23:33:14.836865312 +0000 20428 20902 @@ -1,4 +1,4 @@ 20429 20903 -*pi_getscript.txt* For Vim version 7.4. Last change: 2012 Apr 07 … … 20445 20919 diff -Naur vim74.orig/runtime/doc/pi_netrw.txt vim74/runtime/doc/pi_netrw.txt 20446 20920 --- vim74.orig/runtime/doc/pi_netrw.txt 2013-08-10 11:24:59.000000000 +0000 20447 +++ vim74/runtime/doc/pi_netrw.txt 2014-0 6-01 00:42:52.234202750+000020921 +++ vim74/runtime/doc/pi_netrw.txt 2014-07-21 23:33:14.936865051 +0000 20448 20922 @@ -1,4 +1,4 @@ 20449 20923 -*pi_netrw.txt* For Vim version 7.4. Last change: 2013 May 18 … … 21598 22072 diff -Naur vim74.orig/runtime/doc/pi_vimball.txt vim74/runtime/doc/pi_vimball.txt 21599 22073 --- vim74.orig/runtime/doc/pi_vimball.txt 2013-08-10 11:25:00.000000000 +0000 21600 +++ vim74/runtime/doc/pi_vimball.txt 2014-0 6-01 00:42:52.307535896 +000022074 +++ vim74/runtime/doc/pi_vimball.txt 2014-07-21 23:33:14.990198246 +0000 21601 22075 @@ -188,7 +188,7 @@ 21602 22076 * Changed silent! to sil! (shorter) … … 21610 22084 diff -Naur vim74.orig/runtime/doc/quickfix.txt vim74/runtime/doc/quickfix.txt 21611 22085 --- vim74.orig/runtime/doc/quickfix.txt 2013-08-10 11:25:00.000000000 +0000 21612 +++ vim74/runtime/doc/quickfix.txt 2014-0 6-01 00:42:52.350869119+000022086 +++ vim74/runtime/doc/quickfix.txt 2014-07-21 23:33:15.036864790 +0000 21613 22087 @@ -1,4 +1,4 @@ 21614 22088 -*quickfix.txt* For Vim version 7.4. Last change: 2013 Aug 03 … … 21690 22164 You need to put the following in "vim-javac-filter" somewhere in your path 21691 22165 (e.g., in ~/bin) and make it executable: > 22166 diff -Naur vim74.orig/runtime/doc/quickref.txt vim74/runtime/doc/quickref.txt 22167 --- vim74.orig/runtime/doc/quickref.txt 2013-08-10 11:25:00.000000000 +0000 22168 +++ vim74/runtime/doc/quickref.txt 2014-07-21 23:33:15.056864738 +0000 22169 @@ -1,4 +1,4 @@ 22170 -*quickref.txt* For Vim version 7.4. Last change: 2013 Jun 29 22171 +*quickref.txt* For Vim version 7.4. Last change: 2014 Jun 25 22172 22173 22174 VIM REFERENCE MANUAL by Bram Moolenaar 22175 @@ -624,6 +624,8 @@ 22176 'bioskey' 'biosk' MS-DOS: use bios calls for input characters 22177 'bomb' prepend a Byte Order Mark to the file 22178 'breakat' 'brk' characters that may cause a line break 22179 +'breakindent' 'bri' wrapped line repeats indent 22180 +'breakindentopt' 'briopt' settings for 'breakindent' 22181 'browsedir' 'bsdir' which directory to start browsing in 22182 'bufhidden' 'bh' what to do when buffer is no longer in window 22183 'buflisted' 'bl' whether the buffer shows up in the buffer list 21692 22184 diff -Naur vim74.orig/runtime/doc/recover.txt vim74/runtime/doc/recover.txt 21693 22185 --- vim74.orig/runtime/doc/recover.txt 2013-08-10 11:25:00.000000000 +0000 21694 +++ vim74/runtime/doc/recover.txt 2014-0 6-01 00:42:52.410868967+000022186 +++ vim74/runtime/doc/recover.txt 2014-07-21 23:33:15.096864634 +0000 21695 22187 @@ -1,4 +1,4 @@ 21696 22188 -*recover.txt* For Vim version 7.4. Last change: 2010 Jul 20 … … 21717 22209 diff -Naur vim74.orig/runtime/doc/repeat.txt vim74/runtime/doc/repeat.txt 21718 22210 --- vim74.orig/runtime/doc/repeat.txt 2013-08-10 11:25:00.000000000 +0000 21719 +++ vim74/runtime/doc/repeat.txt 2014-0 6-01 00:42:52.434202241+000022211 +++ vim74/runtime/doc/repeat.txt 2014-07-21 23:33:15.120197906 +0000 21720 22212 @@ -1,4 +1,4 @@ 21721 22213 -*repeat.txt* For Vim version 7.4. Last change: 2013 Jul 25 … … 21771 22263 diff -Naur vim74.orig/runtime/doc/sign.txt vim74/runtime/doc/sign.txt 21772 22264 --- vim74.orig/runtime/doc/sign.txt 2013-08-10 11:25:01.000000000 +0000 21773 +++ vim74/runtime/doc/sign.txt 2014-0 6-01 00:42:52.494202088+000022265 +++ vim74/runtime/doc/sign.txt 2014-07-21 23:33:15.176864425 +0000 21774 22266 @@ -1,4 +1,4 @@ 21775 22267 -*sign.txt* For Vim version 7.4. Last change: 2012 Jul 10 … … 21797 22289 diff -Naur vim74.orig/runtime/doc/spell.txt vim74/runtime/doc/spell.txt 21798 22290 --- vim74.orig/runtime/doc/spell.txt 2013-08-10 11:25:01.000000000 +0000 21799 +++ vim74/runtime/doc/spell.txt 2014-0 6-01 00:42:52.504202062+000022291 +++ vim74/runtime/doc/spell.txt 2014-07-21 23:33:15.190197724 +0000 21800 22292 @@ -1,4 +1,4 @@ 21801 22293 -*spell.txt* For Vim version 7.4. Last change: 2013 Jul 17 21802 +*spell.txt* For Vim version 7.4. Last change: 201 3 Nov 1222294 +*spell.txt* For Vim version 7.4. Last change: 2014 Jul 02 21803 22295 21804 22296 … … 21818 22310 SPELL FILES *spell-load* 21819 22311 22312 @@ -932,9 +939,10 @@ 22313 22314 If you get an E763 warning that the word tables differ you need to update your 22315 ".spl" spell files. If you downloaded the files, get the latest version of 22316 -all spell files you use. Otherwise generate the .spl file again with 22317 -|:mkspell|. If you still get errors check the FOL, LOW and UPP lines in the 22318 -used .aff files. 22319 +all spell files you use. If you are only using one, e.g., German, then also 22320 +download the recent English spell files. Otherwise generate the .spl file 22321 +again with |:mkspell|. If you still get errors check the FOL, LOW and UPP 22322 +lines in the used .aff files. 22323 22324 The XX.ascii.spl spell file generated with the "-ascii" argument will not 22325 contain the table with characters, so that it can be combine with spell files 21820 22326 diff -Naur vim74.orig/runtime/doc/starting.txt vim74/runtime/doc/starting.txt 21821 22327 --- vim74.orig/runtime/doc/starting.txt 2013-08-10 11:25:01.000000000 +0000 21822 +++ vim74/runtime/doc/starting.txt 2014-0 6-01 00:42:52.540868636+000022328 +++ vim74/runtime/doc/starting.txt 2014-07-21 23:33:15.223530970 +0000 21823 22329 @@ -1,4 +1,4 @@ 21824 22330 -*starting.txt* For Vim version 7.4. Last change: 2013 Jul 20 21825 +*starting.txt* For Vim version 7.4. Last change: 2014 Mar 2922331 +*starting.txt* For Vim version 7.4. Last change: 2014 Jul 09 21826 22332 21827 22333 21828 22334 VIM REFERENCE MANUAL by Bram Moolenaar 21829 @@ -1276,8 +1276,10 @@ 22335 @@ -167,7 +167,10 @@ 22336 *-+/* 22337 +/{pat} The cursor will be positioned on the first line containing 22338 "pat" in the first file being edited (see |pattern| for the 22339 - available search patterns). 22340 + available search patterns). The search starts at the cursor 22341 + position, which can be the first line or the cursor position 22342 + last used from |viminfo|. To force a search from the first 22343 + line use "+1 +/pat". 22344 22345 +{command} *-+c* *-c* 22346 -c {command} {command} will be executed after the first file has been 22347 @@ -1276,8 +1279,10 @@ 21830 22348 When [!] is included an existing file is overwritten. 21831 22349 When [file] is omitted or is a number from 1 to 9, a … … 21840 22358 |:loadview| to load this view again. 21841 22359 When [file] is the name of a file ('viewdir' is not 22360 @@ -1501,7 +1506,7 @@ 22361 already set (registers, marks, |v:oldfiles|, etc.) 22362 will be overwritten {not in Vi} 22363 22364 - *:wv* *:wviminfo* *E137* *E138* *E574* 22365 + *:wv* *:wviminfo* *E137* *E138* *E574* *E886* 22366 :wv[iminfo][!] [file] Write to viminfo file [file] (default: see above). 22367 The information in the file is first read in to make 22368 a merge between old and new info. When [!] is used, 21842 22369 diff -Naur vim74.orig/runtime/doc/syntax.txt vim74/runtime/doc/syntax.txt 21843 22370 --- vim74.orig/runtime/doc/syntax.txt 2013-08-10 11:25:01.000000000 +0000 21844 +++ vim74/runtime/doc/syntax.txt 2014-0 6-01 00:42:52.604201808+000022371 +++ vim74/runtime/doc/syntax.txt 2014-07-21 23:33:15.276864164 +0000 21845 22372 @@ -1,4 +1,4 @@ 21846 22373 -*syntax.txt* For Vim version 7.4. Last change: 2013 Jul 05 21847 +*syntax.txt* For Vim version 7.4. Last change: 2014 Apr 0522374 +*syntax.txt* For Vim version 7.4. Last change: 2014 Jun 27 21848 22375 21849 22376 … … 21904 22431 21905 22432 Erlang is a functional programming language developed by Ericsson. Files with 22433 @@ -1647,7 +1688,7 @@ 22434 HTML comments are rather special (see an HTML reference document for the 22435 details), and the syntax coloring scheme will highlight all errors. 22436 However, if you prefer to use the wrong style (starts with <!-- and 22437 -ends with --!>) you can define > 22438 +ends with -->) you can define > 22439 :let html_wrong_comments=1 22440 22441 JavaScript and Visual Basic embedded inside HTML documents are highlighted as 21906 22442 @@ -1918,7 +1959,7 @@ 21907 22443 There are several implementations for LPC, we intend to support most widely … … 21913 22449 21914 22450 :let lpc_pre_v22 = 1 22451 @@ -2238,7 +2279,7 @@ 22452 22453 :let perl_include_pod = 0 22454 22455 -The reduce the complexity of parsing (and increase performance) you can switch 22456 +To reduce the complexity of parsing (and increase performance) you can switch 22457 off two elements in the parsing of variable names and contents. > 22458 22459 To handle package references in variable and function names not differently 21915 22460 @@ -3156,18 +3197,16 @@ 21916 22461 embedded script highlighting they wish to have. > … … 21944 22489 diff -Naur vim74.orig/runtime/doc/tags vim74/runtime/doc/tags 21945 22490 --- vim74.orig/runtime/doc/tags 2013-08-10 12:23:34.000000000 +0000 21946 +++ vim74/runtime/doc/tags 2014-0 6-01 00:42:52.630868407+000022491 +++ vim74/runtime/doc/tags 2014-07-21 23:33:15.336864008 +0000 21947 22492 @@ -12,6 +12,7 @@ 21948 22493 % motion.txt /*%* … … 21953 22498 %:gs cmdline.txt /*%:gs* 21954 22499 %:h cmdline.txt /*%:h* 21955 @@ -1140,6 +1141,7 @@ 22500 @@ -90,6 +91,10 @@ 22501 'bl' options.txt /*'bl'* 22502 'bomb' options.txt /*'bomb'* 22503 'breakat' options.txt /*'breakat'* 22504 +'breakindent' options.txt /*'breakindent'* 22505 +'breakindentopt' options.txt /*'breakindentopt'* 22506 +'bri' options.txt /*'bri'* 22507 +'briopt' options.txt /*'briopt'* 22508 'brk' options.txt /*'brk'* 22509 'browsedir' options.txt /*'browsedir'* 22510 'bs' options.txt /*'bs'* 22511 @@ -1140,6 +1145,7 @@ 21956 22512 +GUI_Photon various.txt /*+GUI_Photon* 21957 22513 +GUI_neXtaw various.txt /*+GUI_neXtaw* … … 21961 22517 +autocmd various.txt /*+autocmd* 21962 22518 +balloon_eval various.txt /*+balloon_eval* 21963 @@ -1199,6 +120 1,7 @@22519 @@ -1199,6 +1205,7 @@ 21964 22520 +mouse various.txt /*+mouse* 21965 22521 +mouse_dec various.txt /*+mouse_dec* … … 21969 22525 +mouse_pterm various.txt /*+mouse_pterm* 21970 22526 +mouse_sgr various.txt /*+mouse_sgr* 21971 @@ -1262,6 +126 5,7 @@22527 @@ -1262,6 +1269,7 @@ 21972 22528 +writebackup various.txt /*+writebackup* 21973 22529 +xfontset various.txt /*+xfontset* … … 21977 22533 +xsmp various.txt /*+xsmp* 21978 22534 +xsmp_interact various.txt /*+xsmp_interact* 21979 @@ -1412,6 +14 16,7 @@22535 @@ -1412,6 +1420,7 @@ 21980 22536 /\%>c pattern.txt /*\/\\%>c* 21981 22537 /\%>l pattern.txt /*\/\\%>l* … … 21985 22541 /\%V pattern.txt /*\/\\%V* 21986 22542 /\%[] pattern.txt /*\/\\%[]* 21987 @@ -1786,6 +179 1,7 @@22543 @@ -1786,6 +1795,7 @@ 21988 22544 :3match pattern.txt /*:3match* 21989 22545 ::. cmdline.txt /*::.* … … 21993 22549 ::gs cmdline.txt /*::gs* 21994 22550 ::h cmdline.txt /*::h* 21995 @@ -1825,6 +183 1,7 @@22551 @@ -1825,6 +1835,7 @@ 21996 22552 :GnatPretty ft_ada.txt /*:GnatPretty* 21997 22553 :GnatTags ft_ada.txt /*:GnatTags* … … 22001 22557 :MkVimball pi_vimball.txt /*:MkVimball* 22002 22558 :N editing.txt /*:N* 22003 @@ -1836,6 +184 3,7 @@22559 @@ -1836,6 +1847,7 @@ 22004 22560 :Nread pi_netrw.txt /*:Nread* 22005 22561 :Ns pi_netrw.txt /*:Ns* … … 22009 22565 :Nwrite pi_netrw.txt /*:Nwrite* 22010 22566 :P various.txt /*:P* 22011 @@ -1967,8 +197 5,8 @@22567 @@ -1967,8 +1979,8 @@ 22012 22568 :cabc map.txt /*:cabc* 22013 22569 :cabclear map.txt /*:cabclear* … … 22019 22575 :caddf quickfix.txt /*:caddf* 22020 22576 :caddfile quickfix.txt /*:caddfile* 22021 @@ -2212,6 +222 0,9 @@22577 @@ -2212,6 +2224,9 @@ 22022 22578 :foldopen fold.txt /*:foldopen* 22023 22579 :for eval.txt /*:for* … … 22029 22585 :function-verbose eval.txt /*:function-verbose* 22030 22586 :g repeat.txt /*:g* 22031 @@ -2298,6 +23 09,8 @@22587 @@ -2298,6 +2313,8 @@ 22032 22588 :keepj motion.txt /*:keepj* 22033 22589 :keepjumps motion.txt /*:keepjumps* … … 22038 22594 :lN quickfix.txt /*:lN* 22039 22595 :lNext quickfix.txt /*:lNext* 22040 @@ -2489,6 +250 2,7 @@22596 @@ -2489,6 +2506,7 @@ 22041 22597 :nbkey netbeans.txt /*:nbkey* 22042 22598 :nbstart netbeans.txt /*:nbstart* … … 22046 22602 :next editing.txt /*:next* 22047 22603 :next_f editing.txt /*:next_f* 22048 @@ -2518,6 +2532,8 @@ 22604 @@ -2509,8 +2527,11 @@ 22605 :noautocmd autocmd.txt /*:noautocmd* 22606 :noh pattern.txt /*:noh* 22607 :nohlsearch pattern.txt /*:nohlsearch* 22608 +:nor map.txt /*:nor* 22609 +:nore map.txt /*:nore* 22610 :norea map.txt /*:norea* 22611 :noreabbrev map.txt /*:noreabbrev* 22612 +:norem map.txt /*:norem* 22613 :noremap map.txt /*:noremap* 22614 :noremap! map.txt /*:noremap!* 22615 :noreme gui.txt /*:noreme* 22616 @@ -2518,6 +2539,8 @@ 22049 22617 :norm various.txt /*:norm* 22050 22618 :normal various.txt /*:normal* … … 22055 22623 :number various.txt /*:number* 22056 22624 :nun map.txt /*:nun* 22057 @@ -2738,6 +27 54,7 @@22625 @@ -2738,6 +2761,7 @@ 22058 22626 :sign-jump sign.txt /*:sign-jump* 22059 22627 :sign-list sign.txt /*:sign-list* … … 22063 22631 :sign-unplace sign.txt /*:sign-unplace* 22064 22632 :sil various.txt /*:sil* 22065 @@ -4294,6 +431 1,11@@22633 @@ -4294,6 +4318,12 @@ 22066 22634 E879 syntax.txt /*E879* 22067 22635 E88 windows.txt /*E88* … … 22072 22640 +E884 eval.txt /*E884* 22073 22641 +E885 sign.txt /*E885* 22642 +E886 starting.txt /*E886* 22074 22643 E89 message.txt /*E89* 22075 22644 E90 message.txt /*E90* 22076 22645 E91 options.txt /*E91* 22077 @@ -4423,6 +44 45,13 @@22646 @@ -4423,6 +4453,13 @@ 22078 22647 OverTheSpot mbyte.txt /*OverTheSpot* 22079 22648 P change.txt /*P* … … 22089 22658 Perl if_perl.txt /*Perl* 22090 22659 Posix intro.txt /*Posix* 22091 @@ -4900,6 +4929,7 @@ 22660 @@ -4766,6 +4803,7 @@ 22661 arglist editing.txt /*arglist* 22662 arglist-position editing.txt /*arglist-position* 22663 arglist-quit usr_07.txt /*arglist-quit* 22664 +arglistid() eval.txt /*arglistid()* 22665 argument-list editing.txt /*argument-list* 22666 argv() eval.txt /*argv()* 22667 as motion.txt /*as* 22668 @@ -4900,6 +4938,7 @@ 22092 22669 byte-count editing.txt /*byte-count* 22093 22670 byte2line() eval.txt /*byte2line()* … … 22097 22674 c change.txt /*c* 22098 22675 c.vim syntax.txt /*c.vim* 22099 @@ -5350,6 +538 0,7 @@22676 @@ -5350,6 +5389,7 @@ 22100 22677 dialog gui_w32.txt /*dialog* 22101 22678 dialogs-added version5.txt /*dialogs-added* … … 22105 22682 dict-identity eval.txt /*dict-identity* 22106 22683 dict-modification eval.txt /*dict-modification* 22107 @@ -5458,6 +54 89,8 @@22684 @@ -5458,6 +5498,8 @@ 22108 22685 escape intro.txt /*escape* 22109 22686 escape() eval.txt /*escape()* … … 22114 22691 eval() eval.txt /*eval()* 22115 22692 eval-examples eval.txt /*eval-examples* 22116 @@ -5492,6 +55 25,7 @@22693 @@ -5492,6 +5534,7 @@ 22117 22694 exclusive-linewise motion.txt /*exclusive-linewise* 22118 22695 executable() eval.txt /*executable()* … … 22122 22699 exists() eval.txt /*exists()* 22123 22700 exp() eval.txt /*exp()* 22124 @@ -5708,6 +57 42,7 @@22701 @@ -5708,6 +5751,7 @@ 22125 22702 ft-changelog-syntax syntax.txt /*ft-changelog-syntax* 22126 22703 ft-chill-syntax syntax.txt /*ft-chill-syntax* … … 22130 22707 ft-coldfusion-syntax syntax.txt /*ft-coldfusion-syntax* 22131 22708 ft-cpp-syntax syntax.txt /*ft-cpp-syntax* 22132 @@ -5724,6 +57 59,7 @@22709 @@ -5724,6 +5768,7 @@ 22133 22710 ft-dtd-syntax syntax.txt /*ft-dtd-syntax* 22134 22711 ft-eiffel-syntax syntax.txt /*ft-eiffel-syntax* … … 22138 22715 ft-form-syntax syntax.txt /*ft-form-syntax* 22139 22716 ft-fortran-indent indent.txt /*ft-fortran-indent* 22140 @@ -5876,6 +59 12,8 @@22717 @@ -5876,6 +5921,8 @@ 22141 22718 g:ada_with_gnat_project_files ft_ada.txt /*g:ada_with_gnat_project_files* 22142 22719 g:ada_withuse_ordinary ft_ada.txt /*g:ada_withuse_ordinary* … … 22147 22724 g:clojure_fuzzy_indent_blacklist indent.txt /*g:clojure_fuzzy_indent_blacklist* 22148 22725 g:clojure_fuzzy_indent_patterns indent.txt /*g:clojure_fuzzy_indent_patterns* 22149 @@ -5924,6 +59 62,7 @@22726 @@ -5924,6 +5971,7 @@ 22150 22727 g:html_use_encoding syntax.txt /*g:html_use_encoding* 22151 22728 g:html_use_xhtml syntax.txt /*g:html_use_xhtml* … … 22155 22732 g:netrw_altv pi_netrw.txt /*g:netrw_altv* 22156 22733 g:netrw_banner pi_netrw.txt /*g:netrw_banner* 22157 @@ -5944,6 +59 83,7 @@22734 @@ -5944,6 +5992,7 @@ 22158 22735 g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl* 22159 22736 g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse* … … 22163 22740 g:netrw_ftp pi_netrw.txt /*g:netrw_ftp* 22164 22741 g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject* 22165 @@ -5958,6 + 5998,7 @@22742 @@ -5958,6 +6007,7 @@ 22166 22743 g:netrw_hide pi_netrw.txt /*g:netrw_hide* 22167 22744 g:netrw_home pi_netrw.txt /*g:netrw_home* … … 22171 22748 g:netrw_ignorenetrc pi_netrw.txt /*g:netrw_ignorenetrc* 22172 22749 g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir* 22173 @@ -6358,6 +6399,7 @@ 22750 @@ -6087,6 +6137,7 @@ 22751 getcmdline() eval.txt /*getcmdline()* 22752 getcmdpos() eval.txt /*getcmdpos()* 22753 getcmdtype() eval.txt /*getcmdtype()* 22754 +getcurpos() eval.txt /*getcurpos()* 22755 getcwd() eval.txt /*getcwd()* 22756 getfontname() eval.txt /*getfontname()* 22757 getfperm() eval.txt /*getfperm()* 22758 @@ -6358,6 +6409,7 @@ 22174 22759 hl-WildMenu syntax.txt /*hl-WildMenu* 22175 22760 hlID() eval.txt /*hlID()* … … 22179 22764 home intro.txt /*home* 22180 22765 home-replace editing.txt /*home-replace* 22181 @@ -6669,6 +67 11,7 @@22766 @@ -6669,6 +6721,7 @@ 22182 22767 linewise-visual visual.txt /*linewise-visual* 22183 22768 lisp.vim syntax.txt /*lisp.vim* … … 22187 22772 list-identity eval.txt /*list-identity* 22188 22773 list-index eval.txt /*list-index* 22189 @@ -6921,6 +6964,15 @@ 22774 @@ -6780,6 +6833,7 @@ 22775 match-highlight pattern.txt /*match-highlight* 22776 match-parens tips.txt /*match-parens* 22777 matchadd() eval.txt /*matchadd()* 22778 +matchaddpos() eval.txt /*matchaddpos()* 22779 matcharg() eval.txt /*matcharg()* 22780 matchdelete() eval.txt /*matchdelete()* 22781 matchend() eval.txt /*matchend()* 22782 @@ -6921,6 +6975,15 @@ 22190 22783 netrw pi_netrw.txt /*netrw* 22191 22784 netrw-% pi_netrw.txt /*netrw-%* … … 22203 22796 netrw-D pi_netrw.txt /*netrw-D* 22204 22797 netrw-O pi_netrw.txt /*netrw-O* 22205 @@ -6978,6 +70 30,7 @@22798 @@ -6978,6 +7041,7 @@ 22206 22799 netrw-getftype pi_netrw.txt /*netrw-getftype* 22207 22800 netrw-gf pi_netrw.txt /*netrw-gf* … … 22211 22804 netrw-gx pi_netrw.txt /*netrw-gx* 22212 22805 netrw-handler pi_netrw.txt /*netrw-handler* 22213 @@ -6992,6 +70 45,7 @@22806 @@ -6992,6 +7056,7 @@ 22214 22807 netrw-internal-variables pi_netrw.txt /*netrw-internal-variables* 22215 22808 netrw-intro-browse pi_netrw.txt /*netrw-intro-browse* … … 22219 22812 netrw-listbookmark pi_netrw.txt /*netrw-listbookmark* 22220 22813 netrw-listhack pi_netrw.txt /*netrw-listhack* 22221 @@ -7022,6 +70 76,7 @@22814 @@ -7022,6 +7087,7 @@ 22222 22815 netrw-nexplore pi_netrw.txt /*netrw-nexplore* 22223 22816 netrw-noload pi_netrw.txt /*netrw-noload* … … 22227 22820 netrw-o pi_netrw.txt /*netrw-o* 22228 22821 netrw-options pi_netrw.txt /*netrw-options* 22229 @@ -7033,6 +70 88,7 @@22822 @@ -7033,6 +7099,7 @@ 22230 22823 netrw-p13 pi_netrw.txt /*netrw-p13* 22231 22824 netrw-p14 pi_netrw.txt /*netrw-p14* … … 22235 22828 netrw-p3 pi_netrw.txt /*netrw-p3* 22236 22829 netrw-p4 pi_netrw.txt /*netrw-p4* 22237 @@ -7374,6 +74 30,7 @@22830 @@ -7374,6 +7441,7 @@ 22238 22831 profiling repeat.txt /*profiling* 22239 22832 profiling-variable eval.txt /*profiling-variable* … … 22243 22836 pronounce intro.txt /*pronounce* 22244 22837 psql ft_sql.txt /*psql* 22245 @@ -7577,6 +76 34,7 @@22838 @@ -7577,6 +7645,7 @@ 22246 22839 s/\3 change.txt /*s\/\\3* 22247 22840 s/\9 change.txt /*s\/\\9* … … 22251 22844 s/\L change.txt /*s\/\\L* 22252 22845 s/\U change.txt /*s\/\\U* 22253 @@ -7787,6 +78 45,7 @@22846 @@ -7787,6 +7856,7 @@ 22254 22847 spell-affix-mbyte spell.txt /*spell-affix-mbyte* 22255 22848 spell-affix-not-supported spell.txt /*spell-affix-not-supported* … … 22259 22852 spell-dic-format spell.txt /*spell-dic-format* 22260 22853 spell-double-scoring spell.txt /*spell-double-scoring* 22261 @@ -7872,6 +79 31,7 @@22854 @@ -7872,6 +7942,7 @@ 22262 22855 strdisplaywidth() eval.txt /*strdisplaywidth()* 22263 22856 strftime() eval.txt /*strftime()* … … 22267 22860 string-functions usr_41.txt /*string-functions* 22268 22861 string-match eval.txt /*string-match* 22269 @@ -7936,6 + 7996,7 @@22862 @@ -7936,6 +8007,7 @@ 22270 22863 system() eval.txt /*system()* 22271 22864 system-functions usr_41.txt /*system-functions* … … 22275 22868 t motion.txt /*t* 22276 22869 t: eval.txt /*t:* 22277 @@ -8280,6 +83 41,7 @@22870 @@ -8280,6 +8352,7 @@ 22278 22871 undofile() eval.txt /*undofile()* 22279 22872 undotree() eval.txt /*undotree()* … … 22283 22876 unlisted-buffer windows.txt /*unlisted-buffer* 22284 22877 up-down-motions motion.txt /*up-down-motions* 22285 @@ -8364,6 +84 26,7 @@22878 @@ -8364,6 +8437,7 @@ 22286 22879 v:foldend eval.txt /*v:foldend* 22287 22880 v:foldlevel eval.txt /*v:foldlevel* … … 22291 22884 v:key eval.txt /*v:key* 22292 22885 v:lang eval.txt /*v:lang* 22293 @@ -8377,6 +84 40,7 @@22886 @@ -8377,6 +8451,7 @@ 22294 22887 v:prevcount eval.txt /*v:prevcount* 22295 22888 v:profiling eval.txt /*v:profiling* … … 22301 22894 diff -Naur vim74.orig/runtime/doc/tagsrch.txt vim74/runtime/doc/tagsrch.txt 22302 22895 --- vim74.orig/runtime/doc/tagsrch.txt 2013-08-10 11:25:02.000000000 +0000 22303 +++ vim74/runtime/doc/tagsrch.txt 2014-0 6-01 00:42:52.637535056+000022896 +++ vim74/runtime/doc/tagsrch.txt 2014-07-21 23:33:15.386863877 +0000 22304 22897 @@ -1,4 +1,4 @@ 22305 22898 -*tagsrch.txt* For Vim version 7.4. Last change: 2013 Jul 28 … … 22325 22918 diff -Naur vim74.orig/runtime/doc/term.txt vim74/runtime/doc/term.txt 22326 22919 --- vim74.orig/runtime/doc/term.txt 2013-08-10 11:25:02.000000000 +0000 22327 +++ vim74/runtime/doc/term.txt 2014-0 6-01 00:42:52.644201706+000022920 +++ vim74/runtime/doc/term.txt 2014-07-21 23:33:15.423530448 +0000 22328 22921 @@ -1,4 +1,4 @@ 22329 22922 -*term.txt* For Vim version 7.4. Last change: 2013 Mar 13 … … 22345 22938 diff -Naur vim74.orig/runtime/doc/todo.txt vim74/runtime/doc/todo.txt 22346 22939 --- vim74.orig/runtime/doc/todo.txt 2013-08-10 11:25:02.000000000 +0000 22347 +++ vim74/runtime/doc/todo.txt 2014-0 6-01 00:42:52.700868228+000022940 +++ vim74/runtime/doc/todo.txt 2014-07-21 23:33:15.583530030 +0000 22348 22941 @@ -1,4 +1,4 @@ 22349 22942 -*todo.txt* For Vim version 7.4. Last change: 2013 Aug 10 22350 +*todo.txt* For Vim version 7.4. Last change: 2014 May 2222943 +*todo.txt* For Vim version 7.4. Last change: 2014 Jul 19 22351 22944 22352 22945 22353 22946 VIM REFERENCE MANUAL by Bram Moolenaar 22354 @@ -34,38 +34,2 42@@22947 @@ -34,38 +34,289 @@ 22355 22948 *known-bugs* 22356 22949 -------------------- Known bugs and current work ----------------------- 22357 22950 22951 +Completion menu: remove redraw (Hirohito Higashi) 22952 + 22358 22953 +Regexp problems: 22359 22954 +- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$' … … 22369 22964 + \%u, \%x, \%o, \%d followed by a composing character 22370 22965 + 22966 +Crash when splitting the window when the size is tiny. 22967 +(Yukihiro Nakadaira, 2014 Jul 15-16) 22968 + 22969 +Another problem with splitting window. (Yukihiro Nakadaira, 2014 Jul 17) 22970 +Patch Jul 17. 22971 + 22972 +Using freed memory when jumping from a quickfix list. (lcd47, 2014 Jul 17) 22973 + 22974 +Patch to fix valgrind error. (Dominique Pelle, 2014 Jul 9) 22975 + 22976 +Vroom filetype support. (David Barnett, 2014 Jul 10) 22977 + 22978 +u_undo error. Reproduce with description from Ayberk Ozgur, 2014 Jul 17. 22979 + 22980 +Updated Django files. (Dave Hodder, 2014 Jul 13) 22981 + 22982 +Title of quickfist list is not kept for setqflist(list 'r'). 22983 +(Lcd, 2014 Jul 17) With test Jul 18. 22984 + 22985 +Patch to fix noremap flags not cleared after typing Esc. (Jacob Niehus, 2014 22986 +Jul 9) 22987 + 22371 22988 +Problem that a previous silent ":throw" causes a following try/catch not to 22372 22989 +work. (ZyX, 2013 Sep 28) 22373 22990 + 22991 +DiffChange highlighting doesn't combine with 'cursurline'. (Benjamin Fritz) 22992 +Patch by Christian (2014 Jul 12) 22993 + 22994 +BufWinLeave autocommand executed in the wrong buffer? (Davit Samvelyan, 2014 22995 +Jul 14) 22996 + 22997 +When 'clipboard' is "unnamed", :g/pat/d is very slow. Only set the clipboard 22998 +after the last delete? (Praful, 2014 May 28) 22999 +Patch by Christian Brabandt, 2014 Jun 18. Update Jun 25. 23000 + 23001 +Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31) 23002 + 22374 23003 +":cd C:\Windows\System32\drivers\etc*" does not work, even though the 22375 23004 +directory exists. (Sergio Gallelli, 2013 Dec 29) 22376 23005 + 23006 +The entries added by matchaddpos() are returned by getmatches() but can't be 23007 +set with setmatches(). (lcd47, 2014 Jun 29) 23008 + 22377 23009 +Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15) 22378 23010 + 22379 +Setting 'ttymouse' empty causes Dec mouse to be detected. (Elijah Griffin,22380 +2014 May 13)22381 +22382 23011 Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) 22383 23012 22384 23013 -Patch to add "acl" and "xpm" as a feature. (Ken Takata, 2013 Jul 8) 23014 +When using an undo file, also restore the changelist, so that "g;" works. 23015 + 23016 +Value returned by virtcol() changes depending on how lines wrap. This is 23017 +inconsistant with the documentation. 23018 + 22385 23019 +MS-Windows: Crash opening very long file name starting with "\\". 22386 23020 +(Christian Brock, 2012 Jun 29) … … 22390 23024 +Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19) 22391 23025 + 23026 +"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014 23027 +Jun 8) 23028 + 22392 23029 +Syntax file for gnuplot. Existing one is very old. (Andrew Rasmussen, 2014 22393 23030 +Feb 24) 22394 23031 + 22395 +Add digraph for Rouble: =P. What's the Unicode?22396 +22397 23032 +Issue 174: Detect Mason files. 22398 23033 + … … 22402 23037 + 22403 23038 +PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19) 23039 + 23040 +Patch for matchparen. (James McCoy, 2014 Jul 11) 22404 23041 + 22405 23042 +Spell files use a latin single quote. Unicode also has another single quote: … … 22413 23050 + 22414 23051 +Win32: use 64 bit stat() if possible. (Ken Takata, 2014 May 12) 22415 +More tests May 14. 23052 +More tests May 14. Update May 29. 23053 23054 -Patch to make has() check for Vim version and patch at the same time. 23055 -(Marc Weber, 2013 Jun 7) 23056 +The garbage collector may use too much stack. Make set_ref_in_item() 23057 +iterative instead of recursive. Test program by Marc Weber (2013 Dec 10) 23058 +Patch by Ben Fritz, 2014 Jun 22. 22416 23059 + 22417 23060 +Idea: For a window in the middle (has window above and below it), use … … 22421 23064 +Can we make ":unlet $VAR" use unsetenv() to delete the env var? 22422 23065 +What for systems that don't have unsetenv()? 22423 +22424 +Patch to make getchar() work for typing Esc. (Yasuhiro Matsumoto, 2014 May 13)22425 +22426 +Patch for problem that v:register is set to '_' after deleting into the black22427 +hole register.22428 23066 + 22429 23067 +This does not give an error: (Andre Sihera, 2014 Mar 21) … … 22436 23074 +from? 22437 23075 + 22438 +P atch to add arglistid(), get the ID of the currently used argument list.22439 + (Marcin Szamotulski, 2014 Apr 27)23076 +Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman, 23077 +2014 Jun 8) 22440 23078 + 22441 23079 +Include a plugin manager with Vim? Neobundle seems to be the best currently. … … 22476 23114 +normal spell file. (Enno Nagel, 2014 Mar 29) 22477 23115 + 22478 +- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav 22479 + Smilauer, 2004 Sep 13, fix Oct 31, update 2007 May 30) 22480 + Version for latest MacVim: Tobia Conforto, 2009 Nov 23 22481 + More recent version: https://retracile.net/wiki/VimBreakIndent 22482 + Posted to vim-dev by Taylor Hedberg, 2011 Nov 25 22483 + Update by Taylor Hedberg, 2013 May 30. 22484 + Updated for Vim 7.4 by Ken Takata, 2013 Oct 5. 22485 + Update by Christian Brabandt, 2014 May 9. Remarks by Ken Takata. 22486 + Update by Christian 2014 May 12, github link on May 15 23116 +CTRL-] in Visual mode uses the selected text as a tag. This does not work 23117 +when preceded with CTRL-W. (Patrick Hemmer, 2014 Jun 28) 22487 23118 + 22488 23119 +When typing the first character of a command, e.g. "f", then using a menu, the … … 22495 23126 +various other commands. (ZyX, 2014 Mar 30) 22496 23127 + 23128 +patch to skip sort if no line matches the expression. 23129 +(Christian Brabandt, 2014 Jun 25) 23130 + 23131 +Patch to add sortuniq(). (Cade Forester, 2014 Mar 19) 23132 +Or add uniq() instead? Patch by lcd47, but it has problems. 23133 + 23134 +Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct 23135 +30) 23136 + 23137 +Patch to support expression argument to sort() instead of a function name. 23138 +Yasuhiro Matsumoto, 2013 May 31. 23139 +Or should we add a more general mechanism, like lambda functions? 23140 + 22497 23141 +VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow 22498 23142 +instead. (Samuel Ferencik, 2013 Sep 28) 22499 22500 -Patch to make has() check for Vim version and patch at the same time. 22501 -(Marc Weber, 2013 Jun 7) 23143 + 22502 23144 +Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4) 22503 + 22504 +Patch to add flag to shortmess to avoid giving completion messages. 22505 +(Shougo Matsu, 2014 Jan 6, update Jan 11) 23145 +Remark on the docs. Should not be a compile time feature. But then what? 23146 + 23147 +Completion of ":e" is ":earlier", whould be ":edit". Complete to the matching 23148 +command instead of doing this alphabetically. (Mikel Jorgensen) 22506 23149 + 22507 23150 +Patch to add v:completed_item. (Shougo Matsu, 2013 Nov 29). … … 22510 23153 + 22511 23154 +Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14) 22512 +22513 +Patch to add sortuniq(). (Cade Forester, 2014 Mar 19)22514 +Or add uniq() instead? Patch by lcd47, but it has problems.22515 23155 + 22516 23156 +Perl: support for Activestate perl 5.18: Issue 170. … … 22527 23167 +Patch to add ":undorecover", get as much text out of the undo file as 22528 23168 +possible. (Christian Brabandt, 2014 Mar 12) 22529 +22530 +Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)22531 23169 22532 23170 -Several Win32 functions are not using Unicode. 22533 23171 -Patches to fix this. (Ken Takata, 2013 Aug 9) 23172 +Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24) 23173 + 22534 23174 +Updated spec ftplugin. (MatÄj Cepl, 2013 Oct 16) 22535 23175 + … … 22604 23244 22605 23245 The BufUnload event is triggered when re-using the empty buffer. 22606 @@ -76,6 + 280,10 @@23246 @@ -76,6 +327,10 @@ 22607 23247 - The word that was selected (empty if abandoned complete) 22608 23248 - Type of completion: tag, omnifunc, user func. … … 22615 23255 That is, calling a dictionary function on an autoloaded dict. 22616 23256 Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar 22617 @@ -83,1 0 +291,6@@23257 @@ -83,17 +338,19 @@ 22618 23258 Patch by Christian Brabandt, 2013 Mar 23. 22619 23259 Not 100% sure this is the right solution. … … 22623 23263 -Stocker, 2012 Jan 5) 22624 23264 - 22625 22626 22627 22628 @@ -94,6 +298,19 @@ 23265 -Patch to support expression argument to sort() instead of a function name. 23266 -Yasuhiro Matsumoto, 2013 May 31. 23267 -Or should we add a more general mechanism, like lambda functions? 23268 - 22629 23269 Problem caused by patch 7.3.638: window->open does not update window 22630 23270 correctly. Issue 91. … … 22632 23272 +Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}. 22633 23273 +(Christian Brabandt, 2013 Dec 9) 22634 +22635 +The garbage collector may use too much stack. Make set_ref_in_item()22636 +iterative instead of recursive. Test program by Marc Weber (2013 Dec 10)22637 23274 + 22638 23275 +Exception caused by argument of return is not caught by try/catch. … … 22646 23283 2013 Mar 19, later message) 22647 23284 22648 @@ -108,6 +3 25,8 @@23285 @@ -108,6 +365,8 @@ 22649 23286 Bug with 'cursorline' in diff mode. Line being scrolled into view gets 22650 23287 highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4) … … 22655 23292 May 17: with winlist() and tabpagelist(). 22656 23293 May 19: with local variables. 22657 @@ -119, 6 +338,8@@23294 @@ -119,10 +378,13 @@ 22658 23295 Patch from Christian Brabandt to make the "buffer" argument for ":sign place" 22659 23296 optional. (2013 Jul 12) … … 22664 23301 functions. (Christian Brabandt, 2013 May 8, update May 21) 22665 23302 Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14) 22666 @@ -149,11 +370,19 @@ 23303 Second one. Update May 22. 23304 +Update by Daniel Hahler, 2014 Jul 4. 23305 23306 Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec) 23307 23308 @@ -137,9 +399,6 @@ 23309 23310 Bug: findfile("any", "file:///tmp;") does not work. 23311 23312 -v:register is not directly reset to " after a delete command that specifies a 23313 -register. It is reset after the next command. (Steve Vermeulen, 2013 Mar 16) 23314 - 23315 'ff' is wrong for one-line file without EOL. (Issue 77) 23316 23317 Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14) 23318 @@ -149,11 +408,19 @@ 22667 23319 process that is running. It might actually be some other program, e.g. after 22668 23320 a reboot. … … 22686 23338 not correctly updated. (Paul Harris, 2012 Feb 27) 22687 23339 22688 @@ -167,8 + 396,17 @@23340 @@ -167,8 +434,17 @@ 22689 23341 22690 23342 Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27) … … 22704 23356 Patch to add 'completeselect' option. Specifies how to select a candidate in 22705 23357 insert completion. (Shougo, 2013 May 29) 22706 @@ -182,9 +4 20,6 @@23358 @@ -182,9 +458,6 @@ 22707 23359 Win32: The Python interface only works with one version of Python, selected at 22708 23360 compile time. Can this be made to work with version 2.1 and 2.2 dynamically? … … 22714 23366 Vim script. Requires converting the arguments and return value, like with 22715 23367 vim.bindeval(). 22716 @@ -205,9 +4 40,6 @@23368 @@ -205,9 +478,6 @@ 22717 23369 Add a check for b:no_match_paren in Highlight_matching_Pair() (Marcin 22718 23370 Szamotulski, 2012 Nov 8) … … 22724 23376 22725 23377 Session file creation: 'autochdir' causes trouble. Keep it off until after 22726 @@ -240,10 + 472,6 @@23378 @@ -240,10 +510,6 @@ 22727 23379 Help for 'b:undo_indent'. (Thilo Six, 2012 May 28) 22728 23380 Also question if examples are correct. … … 22735 23387 Suggestion for another map. (Philip Mat, 2012 Jun 18) 22736 23388 But use "gi" instead of "a". Or use CTRL-\ CTRL-O. 22737 @@ -251,1 0 +479,6@@23389 @@ -251,13 +517,12 @@ 22738 23390 Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012 22739 23391 Aug 16) … … 22746 23398 is confusing. Should say "the argument list is empty". 22747 23399 22748 @@ -272,27 +496,23 @@ 23400 +xterm supports escape sequences to mark a paste operation. Need to be 23401 +enabled. (Bruno Sutic, 2014 Jul 11) How to know the terminal supports this? 23402 + 23403 URXVT: 23404 - will get stuck if byte sequence does not contain the expected semicolon. 23405 - Use urxvt mouse support also in xterm. Explanations: 23406 @@ -272,27 +537,23 @@ 22749 23407 22750 23408 Patch to list user digraphs. (Christian Brabandt, 2012 Apr 14) … … 22779 23437 22780 23438 Update for vim2html.pl. (Tyru, 2013 Feb 22) 22781 @@ -374,8 + 594,6 @@23439 @@ -374,8 +635,6 @@ 22782 23440 Setting $HOME on MS-Windows is not very well documented. Suggestion by Ben 22783 23441 Fritz (2011 Oct 27). … … 22788 23446 doing ":g/test/d". Putting every delete on the clipboard? (Robert Chan, 2011 22789 23447 Jun 17) 22790 @@ -396,10 +6 14,10 @@23448 @@ -396,10 +655,10 @@ 22791 23449 Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25) 22792 23450 … … 22801 23459 On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a 22802 23460 64 bits value. Change all number options to use nropt_T and define it to the 22803 @@ -419,6 +6 37,8 @@23461 @@ -419,6 +678,8 @@ 22804 23462 When setqflist() uses a filename that triggers a BufReadCmd autocommand Vim 22805 23463 doesn't jump to the correct line with :cfirst. (ZyX, 2011 Sep 18) … … 22810 23468 Patch from Christian Brabandt, 2011 Aug 19. 22811 23469 22812 @@ -456,6 +676,9 @@ 23470 @@ -439,9 +700,6 @@ 23471 23472 "0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22) 23473 23474 -Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct 23475 -30) 23476 - 23477 Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011 23478 May 24) Update May 26. 23479 23480 @@ -456,6 +714,9 @@ 22813 23481 number, but it is in the sign column. Doesn't look right. (ZyX 2011 Jun 5) 22814 23482 Patch by Christian Brabandt, 2011 Jun 5. Introduces new problems. … … 22820 23488 Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9. 22821 23489 22822 @@ -524,9 +7 47,6 @@23490 @@ -524,9 +785,6 @@ 22823 23491 Patch to add FoldedLineNr highlighting: different highlighting for the line 22824 23492 number of a closed fold. (eXerigumo Clanjor, 2013 Jul 15) … … 22830 23498 - Profiling: 22831 23499 ./vim -u NONE -s ~/vim/test/ruby.vim 22832 @@ -556,7 + 776,7 @@23500 @@ -556,7 +814,7 @@ 22833 23501 the system encoding (usually utf-8). 22834 23502 … … 22839 23507 Problem producing tags file when hebrew.frx is present. It has a BOM. 22840 23508 Results in E670. (Tony Mechelynck, 2010 May 2) 22841 @@ -573,8 +793,7 @@ 22842 22843 getpos()/setpos() don't include curswant. getpos() could return a fifth 22844 element. setpos() could accept an optional fifth element. 23509 @@ -571,11 +829,6 @@ 23510 file names unique, also support this for 'backupdir'. (Mikolaj Machowski) 23511 Patch by Christian Brabandt, 2010 Oct 21. 23512 23513 -getpos()/setpos() don't include curswant. getpos() could return a fifth 23514 -element. setpos() could accept an optional fifth element. 22845 23515 -Patch by Christian Brabandt, 2010 Sep 6. Check that new argument is optional 22846 23516 -and that it's documented. 22847 +Patch by Christian Brabandt, 2010 Sep 6. Again 2013 Aug 22. 22848 23517 - 22849 23518 With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott, 22850 23519 2010 Oct 24) 22851 @@ -595,9 +814,6 @@ 23520 23521 @@ -595,9 +848,6 @@ 22852 23522 checked to be in a comment. Implement FM_SKIPCOMM flag of findmatchlimit(). 22853 23523 Issue 46. … … 22859 23529 22860 23530 Using CompilerSet doesn't record where an option was set from. E.g., in the 22861 @@ -620,8 +8 36,6 @@23531 @@ -620,8 +870,6 @@ 22862 23532 When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines 22863 23533 instead of one. (Constantin Pan, 2010 Sep 10) … … 22868 23538 Winckler, 2011 May 11) 22869 23539 Requires a map mode for Insert mode started from blockwise Visual mode. 22870 @@ -629,10 +8 43,6 @@23540 @@ -629,10 +877,6 @@ 22871 23541 Writing nested List and Dict in viminfo gives error message and can't be read 22872 23542 back. (Yukihiro Nakadaira, 2010 Nov 13) … … 22879 23549 Additional info by Dominique Pelle. (also on 2010 Apr 10) 22880 23550 22881 @@ -759,6 + 969,7 @@23551 @@ -759,6 +1003,7 @@ 22882 23552 22883 23553 Patch to add farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2) … … 22887 23557 Patch to add "focusonly" to 'scrollopt', so that scrollbind also applies in 22888 23558 window that doesn't have focus. (Jonathon Mah, 2009 Jan 12) 22889 @@ -838,8 +10 49,6 @@23559 @@ -838,8 +1083,6 @@ 22890 23560 Win32 GUI: last message from startup doesn't show up when there is an echoerr 22891 23561 command. (Cyril Slobin, 2009 Mar 13) … … 22896 23566 does not work. (Nieko Maatjes, 2009 Jan 8, Ingo Karkat, 2009 Jan 22) 22897 23567 22898 @@ -856,7 +10 65,12 @@23568 @@ -856,7 +1099,12 @@ 22899 23569 Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing 22900 23570 char 0x0301. (Tony Mechelynck, 2009 Mar 4) … … 22910 23580 Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish 22911 23581 messages, even though locale is not supported. But ":lang messages 22912 @@ -885,7 +1 099,7 @@23582 @@ -885,7 +1133,7 @@ 22913 23583 Completion for ":buf" doesn't work properly on Win32 when 'shellslash' is off. 22914 23584 (Henrik Ohman, 2009, Jan 29) … … 22919 23589 Use a different option or let it depend on whether 'shell' looks like a 22920 23590 unix-like shell? 22921 @@ -918,8 +11 32,6 @@23591 @@ -918,8 +1166,6 @@ 22922 23592 Add v:motion_force. (Kana Natsuno, 2008 Dec 6) 22923 23593 Maybe call it v:motiontype. … … 22928 23598 doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer 22929 23599 probably causes this. 22930 @@ -928,7 +11 40,7 @@23600 @@ -928,7 +1174,7 @@ 22931 23601 2009 Jan 16) 22932 23602 … … 22937 23607 Document that default font in Athena can be set with resources: 22938 23608 XtDefaultFont: "9x15" 22939 @@ -942,6 +11 54,7 @@23609 @@ -942,6 +1188,7 @@ 22940 23610 22941 23611 ":pedit %" with a BufReadPre autocommand causes the cursor to move to the … … 22945 23615 Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3 22946 23616 laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1) 22947 @@ -1085,9 +1 298,6 @@23617 @@ -1085,9 +1332,6 @@ 22948 23618 result in no matches. Convert chars to lower case? (Erik Wognsen, 2009 Apr 22949 23619 16) … … 22955 23625 (Lech Lorens, 2010 Aug 30) 22956 23626 22957 @@ -1289,6 +1 499,7 @@23627 @@ -1289,6 +1533,7 @@ 22958 23628 22959 23629 Win64: Seek error in swap file for a very big file (3 Gbyte). Check storing … … 22963 23633 Win32: patch for fullscreen mode. (Liushaolin, 2008 April 17) 22964 23634 22965 @@ -1296,14 +15 07,17 @@23635 @@ -1296,14 +1541,17 @@ 22966 23636 Depends on 'shellslash', 'shellquote' and 'shellxquote', but shellescape() 22967 23637 only takes 'shellslash' into account. … … 22985 23655 2007 Jun 21) 22986 23656 22987 @@ -1459,6 +1 673,9 @@23657 @@ -1459,6 +1707,9 @@ 22988 23658 tree stops unexpectedly when using ":cd " and entering a directory that 22989 23659 doesn't contain other directories. … … 22995 23665 highlight Normal ctermbg=DarkGray 22996 23666 set background=dark 22997 @@ -1685,7 +19 02,7 @@23667 @@ -1685,7 +1936,7 @@ 22998 23668 - testdir/Make_dos_sh.mak for running tests with MingW. (Bill Mccarthy, 2008 22999 23669 Sep 13) … … 23004 23674 Vissale Neang. (Martin Stubenschrott) Asked Vissale to make the scripts 23005 23675 more friendly for the Vim distribution. 23006 @@ -1715,7 +19 32,7 @@23676 @@ -1715,7 +1966,7 @@ 23007 23677 How does this work? Missing comments. 23008 23678 8 Add a few more command names to the menus. Patch from Jiri Brezina … … 23013 23683 - Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work 23014 23684 for multi-byte characters. 23015 @@ -1864,8 +2 081,6 @@23685 @@ -1864,8 +2115,6 @@ 23016 23686 Win32 GUI known bugs: 23017 23687 - Win32: tearoff menu window should have a scrollbar when it's taller than … … 23022 23692 file names. Can we load unicows.dll dynamically? 23023 23693 8 The -P argument doesn't work very well with many MDI applications. 23024 @@ -1873,9 +2 088,6 @@23694 @@ -1873,9 +2122,6 @@ 23025 23695 Tutorial: http://win32assembly.online.fr/tut32.html 23026 23696 8 In eval.c, io.h is included when MSWIN32 is defined. Shouldn't this be … … 23032 23702 of ":only" is highlighted like the cursor. (Lipelis) 23033 23703 8 When 'encoding' is "utf-8", should use 'guifont' for both normal and wide 23034 @@ -1887,9 +2 099,6 @@23704 @@ -1887,9 +2133,6 @@ 23035 23705 8 Use another default for 'termencoding': the active codepage. Means that 23036 23706 when 'encoding' is changed typing characters still works properly. … … 23042 23712 2004 May 9) 23043 23713 8 Win32: When clicking on the gvim title bar, which gives it focus, produces 23044 @@ -2272,8 +2 481,6 @@23714 @@ -2272,8 +2515,6 @@ 23045 23715 character. (Yasuhiro Matsumoto) It should return 1 when used on a tail 23046 23716 byte, like for utf-8. Store second byte of double-byte in ScreenLines2[] … … 23051 23721 ":insert" command, causing the following "endfunction" not to be found. 23052 23722 Add skipping this perl construction inside function definitions. 23053 @@ -2566,8 +2 773,6 @@23723 @@ -2566,8 +2807,6 @@ 23054 23724 input method called from GDK code. Without Perl it doesn't crash. 23055 23725 - VMS: Vimdiff doesn't work with the VMS diff, because the output looks … … 23060 23730 in Vim as if the rightmost scrollbar was used. 23061 23731 - GTK with Gnome: Produces an error message when starting up: 23062 @@ -2736,10 +29 41,6 @@23732 @@ -2736,10 +2975,6 @@ 23063 23733 23064 23734 … … 23071 23741 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219777 23072 23742 - Unicode defines another quote character: 0x2019. Use it as an equivalent 23073 @@ -2925,12 +31 26,8 @@23743 @@ -2925,12 +3160,8 @@ 23074 23744 8 toupper() function doesn't handle byte count changes. 23075 23745 7 Searching and composing characters: … … 23084 23754 8 Detect overlong UTF-8 sequences and handle them like illegal bytes. 23085 23755 8 ":s/x/\u\1/" doesn't work, making uppercase isn't done for multi-byte 23086 @@ -3153,6 +33 50,7 @@23756 @@ -3153,6 +3384,7 @@ 23087 23757 Built-in script language: 23088 23758 8 Make the filename and line number available to script functions, so that … … 23092 23762 restore option values. Especially useful for new options. Problem: how 23093 23763 to avoid a performance penalty (esp. for string options)? 23094 @@ -4035,8 +42 33,7 @@23764 @@ -4035,8 +4267,7 @@ 23095 23765 7 Use Tabs for the indent of starting lines, pad with spaces for 23096 23766 continuation lines. Allows changing 'tabstop' without messing up the … … 23102 23772 23103 23773 Java: 23104 @@ -4655,7 +48 52,7 @@23774 @@ -4655,7 +4886,7 @@ 23105 23775 23106 23776 Digraphs: … … 23111 23781 characters? 23112 23782 8 Add command to remove one or more (all) digraphs. (Brown) 23113 @@ -4852,6 +50 49,7 @@23783 @@ -4852,6 +5083,7 @@ 23114 23784 6 Add ":timer" command, to set a command to be executed at a certain 23115 23785 interval, or once after some time has elapsed. (Aaron) … … 23121 23791 diff -Naur vim74.orig/runtime/doc/undo.txt vim74/runtime/doc/undo.txt 23122 23792 --- vim74.orig/runtime/doc/undo.txt 2013-08-10 11:25:02.000000000 +0000 23123 +++ vim74/runtime/doc/undo.txt 2014-0 6-01 00:42:52.734201477+000023793 +++ vim74/runtime/doc/undo.txt 2014-07-21 23:33:15.630196575 +0000 23124 23794 @@ -1,4 +1,4 @@ 23125 23795 -*undo.txt* For Vim version 7.4. Last change: 2012 Mar 04 23126 +*undo.txt* For Vim version 7.4. Last change: 201 3 Sep 0823796 +*undo.txt* For Vim version 7.4. Last change: 2014 May 24 23127 23797 23128 23798 … … 23137 23807 nothing (undoes an undo). 23138 23808 23809 @@ -97,9 +97,9 @@ 23810 or redo. 23811 {not in Vi} 23812 23813 -This is most useful when you need to prompt the user halfway a change. For 23814 -example in a function that calls |getchar()|. Do make sure that there was a 23815 -related change before this that you must join with. 23816 +This is most useful when you need to prompt the user halfway through a change. 23817 +For example in a function that calls |getchar()|. Do make sure that there was 23818 +a related change before this that you must join with. 23819 23820 This doesn't work by itself, because the next key press will start a new 23821 change again. But you can do something like this: > 23139 23822 @@ -249,8 +249,9 @@ 23140 23823 detect if an undo file is no longer synchronized with the file it was written … … 23149 23832 Undo files are normally saved in the same directory as the file. This can be 23150 23833 changed with the 'undodir' option. 23834 diff -Naur vim74.orig/runtime/doc/usr_08.txt vim74/runtime/doc/usr_08.txt 23835 --- vim74.orig/runtime/doc/usr_08.txt 2013-08-10 11:25:03.000000000 +0000 23836 +++ vim74/runtime/doc/usr_08.txt 2014-07-21 23:33:15.696863068 +0000 23837 @@ -1,4 +1,4 @@ 23838 -*usr_08.txt* For Vim version 7.4. Last change: 2006 Jul 18 23839 +*usr_08.txt* For Vim version 7.4. Last change: 2014 Jul 06 23840 23841 VIM USER MANUAL - by Bram Moolenaar 23842 23843 @@ -532,7 +532,7 @@ 23844 23845 You now have two tab pages. The first one has a window for "thisfile" and the 23846 second one a window for "thatfile". It's like two pages that are on top of 23847 -eachother, with a tab sticking out of each page showing the file name. 23848 +each other, with a tab sticking out of each page showing the file name. 23849 23850 Now use the mouse to click on "thisfile" in the top line. The result is 23851 23151 23852 diff -Naur vim74.orig/runtime/doc/usr_25.txt vim74/runtime/doc/usr_25.txt 23152 23853 --- vim74.orig/runtime/doc/usr_25.txt 2013-08-10 11:25:05.000000000 +0000 23153 +++ vim74/runtime/doc/usr_25.txt 2014-0 6-01 00:42:52.944200942+000023854 +++ vim74/runtime/doc/usr_25.txt 2014-07-21 23:33:15.816862755 +0000 23154 23855 @@ -86,7 +86,7 @@ 23155 23856 … … 23163 23864 diff -Naur vim74.orig/runtime/doc/usr_30.txt vim74/runtime/doc/usr_30.txt 23164 23865 --- vim74.orig/runtime/doc/usr_30.txt 2013-08-10 11:25:05.000000000 +0000 23165 +++ vim74/runtime/doc/usr_30.txt 2014-0 6-01 00:42:53.064200637+000023866 +++ vim74/runtime/doc/usr_30.txt 2014-07-21 23:33:15.870195949 +0000 23166 23867 @@ -128,7 +128,7 @@ 23167 23868 You can include special Vim keywords in the command specification. The % … … 23184 23885 diff -Naur vim74.orig/runtime/doc/usr_40.txt vim74/runtime/doc/usr_40.txt 23185 23886 --- vim74.orig/runtime/doc/usr_40.txt 2013-08-10 11:25:05.000000000 +0000 23186 +++ vim74/runtime/doc/usr_40.txt 2014-0 6-01 00:42:53.100867210+000023887 +++ vim74/runtime/doc/usr_40.txt 2014-07-21 23:33:15.920195819 +0000 23187 23888 @@ -209,7 +209,7 @@ 23188 23889 separates the two commands. This also means that a | character can't be used … … 23196 23897 diff -Naur vim74.orig/runtime/doc/usr_41.txt vim74/runtime/doc/usr_41.txt 23197 23898 --- vim74.orig/runtime/doc/usr_41.txt 2013-08-10 11:25:05.000000000 +0000 23198 +++ vim74/runtime/doc/usr_41.txt 2014-0 6-01 00:42:53.110867184+000023899 +++ vim74/runtime/doc/usr_41.txt 2014-07-21 23:33:15.946862416 +0000 23199 23900 @@ -1,4 +1,4 @@ 23200 23901 -*usr_41.txt* For Vim version 7.4. Last change: 2013 Feb 20 23201 +*usr_41.txt* For Vim version 7.4. Last change: 2014 Apr 0523902 +*usr_41.txt* For Vim version 7.4. Last change: 2014 May 28 23202 23903 23203 23904 VIM USER MANUAL - by Bram Moolenaar … … 23248 23949 Variables: *var-functions* 23249 23950 type() type of a variable 23250 @@ -697,11 +706,1 5@@23951 @@ -697,11 +706,16 @@ 23251 23952 wincol() window column number of the cursor 23252 23953 winline() window line number of the cursor … … 23254 23955 + screencol() get screen column of the cursor 23255 23956 + screenrow() get screen row of the cursor 23957 + getcurpos() get position of the cursor 23256 23958 getpos() get position of cursor, mark, etc. 23257 23959 setpos() set position of cursor, mark, etc. … … 23264 23966 Working with text in the current buffer: *text-functions* 23265 23967 getline() get a line or list of lines from the buffer 23266 @@ -729,6 +74 2,7 @@23968 @@ -729,6 +743,7 @@ 23267 23969 pathshorten() shorten directory names in a path 23268 23970 simplify() simplify a path without changing its meaning … … 23272 23974 filewritable() check if a file can be written to 23273 23975 getfperm() get the permissions of a file 23274 @@ -741,7 +75 5,8 @@23976 @@ -741,7 +756,8 @@ 23275 23977 mkdir() create a new directory 23276 23978 delete() delete a file … … 23282 23984 readfile() read a file into a List of lines 23283 23985 writefile() write a List of lines into a file 23284 @@ -757,6 +77 2,7 @@23986 @@ -757,6 +773,7 @@ 23285 23987 Buffers, windows and the argument list: 23286 23988 argc() number of entries in the argument list … … 23290 23992 bufexists() check if a buffer exists 23291 23993 buflisted() check if a buffer exists and is listed 23292 @@ -883,14 +899,22 @@ 23994 @@ -810,6 +827,7 @@ 23995 synconcealed() get info about concealing 23996 diff_hlID() get highlight ID for diff mode at a position 23997 matchadd() define a pattern to highlight (a "match") 23998 + matchaddpos() define a list of positions to highlight 23999 matcharg() get info about |:match| arguments 24000 matchdelete() delete a match defined by |matchadd()| or a 24001 |:match| command 24002 @@ -883,14 +901,22 @@ 23293 24003 libcall() call a function in an external library 23294 24004 libcallnr() idem, returning a number … … 23315 24025 diff -Naur vim74.orig/runtime/doc/usr_42.txt vim74/runtime/doc/usr_42.txt 23316 24026 --- vim74.orig/runtime/doc/usr_42.txt 2013-08-10 11:25:05.000000000 +0000 23317 +++ vim74/runtime/doc/usr_42.txt 2014-0 6-01 00:42:53.120867159+000024027 +++ vim74/runtime/doc/usr_42.txt 2014-07-21 23:33:15.973529013 +0000 23318 24028 @@ -311,7 +311,7 @@ 23319 24029 item with a bitmap. For example, define a new toolbar item with: > … … 23327 24037 diff -Naur vim74.orig/runtime/doc/usr_45.txt vim74/runtime/doc/usr_45.txt 23328 24038 --- vim74.orig/runtime/doc/usr_45.txt 2013-08-10 11:25:06.000000000 +0000 23329 +++ vim74/runtime/doc/usr_45.txt 2014-0 6-01 00:42:53.167533707+000024039 +++ vim74/runtime/doc/usr_45.txt 2014-07-21 23:33:16.006862259 +0000 23330 24040 @@ -328,8 +328,8 @@ 23331 24041 *45.5* Entering language text … … 23341 24051 diff -Naur vim74.orig/runtime/doc/various.txt vim74/runtime/doc/various.txt 23342 24052 --- vim74.orig/runtime/doc/various.txt 2013-08-10 11:25:06.000000000 +0000 23343 +++ vim74/runtime/doc/various.txt 2014-0 6-01 00:42:53.190866981 +000024053 +++ vim74/runtime/doc/various.txt 2014-07-21 23:33:16.030195531 +0000 23344 24054 @@ -1,4 +1,4 @@ 23345 24055 -*various.txt* For Vim version 7.4. Last change: 2013 May 18 … … 23427 24137 diff -Naur vim74.orig/runtime/doc/version5.txt vim74/runtime/doc/version5.txt 23428 24138 --- vim74.orig/runtime/doc/version5.txt 2013-08-10 11:25:07.000000000 +0000 23429 +++ vim74/runtime/doc/version5.txt 2014-0 6-01 00:42:53.237533529+000024139 +++ vim74/runtime/doc/version5.txt 2014-07-21 23:33:16.090195375 +0000 23430 24140 @@ -2020,7 +2020,7 @@ 23431 24141 … … 23439 24149 diff -Naur vim74.orig/runtime/doc/version7.txt vim74/runtime/doc/version7.txt 23440 24150 --- vim74.orig/runtime/doc/version7.txt 2013-08-10 12:23:06.000000000 +0000 23441 +++ vim74/runtime/doc/version7.txt 2014-0 6-01 00:42:53.430866370+000024151 +++ vim74/runtime/doc/version7.txt 2014-07-21 23:33:16.276861554 +0000 23442 24152 @@ -1,4 +1,4 @@ 23443 24153 -*version7.txt* For Vim version 7.4. Last change: 2013 Aug 10 … … 23483 24193 diff -Naur vim74.orig/runtime/doc/vi_diff.txt vim74/runtime/doc/vi_diff.txt 23484 24194 --- vim74.orig/runtime/doc/vi_diff.txt 2013-08-10 11:25:07.000000000 +0000 23485 +++ vim74/runtime/doc/vi_diff.txt 2014-0 6-01 00:42:53.477532917+000024195 +++ vim74/runtime/doc/vi_diff.txt 2014-07-21 23:33:16.303528151 +0000 23486 24196 @@ -1,4 +1,4 @@ 23487 24197 -*vi_diff.txt* For Vim version 7.4. Last change: 2012 Aug 08 … … 23510 24220 diff -Naur vim74.orig/runtime/doc/visual.txt vim74/runtime/doc/visual.txt 23511 24221 --- vim74.orig/runtime/doc/visual.txt 2013-08-10 11:25:08.000000000 +0000 23512 +++ vim74/runtime/doc/visual.txt 2014-0 6-01 00:42:53.920865122+000024222 +++ vim74/runtime/doc/visual.txt 2014-07-21 23:33:16.740193679 +0000 23513 24223 @@ -1,4 +1,4 @@ 23514 24224 -*visual.txt* For Vim version 7.4. Last change: 2012 Aug 15 … … 23541 24251 diff -Naur vim74.orig/runtime/doc/windows.txt vim74/runtime/doc/windows.txt 23542 24252 --- vim74.orig/runtime/doc/windows.txt 2013-08-10 11:25:08.000000000 +0000 23543 +++ vim74/runtime/doc/windows.txt 2014-0 6-01 00:42:53.937531746+000024253 +++ vim74/runtime/doc/windows.txt 2014-07-21 23:33:16.756860302 +0000 23544 24254 @@ -1,4 +1,4 @@ 23545 24255 -*windows.txt* For Vim version 7.4. Last change: 2012 Nov 15 … … 23577 24287 diff -Naur vim74.orig/runtime/filetype.vim vim74/runtime/filetype.vim 23578 24288 --- vim74.orig/runtime/filetype.vim 2013-08-03 15:50:05.000000000 +0000 23579 +++ vim74/runtime/filetype.vim 2014-0 6-01 00:42:54.130864587+000024289 +++ vim74/runtime/filetype.vim 2014-07-21 23:33:16.946859806 +0000 23580 24290 @@ -1,7 +1,7 @@ 23581 24291 " Vim support file to detect file types … … 23583 24293 " Maintainer: Bram Moolenaar <Bram@vim.org> 23584 24294 -" Last Change: 2013 Aug 03 23585 +" Last Change: 2014 Feb 2624295 +" Last Change: 2014 Jul 16 23586 24296 23587 24297 " Listen very carefully, I will say this only once … … 23664 24374 23665 24375 " ERicsson LANGuage; Yaws is erlang too 24376 @@ -843,7 +864,7 @@ 24377 setf xhtml 24378 return 24379 endif 24380 - if getline(n) =~ '{%\s*\(extends\|block\)\>' 24381 + if getline(n) =~ '{%\s*\(extends\|block\|load\)\>' 24382 setf htmldjango 24383 return 24384 endif 23666 24385 @@ -952,6 +973,9 @@ 23667 24386 " Inno Setup … … 23674 24393 au BufNewFile,BufRead *.jal,*.JAL setf jal 23675 24394 23676 @@ -1014,7 +1038,7 @@ 24395 @@ -965,7 +989,7 @@ 24396 au BufNewFile,BufRead *.jj,*.jjt setf javacc 24397 24398 " JavaScript, ECMAScript 24399 -au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.json setf javascript 24400 +au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript 24401 24402 " Java Server Pages 24403 au BufNewFile,BufRead *.jsp setf jsp 24404 @@ -983,12 +1007,18 @@ 24405 " Jovial 24406 au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial 24407 24408 +" JSON 24409 +au BufNewFile,BufRead *.json setf json 24410 + 24411 " Kixtart 24412 au BufNewFile,BufRead *.kix setf kix 24413 24414 " Kimwitu[++] 24415 au BufNewFile,BufRead *.k setf kwt 24416 24417 +" Kivy 24418 +au BufNewFile,BufRead *.kv setf kivy 24419 + 24420 " KDE script 24421 au BufNewFile,BufRead *.ks setf kscript 24422 24423 @@ -1014,7 +1044,7 @@ 23677 24424 au BufNewFile,BufRead *.ld setf ld 23678 24425 … … 23683 24430 " Libao 23684 24431 au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao 23685 @@ -1169,6 +119 3,9 @@24432 @@ -1169,6 +1199,9 @@ 23686 24433 " MGL 23687 24434 au BufNewFile,BufRead *.mgl setf mgl … … 23693 24440 au BufNewFile,BufRead *.mms call s:FTmms() 23694 24441 23695 @@ -2058,14 +2085,15 @@ 24442 @@ -1619,6 +1652,20 @@ 24443 au BufNewFile,BufRead *.rnw,*.snw setf rnoweb 24444 endif 24445 24446 +" R Markdown file 24447 +if has("fname_case") 24448 + au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd 24449 +else 24450 + au BufNewFile,BufRead *.rmd,*.smd setf rmd 24451 +endif 24452 + 24453 +" R reStructuredText file 24454 +if has("fname_case") 24455 + au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst 24456 +else 24457 + au BufNewFile,BufRead *.rrst,*.srst setf rrst 24458 +endif 24459 + 24460 " Rexx, Rebol or R 24461 au BufNewFile,BufRead *.r,*.R call s:FTr() 24462 24463 @@ -2058,14 +2105,15 @@ 23696 24464 " SVG (Scalable Vector Graphics) 23697 24465 au BufNewFile,BufRead *.svg setf svg … … 23712 24480 return 1 23713 24481 endif 23714 @@ -2092,7 +21 20,7 @@24482 @@ -2092,7 +2140,7 @@ 23715 24483 23716 24484 " Task … … 23721 24489 " Tcl (JACL too) 23722 24490 au BufNewFile,BufRead *.tcl,*.tk,*.itcl,*.itk,*.jacl setf tcl 23723 @@ -2217,12 +22 45,12 @@24491 @@ -2217,12 +2265,12 @@ 23724 24492 au BufNewFile,BufRead */etc/updatedb.conf setf updatedb 23725 24493 … … 23738 24506 " Vera 23739 24507 au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera 23740 @@ -2233,6 +22 61,9 @@24508 @@ -2233,6 +2281,9 @@ 23741 24509 " Verilog-AMS HDL 23742 24510 au BufNewFile,BufRead *.va,*.vams setf verilogams … … 23748 24516 au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl 23749 24517 au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl') 23750 @@ -2405,7 +24 36,7 @@24518 @@ -2405,7 +2456,7 @@ 23751 24519 au BufNewFile,BufRead *.xsl,*.xslt setf xslt 23752 24520 … … 23757 24525 " Yacc or racc 23758 24526 au BufNewFile,BufRead *.y call s:FTy() 24527 @@ -2630,7 +2681,7 @@ 24528 24529 " Plain text files, needs to be far down to not override others. This avoids 24530 " the "conf" type being used if there is a line starting with '#'. 24531 -au BufNewFile,BufRead *.txt,*.text setf text 24532 +au BufNewFile,BufRead *.txt,*.text,README setf text 24533 24534 24535 " Use the filetype detect plugins. They may overrule any of the previously 23759 24536 diff -Naur vim74.orig/runtime/ftplugin/changelog.vim vim74/runtime/ftplugin/changelog.vim 23760 24537 --- vim74.orig/runtime/ftplugin/changelog.vim 2012-08-23 20:47:22.000000000 +0000 23761 +++ vim74/runtime/ftplugin/changelog.vim 2014-0 6-01 00:42:54.380863951+000024538 +++ vim74/runtime/ftplugin/changelog.vim 2014-07-21 23:33:17.186859180 +0000 23762 24539 @@ -1,7 +1,7 @@ 23763 24540 " Vim filetype plugin file … … 23874 24651 diff -Naur vim74.orig/runtime/ftplugin/clojure.vim vim74/runtime/ftplugin/clojure.vim 23875 24652 --- vim74.orig/runtime/ftplugin/clojure.vim 2013-02-06 14:35:23.000000000 +0000 23876 +++ vim74/runtime/ftplugin/clojure.vim 2014-0 6-01 00:42:54.384197276+000024653 +++ vim74/runtime/ftplugin/clojure.vim 2014-07-21 23:33:17.193525829 +0000 23877 24654 @@ -1,44 +1,60 @@ 23878 24655 " Vim filetype plugin file … … 24006 24783 diff -Naur vim74.orig/runtime/ftplugin/cobol.vim vim74/runtime/ftplugin/cobol.vim 24007 24784 --- vim74.orig/runtime/ftplugin/cobol.vim 2010-05-15 11:04:03.000000000 +0000 24008 +++ vim74/runtime/ftplugin/cobol.vim 2014-0 6-01 00:42:54.400863900+000024785 +++ vim74/runtime/ftplugin/cobol.vim 2014-07-21 23:33:17.206859127 +0000 24009 24786 @@ -1,7 +1,7 @@ 24010 24787 " Vim filetype plugin file … … 24055 24832 diff -Naur vim74.orig/runtime/ftplugin/debchangelog.vim vim74/runtime/ftplugin/debchangelog.vim 24056 24833 --- vim74.orig/runtime/ftplugin/debchangelog.vim 2012-02-04 19:59:23.000000000 +0000 24057 +++ vim74/runtime/ftplugin/debchangelog.vim 2014-0 6-01 00:42:54.534196894+000024834 +++ vim74/runtime/ftplugin/debchangelog.vim 2014-07-21 23:33:17.316858840 +0000 24058 24835 @@ -3,7 +3,7 @@ 24059 24836 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> … … 24076 24853 diff -Naur vim74.orig/runtime/ftplugin/fortran.vim vim74/runtime/ftplugin/fortran.vim 24077 24854 --- vim74.orig/runtime/ftplugin/fortran.vim 2012-04-18 07:32:40.000000000 +0000 24078 +++ vim74/runtime/ftplugin/fortran.vim 2014-0 6-01 00:42:54.750863009+000024855 +++ vim74/runtime/ftplugin/fortran.vim 2014-07-21 23:33:17.536858266 +0000 24079 24856 @@ -1,12 +1,12 @@ 24080 24857 " Vim settings file … … 24126 24903 24127 24904 let &cpoptions=s:cposet 24905 diff -Naur vim74.orig/runtime/ftplugin/html.vim vim74/runtime/ftplugin/html.vim 24906 --- vim74.orig/runtime/ftplugin/html.vim 2012-03-11 13:50:46.000000000 +0000 24907 +++ vim74/runtime/ftplugin/html.vim 2014-07-21 23:33:17.760191017 +0000 24908 @@ -20,49 +20,9 @@ 24909 setlocal formatoptions-=t formatoptions+=croql 24910 endif 24911 24912 - 24913 if exists('&omnifunc') 24914 - " Distinguish between HTML versions 24915 - " To use with other HTML versions add another 24916 - " elseif condition to match proper DOCTYPE 24917 - setlocal omnifunc=htmlcomplete#CompleteTags 24918 - 24919 - if &filetype == 'xhtml' 24920 - let b:html_omni_flavor = 'xhtml10s' 24921 - else 24922 - let b:html_omni_flavor = 'html401t' 24923 - endif 24924 - let i = 1 24925 - let line = "" 24926 - while i < 10 && i < line("$") 24927 - let line = getline(i) 24928 - if line =~ '<!DOCTYPE.*\<DTD ' 24929 - break 24930 - endif 24931 - let i += 1 24932 - endwhile 24933 - if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above 24934 - if line =~ ' HTML 3\.2' 24935 - let b:html_omni_flavor = 'html32' 24936 - elseif line =~ ' XHTML 1\.1' 24937 - let b:html_omni_flavor = 'xhtml11' 24938 - else " two-step detection with strict/frameset/transitional 24939 - if line =~ ' XHTML 1\.0' 24940 - let b:html_omni_flavor = 'xhtml10' 24941 - elseif line =~ ' HTML 4\.01' 24942 - let b:html_omni_flavor = 'html401' 24943 - elseif line =~ ' HTML 4.0\>' 24944 - let b:html_omni_flavor = 'html40' 24945 - endif 24946 - if line =~ '\<Transitional\>' 24947 - let b:html_omni_flavor .= 't' 24948 - elseif line =~ '\<Frameset\>' 24949 - let b:html_omni_flavor .= 'f' 24950 - else 24951 - let b:html_omni_flavor .= 's' 24952 - endif 24953 - endif 24954 - endif 24955 + setlocal omnifunc=htmlcomplete#CompleteTags 24956 + call htmlcomplete#DetectOmniFlavor() 24957 endif 24958 24959 " HTML: thanks to Johannes Zellner and Benji Fisher. 24128 24960 diff -Naur vim74.orig/runtime/ftplugin/j.vim vim74/runtime/ftplugin/j.vim 24129 24961 --- vim74.orig/runtime/ftplugin/j.vim 1970-01-01 00:00:00.000000000 +0000 24130 +++ vim74/runtime/ftplugin/j.vim 2014-0 6-01 00:42:55.014195672+000024962 +++ vim74/runtime/ftplugin/j.vim 2014-07-21 23:33:17.823524185 +0000 24131 24963 @@ -0,0 +1,75 @@ 24132 24964 +" Vim filetype plugin … … 24207 25039 diff -Naur vim74.orig/runtime/ftplugin/jproperties.vim vim74/runtime/ftplugin/jproperties.vim 24208 25040 --- vim74.orig/runtime/ftplugin/jproperties.vim 1970-01-01 00:00:00.000000000 +0000 24209 +++ vim74/runtime/ftplugin/jproperties.vim 2014-0 6-01 00:42:55.057528895+000025041 +++ vim74/runtime/ftplugin/jproperties.vim 2014-07-21 23:33:17.863524080 +0000 24210 25042 @@ -0,0 +1,15 @@ 24211 25043 +" Vim filetype plugin … … 24224 25056 + 24225 25057 +let b:undo_ftplugin = "setl cms< com< fo<" 25058 diff -Naur vim74.orig/runtime/ftplugin/json.vim vim74/runtime/ftplugin/json.vim 25059 --- vim74.orig/runtime/ftplugin/json.vim 1970-01-01 00:00:00.000000000 +0000 25060 +++ vim74/runtime/ftplugin/json.vim 2014-07-21 23:33:17.896857327 +0000 25061 @@ -0,0 +1,17 @@ 25062 +" Vim filetype plugin 25063 +" Language: JSON 25064 +" Maintainer: David Barnett <daviebdawg+vim@gmail.com> 25065 +" Last Change: 2014 Jul 16 25066 + 25067 +if exists('b:did_ftplugin') 25068 + finish 25069 +endif 25070 +let b:did_ftplugin = 1 25071 + 25072 +let b:undo_ftplugin = 'setlocal formatoptions< comments< commentstring<' 25073 + 25074 +setlocal formatoptions-=t 25075 + 25076 +" JSON has no comments. 25077 +setlocal comments= 25078 +setlocal commentstring= 24226 25079 diff -Naur vim74.orig/runtime/ftplugin/lisp.vim vim74/runtime/ftplugin/lisp.vim 24227 25080 --- vim74.orig/runtime/ftplugin/lisp.vim 2013-02-13 11:35:55.000000000 +0000 24228 +++ vim74/runtime/ftplugin/lisp.vim 2014-0 6-01 00:42:55.154195315+000025081 +++ vim74/runtime/ftplugin/lisp.vim 2014-07-21 23:33:18.006857040 +0000 24229 25082 @@ -4,7 +4,7 @@ 24230 25083 " URL: http://sites.google.com/site/khorser/opensource/vim … … 24248 25101 diff -Naur vim74.orig/runtime/ftplugin/python.vim vim74/runtime/ftplugin/python.vim 24249 25102 --- vim74.orig/runtime/ftplugin/python.vim 2012-04-30 11:49:26.000000000 +0000 24250 +++ vim74/runtime/ftplugin/python.vim 2014-0 6-01 00:42:55.670860666+000025103 +++ vim74/runtime/ftplugin/python.vim 2014-07-21 23:33:18.453522541 +0000 24251 25104 @@ -1,7 +1,8 @@ 24252 25105 " Vim filetype plugin file … … 24329 25182 let &cpo = s:keepcpo 24330 25183 unlet s:keepcpo 25184 diff -Naur vim74.orig/runtime/ftplugin/r.vim vim74/runtime/ftplugin/r.vim 25185 --- vim74.orig/runtime/ftplugin/r.vim 1970-01-01 00:00:00.000000000 +0000 25186 +++ vim74/runtime/ftplugin/r.vim 2014-07-21 23:33:18.483522462 +0000 25187 @@ -0,0 +1,31 @@ 25188 +" Vim filetype plugin file 25189 +" Language: R 25190 +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> 25191 +" Last Change: Sun Feb 23, 2014 04:07PM 25192 + 25193 +" Only do this when not yet done for this buffer 25194 +if exists("b:did_ftplugin") 25195 + finish 25196 +endif 25197 + 25198 +" Don't load another plugin for this buffer 25199 +let b:did_ftplugin = 1 25200 + 25201 +let s:cpo_save = &cpo 25202 +set cpo&vim 25203 + 25204 +setlocal iskeyword=@,48-57,_,. 25205 +setlocal formatoptions-=t 25206 +setlocal commentstring=#\ %s 25207 +setlocal comments=:#',:###,:##,:# 25208 + 25209 +if has("gui_win32") && !exists("b:browsefilter") 25210 + let b:browsefilter = "R Source Files (*.R)\t*.R\n" . 25211 + \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . 25212 + \ "All Files (*.*)\t*.*\n" 25213 +endif 25214 + 25215 +let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter" 25216 + 25217 +let &cpo = s:cpo_save 25218 +unlet s:cpo_save 24331 25219 diff -Naur vim74.orig/runtime/ftplugin/registry.vim vim74/runtime/ftplugin/registry.vim 24332 25220 --- vim74.orig/runtime/ftplugin/registry.vim 1970-01-01 00:00:00.000000000 +0000 24333 +++ vim74/runtime/ftplugin/registry.vim 2014-0 6-01 00:42:55.717527214+000025221 +++ vim74/runtime/ftplugin/registry.vim 2014-07-21 23:33:18.523522358 +0000 24334 25222 @@ -0,0 +1,36 @@ 24335 25223 +" Vim filetype plugin file … … 24369 25257 +let &cpo = s:cpo_save 24370 25258 +unlet s:cpo_save 25259 diff -Naur vim74.orig/runtime/ftplugin/rhelp.vim vim74/runtime/ftplugin/rhelp.vim 25260 --- vim74.orig/runtime/ftplugin/rhelp.vim 1970-01-01 00:00:00.000000000 +0000 25261 +++ vim74/runtime/ftplugin/rhelp.vim 2014-07-21 23:33:18.536855656 +0000 25262 @@ -0,0 +1,29 @@ 25263 +" Vim filetype plugin file 25264 +" Language: R help file 25265 +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> 25266 +" Last Change: Wed Jul 09, 2014 06:23PM 25267 + 25268 +" Only do this when not yet done for this buffer 25269 +if exists("b:did_ftplugin") 25270 + finish 25271 +endif 25272 + 25273 +" Don't load another plugin for this buffer 25274 +let b:did_ftplugin = 1 25275 + 25276 +let s:cpo_save = &cpo 25277 +set cpo&vim 25278 + 25279 +setlocal iskeyword=@,48-57,_,. 25280 + 25281 +if has("gui_win32") && !exists("b:browsefilter") 25282 + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . 25283 + \ "All Files (*.*)\t*.*\n" 25284 +endif 25285 + 25286 +let b:undo_ftplugin = "setl isk< | unlet! b:browsefilter" 25287 + 25288 +let &cpo = s:cpo_save 25289 +unlet s:cpo_save 25290 + 25291 +" vim: sw=2 25292 diff -Naur vim74.orig/runtime/ftplugin/rmd.vim vim74/runtime/ftplugin/rmd.vim 25293 --- vim74.orig/runtime/ftplugin/rmd.vim 1970-01-01 00:00:00.000000000 +0000 25294 +++ vim74/runtime/ftplugin/rmd.vim 2014-07-21 23:33:18.563522253 +0000 25295 @@ -0,0 +1,43 @@ 25296 +" Vim filetype plugin file 25297 +" Language: R help file 25298 +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> 25299 +" Last Change: Wed Jul 09, 2014 06:23PM 25300 +" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann) 25301 + 25302 +" Only do this when not yet done for this buffer 25303 +if exists("b:did_ftplugin") 25304 + finish 25305 +endif 25306 + 25307 +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim 25308 + 25309 +setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s 25310 +setlocal formatoptions+=tcqln 25311 +setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+ 25312 +setlocal iskeyword=@,48-57,_,. 25313 + 25314 +let s:cpo_save = &cpo 25315 +set cpo&vim 25316 + 25317 +" Enables pandoc if it is installed 25318 +unlet! b:did_ftplugin 25319 +runtime ftplugin/pandoc.vim 25320 + 25321 +" Don't load another plugin for this buffer 25322 +let b:did_ftplugin = 1 25323 + 25324 +if has("gui_win32") && !exists("b:browsefilter") 25325 + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . 25326 + \ "All Files (*.*)\t*.*\n" 25327 +endif 25328 + 25329 +if exists('b:undo_ftplugin') 25330 + let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter" 25331 +else 25332 + let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter" 25333 +endif 25334 + 25335 +let &cpo = s:cpo_save 25336 +unlet s:cpo_save 25337 + 25338 +" vim: sw=2 25339 diff -Naur vim74.orig/runtime/ftplugin/rnoweb.vim vim74/runtime/ftplugin/rnoweb.vim 25340 --- vim74.orig/runtime/ftplugin/rnoweb.vim 1970-01-01 00:00:00.000000000 +0000 25341 +++ vim74/runtime/ftplugin/rnoweb.vim 2014-07-21 23:33:18.580188877 +0000 25342 @@ -0,0 +1,40 @@ 25343 +" Vim filetype plugin file 25344 +" Language: Rnoweb 25345 +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> 25346 +" Last Change: Wed Jul 09, 2014 06:23PM 25347 + 25348 +" Only do this when not yet done for this buffer 25349 +if exists("b:did_ftplugin") 25350 + finish 25351 +endif 25352 + 25353 +let s:cpo_save = &cpo 25354 +set cpo&vim 25355 + 25356 +runtime! ftplugin/tex.vim 25357 + 25358 +" Don't load another plugin for this buffer 25359 +let b:did_ftplugin = 1 25360 + 25361 +" Enables Vim-Latex-Suite, LaTeX-Box if installed 25362 +runtime ftplugin/tex_*.vim 25363 + 25364 +setlocal iskeyword=@,48-57,_,. 25365 +setlocal suffixesadd=.bib,.tex 25366 +setlocal comments=b:%,b:#,b:##,b:###,b:#' 25367 + 25368 +if has("gui_win32") && !exists("b:browsefilter") 25369 + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . 25370 + \ "All Files (*.*)\t*.*\n" 25371 +endif 25372 + 25373 +if exists('b:undo_ftplugin') 25374 + let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter" 25375 +else 25376 + let b:undo_ftplugin = "setl isk< sua< com< | unlet! b:browsefilter" 25377 +endif 25378 + 25379 +let &cpo = s:cpo_save 25380 +unlet s:cpo_save 25381 + 25382 +" vim: sw=2 25383 diff -Naur vim74.orig/runtime/ftplugin/rrst.vim vim74/runtime/ftplugin/rrst.vim 25384 --- vim74.orig/runtime/ftplugin/rrst.vim 1970-01-01 00:00:00.000000000 +0000 25385 +++ vim74/runtime/ftplugin/rrst.vim 2014-07-21 23:33:18.586855526 +0000 25386 @@ -0,0 +1,37 @@ 25387 +" Vim filetype plugin file 25388 +" Language: reStructuredText documentation format with R code 25389 +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> 25390 +" Last Change: Wed Jul 09, 2014 06:23PM 25391 +" Original work by Alex Zvoleff 25392 + 25393 +" Only do this when not yet done for this buffer 25394 +if exists("b:did_ftplugin") 25395 + finish 25396 +endif 25397 + 25398 +" Don't load another plugin for this buffer 25399 +let b:did_ftplugin = 1 25400 + 25401 +let s:cpo_save = &cpo 25402 +set cpo&vim 25403 + 25404 +setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s 25405 +setlocal formatoptions+=tcqln 25406 +setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+ 25407 +setlocal iskeyword=@,48-57,_,. 25408 + 25409 +if has("gui_win32") && !exists("b:browsefilter") 25410 + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . 25411 + \ "All Files (*.*)\t*.*\n" 25412 +endif 25413 + 25414 +if exists('b:undo_ftplugin') 25415 + let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter" 25416 +else 25417 + let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter" 25418 +endif 25419 + 25420 +let &cpo = s:cpo_save 25421 +unlet s:cpo_save 25422 + 25423 +" vim: sw=2 24371 25424 diff -Naur vim74.orig/runtime/ftplugin/scheme.vim vim74/runtime/ftplugin/scheme.vim 24372 25425 --- vim74.orig/runtime/ftplugin/scheme.vim 2013-02-13 11:35:55.000000000 +0000 24373 +++ vim74/runtime/ftplugin/scheme.vim 2014-0 6-01 00:42:55.780860386+000025426 +++ vim74/runtime/ftplugin/scheme.vim 2014-07-21 23:33:18.620188772 +0000 24374 25427 @@ -4,7 +4,7 @@ 24375 25428 " URL: http://sites.google.com/site/khorser/opensource/vim … … 24394 25447 diff -Naur vim74.orig/runtime/ftplugin/spec.vim vim74/runtime/ftplugin/spec.vim 24395 25448 --- vim74.orig/runtime/ftplugin/spec.vim 2012-03-07 12:16:03.000000000 +0000 24396 +++ vim74/runtime/ftplugin/spec.vim 2014-0 6-01 00:42:55.910860055+000025449 +++ vim74/runtime/ftplugin/spec.vim 2014-07-21 23:33:18.763521732 +0000 24397 25450 @@ -1,7 +1,8 @@ 24398 25451 " Plugin to update the %changelog section of RPM spec files … … 24419 25472 diff -Naur vim74.orig/runtime/ftplugin/systemverilog.vim vim74/runtime/ftplugin/systemverilog.vim 24420 25473 --- vim74.orig/runtime/ftplugin/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000 24421 +++ vim74/runtime/ftplugin/systemverilog.vim 2014-0 6-01 00:42:55.994193176+000025474 +++ vim74/runtime/ftplugin/systemverilog.vim 2014-07-21 23:33:18.843521523 +0000 24422 25475 @@ -0,0 +1,11 @@ 24423 25476 +" Vim filetype plugin file … … 24432 25485 +" Behaves just like Verilog 24433 25486 +runtime! ftplugin/verilog.vim 25487 diff -Naur vim74.orig/runtime/ftplugin/text.vim vim74/runtime/ftplugin/text.vim 25488 --- vim74.orig/runtime/ftplugin/text.vim 1970-01-01 00:00:00.000000000 +0000 25489 +++ vim74/runtime/ftplugin/text.vim 2014-07-21 23:33:18.910188015 +0000 25490 @@ -0,0 +1,17 @@ 25491 +" Vim filetype plugin 25492 +" Language: Text 25493 +" Maintainer: David Barnett <daviebdawg+vim@gmail.com> 25494 +" Last Change: 2014 Jul 09 25495 + 25496 +if exists('b:did_ftplugin') 25497 + finish 25498 +endif 25499 +let b:did_ftplugin = 1 25500 + 25501 +let b:undo_ftplugin = 'setlocal comments< commentstring<' 25502 + 25503 +" We intentionally don't set formatoptions-=t since text should wrap as text. 25504 + 25505 +" Pseudo comment leaders to indent bulleted lists. 25506 +setlocal comments=fb:-,fb:* 25507 +setlocal commentstring= 24434 25508 diff -Naur vim74.orig/runtime/indent/clojure.vim vim74/runtime/indent/clojure.vim 24435 25509 --- vim74.orig/runtime/indent/clojure.vim 2013-02-06 14:35:23.000000000 +0000 24436 +++ vim74/runtime/indent/clojure.vim 2014-0 6-01 00:42:56.610858273+000025510 +++ vim74/runtime/indent/clojure.vim 2014-07-21 23:33:19.486853177 +0000 24437 25511 @@ -1,23 +1,27 @@ 24438 25512 " Vim indent file … … 25125 26199 -" vim:sts=4 sw=4 et: 25126 26200 +" vim:sts=8:sw=8:ts=8:noet 26201 diff -Naur vim74.orig/runtime/indent/html.vim vim74/runtime/indent/html.vim 26202 --- vim74.orig/runtime/indent/html.vim 2013-06-13 17:50:24.000000000 +0000 26203 +++ vim74/runtime/indent/html.vim 2014-07-21 23:33:19.803519017 +0000 26204 @@ -1,505 +1,1003 @@ 26205 " Vim indent script for HTML 26206 -" General: "{{{ 26207 -" File: html.vim (Vimscript #2075) 26208 -" Author: Andy Wokula <anwoku@yahoo.de> 26209 -" Last Change: 2013 Jun 12 26210 -" Rev Days: 13 26211 -" Version: 0.9 26212 -" Vim Version: Vim7 26213 -" Description: 26214 -" Improved version of the distributed html indent script, faster on a 26215 -" range of lines. 26216 +" Header: "{{{ 26217 +" Maintainer: Bram Moolenaar 26218 +" Original Author: Andy Wokula <anwoku@yahoo.de> 26219 +" Last Change: 2014 Jul 04 26220 +" Version: 1.0 26221 +" Description: HTML indent script with cached state for faster indenting on a 26222 +" range of lines. 26223 +" Supports template systems through hooks. 26224 +" Supports Closure stylesheets. 26225 " 26226 " Credits: 26227 " indent/html.vim (2006 Jun 05) from J. Zellner 26228 " indent/css.vim (2006 Dec 20) from N. Weibull 26229 " 26230 " History: 26231 +" 2014 June (v1.0) overhaul (Bram) 26232 " 2012 Oct 21 (v0.9) added support for shiftwidth() 26233 " 2011 Sep 09 (v0.8) added HTML5 tags (thx to J. Zuckerman) 26234 " 2008 Apr 28 (v0.6) revised customization 26235 " 2008 Mar 09 (v0.5) fixed 'indk' issue (thx to C.J. Robinson) 26236 -" }}} 26237 +"}}} 26238 26239 -" Init Folklore, check user settings (2nd time ++) "{{{ 26240 -if exists("b:did_indent") 26241 - finish 26242 +" Init Folklore, check user settings (2nd time ++) 26243 +if exists("b:did_indent") "{{{ 26244 + finish 26245 endif 26246 let b:did_indent = 1 26247 26248 setlocal indentexpr=HtmlIndent() 26249 setlocal indentkeys=o,O,<Return>,<>>,{,},!^F 26250 26251 -let b:indent = {"lnum": -1} 26252 -let b:undo_indent = "set inde< indk<| unlet b:indent" 26253 +" "j1" is included to make cindent() work better with Javascript. 26254 +setlocal cino=j1 26255 +" "J1" should be included, but it doen't work properly before 7.4.355. 26256 +if has("patch-7.4.355") 26257 + setlocal cino+=J1 26258 +endif 26259 +" Before patch 7.4.355 indenting after "(function() {" does not work well, add 26260 +" )2 to limit paren search. 26261 +if !has("patch-7.4.355") 26262 + setlocal cino+=)2 26263 +endif 26264 + 26265 +" Needed for % to work when finding start/end of a tag. 26266 +setlocal matchpairs+=<:> 26267 26268 -" Load Once: 26269 -if exists("*HtmlIndent") 26270 - call HtmlIndent_CheckUserSettings() 26271 - finish 26272 +let b:undo_indent = "setlocal inde< indk< cino<" 26273 + 26274 +" b:hi_indent keeps state to speed up indenting consecutive lines. 26275 +let b:hi_indent = {"lnum": -1} 26276 + 26277 +"""""" Code below this is loaded only once. """"" 26278 +if exists("*HtmlIndent") && !exists('g:force_reload_html') 26279 + call HtmlIndent_CheckUserSettings() 26280 + finish 26281 endif 26282 26283 -" Patch 7.3.694 26284 +" shiftwidth() exists since patch 7.3.694 26285 if exists('*shiftwidth') 26286 - let s:ShiftWidth = function('shiftwidth') 26287 + let s:ShiftWidth = function('shiftwidth') 26288 else 26289 - func! s:ShiftWidth() 26290 - return &shiftwidth 26291 - endfunc 26292 + func! s:ShiftWidth() 26293 + return &shiftwidth 26294 + endfunc 26295 endif 26296 26297 +" Allow for line continuation below. 26298 let s:cpo_save = &cpo 26299 set cpo-=C 26300 "}}} 26301 26302 -func! HtmlIndent_CheckUserSettings() "{{{ 26303 - if exists("g:html_indent_inctags") 26304 - call s:AddITags(split(g:html_indent_inctags, ",")) 26305 - endif 26306 - if exists("g:html_indent_autotags") 26307 - call s:RemoveITags(split(g:html_indent_autotags, ",")) 26308 - endif 26309 +" Check and process settings from b:html_indent and g:html_indent... variables. 26310 +" Prefer using buffer-local settings over global settings, so that there can 26311 +" be defaults for all HTML files and exceptions for specific types of HTML 26312 +" files. 26313 +func! HtmlIndent_CheckUserSettings() 26314 + "{{{ 26315 + let inctags = '' 26316 + if exists("b:html_indent_inctags") 26317 + let inctags = b:html_indent_inctags 26318 + elseif exists("g:html_indent_inctags") 26319 + let inctags = g:html_indent_inctags 26320 + endif 26321 + let b:hi_tags = {} 26322 + if len(inctags) > 0 26323 + call s:AddITags(b:hi_tags, split(inctags, ",")) 26324 + endif 26325 + 26326 + let autotags = '' 26327 + if exists("b:html_indent_autotags") 26328 + let autotags = b:html_indent_autotags 26329 + elseif exists("g:html_indent_autotags") 26330 + let autotags = g:html_indent_autotags 26331 + endif 26332 + let b:hi_removed_tags = {} 26333 + if autotags 26334 + call s:RemoveITags(b:hi_removed_tags, split(autotags, ",")) 26335 + endif 26336 + 26337 + " Syntax names indicating being inside a string of an attribute value. 26338 + let string_names = [] 26339 + if exists("b:html_indent_string_names") 26340 + let string_names = b:html_indent_string_names 26341 + elseif exists("g:html_indent_string_names") 26342 + let string_names = g:html_indent_string_names 26343 + endif 26344 + let b:hi_insideStringNames = ['htmlString'] 26345 + if len(string_names) > 0 26346 + for s in string_names 26347 + call add(b:hi_insideStringNames, s) 26348 + endfor 26349 + endif 26350 26351 - let indone = {"zero": 0 26352 - \,"auto": "indent(prevnonblank(v:lnum-1))" 26353 - \,"inc": "b:indent.blocktagind + s:ShiftWidth()"} 26354 - if exists("g:html_indent_script1") 26355 - let s:js1indent = get(indone, g:html_indent_script1, indone.zero) 26356 - endif 26357 - if exists("g:html_indent_style1") 26358 - let s:css1indent = get(indone, g:html_indent_style1, indone.zero) 26359 + " Syntax names indicating being inside a tag. 26360 + let tag_names = [] 26361 + if exists("b:html_indent_tag_names") 26362 + let tag_names = b:html_indent_tag_names 26363 + elseif exists("g:html_indent_tag_names") 26364 + let tag_names = g:html_indent_tag_names 26365 + endif 26366 + let b:hi_insideTagNames = ['htmlTag', 'htmlScriptTag'] 26367 + if len(tag_names) > 0 26368 + for s in tag_names 26369 + call add(b:hi_insideTagNames, s) 26370 + endfor 26371 + endif 26372 + 26373 + let indone = {"zero": 0 26374 + \,"auto": "indent(prevnonblank(v:lnum-1))" 26375 + \,"inc": "b:hi_indent.blocktagind + s:ShiftWidth()"} 26376 + 26377 + let script1 = '' 26378 + if exists("b:html_indent_script1") 26379 + let script1 = b:html_indent_script1 26380 + elseif exists("g:html_indent_script1") 26381 + let script1 = g:html_indent_script1 26382 + endif 26383 + if len(script1) > 0 26384 + let b:hi_js1indent = get(indone, script1, indone.zero) 26385 + else 26386 + let b:hi_js1indent = 0 26387 + endif 26388 + 26389 + let style1 = '' 26390 + if exists("b:html_indent_style1") 26391 + let style1 = b:html_indent_style1 26392 + elseif exists("g:html_indent_style1") 26393 + let style1 = g:html_indent_style1 26394 + endif 26395 + if len(style1) > 0 26396 + let b:hi_css1indent = get(indone, style1, indone.zero) 26397 + else 26398 + let b:hi_css1indent = 0 26399 + endif 26400 + 26401 + if !exists('b:html_indent_line_limit') 26402 + if exists('g:html_indent_line_limit') 26403 + let b:html_indent_line_limit = g:html_indent_line_limit 26404 + else 26405 + let b:html_indent_line_limit = 200 26406 endif 26407 + endif 26408 endfunc "}}} 26409 26410 -" Init Script Vars "{{{ 26411 -let s:usestate = 1 26412 -let s:css1indent = 0 26413 -let s:js1indent = 0 26414 -" not to be changed: 26415 -let s:endtags = [0,0,0,0,0,0,0,0] " some places unused 26416 -let s:newstate = {} 26417 +" Init Script Vars 26418 +"{{{ 26419 +let b:hi_lasttick = 0 26420 +let b:hi_newstate = {} 26421 let s:countonly = 0 26422 "}}} 26423 -func! s:AddITags(taglist) "{{{ 26424 - for itag in a:taglist 26425 - let s:indent_tags[itag] = 1 26426 - let s:indent_tags['/'.itag] = -1 26427 - endfor 26428 -endfunc "}}} 26429 -func! s:AddBlockTag(tag, id, ...) "{{{ 26430 - if !(a:id >= 2 && a:id < 2+len(s:endtags)) 26431 - return 26432 - endif 26433 - let s:indent_tags[a:tag] = a:id 26434 - if a:0 == 0 26435 - let s:indent_tags['/'.a:tag] = -a:id 26436 - let s:endtags[a:id-2] = "</".a:tag.">" 26437 - else 26438 - let s:indent_tags[a:1] = -a:id 26439 - let s:endtags[a:id-2] = a:1 26440 - endif 26441 -endfunc "}}} 26442 -func! s:RemoveITags(taglist) "{{{ 26443 - " remove itags (protect blocktags from being removed) 26444 - for itag in a:taglist 26445 - if !has_key(s:indent_tags, itag) || s:indent_tags[itag] != 1 26446 - continue 26447 - endif 26448 - unlet s:indent_tags[itag] 26449 - if itag =~ '^\w\+$' 26450 - unlet s:indent_tags["/".itag] 26451 - endif 26452 - endfor 26453 -endfunc "}}} 26454 -" Add Indent Tags: {{{ 26455 -if !exists("s:indent_tags") 26456 - let s:indent_tags = {} 26457 -endif 26458 26459 -" old tags: 26460 -call s:AddITags(['a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', 26461 - \ 'blockquote', 'button', 'caption', 'center', 'cite', 'code', 'colgroup', 26462 - \ 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', 'form', 26463 - \ 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'i', 'iframe', 'ins', 'kbd', 26464 - \ 'label', 'legend', 'map', 'menu', 'noframes', 'noscript', 'object', 'ol', 26465 +" Fill the s:indent_tags dict with known tags. 26466 +" The key is "tagname" or "/tagname". {{{ 26467 +" The value is: 26468 +" 1 opening tag 26469 +" 2 "pre" 26470 +" 3 "script" 26471 +" 4 "style" 26472 +" 5 comment start 26473 +" -1 closing tag 26474 +" -2 "/pre" 26475 +" -3 "/script" 26476 +" -4 "/style" 26477 +" -5 comment end 26478 +let s:indent_tags = {} 26479 +let s:endtags = [0,0,0,0,0,0] " long enough for the highest index 26480 +"}}} 26481 + 26482 +" Add a list of tag names for a pair of <tag> </tag> to "tags". 26483 +func! s:AddITags(tags, taglist) 26484 + "{{{ 26485 + for itag in a:taglist 26486 + let a:tags[itag] = 1 26487 + let a:tags['/' . itag] = -1 26488 + endfor 26489 +endfunc "}}} 26490 + 26491 +" Take a list of tag name pairs that are not to be used as tag pairs. 26492 +func! s:RemoveITags(tags, taglist) 26493 + "{{{ 26494 + for itag in a:taglist 26495 + let a:tags[itag] = 1 26496 + let a:tags['/' . itag] = 1 26497 + endfor 26498 +endfunc "}}} 26499 + 26500 +" Add a block tag, that is a tag with a different kind of indenting. 26501 +func! s:AddBlockTag(tag, id, ...) 26502 + "{{{ 26503 + if !(a:id >= 2 && a:id < len(s:endtags)) 26504 + echoerr 'AddBlockTag ' . a:id 26505 + return 26506 + endif 26507 + let s:indent_tags[a:tag] = a:id 26508 + if a:0 == 0 26509 + let s:indent_tags['/' . a:tag] = -a:id 26510 + let s:endtags[a:id] = "</" . a:tag . ">" 26511 + else 26512 + let s:indent_tags[a:1] = -a:id 26513 + let s:endtags[a:id] = a:1 26514 + endif 26515 +endfunc "}}} 26516 + 26517 +" Add known tag pairs. 26518 +" Self-closing tags and tags that are sometimes {{{ 26519 +" self-closing (e.g., <p>) are not here (when encountering </p> we can find 26520 +" the matching <p>, but not the other way around). 26521 +" Old HTML tags: 26522 +call s:AddITags(s:indent_tags, [ 26523 + \ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', 26524 + \ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code', 26525 + \ 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font', 26526 + \ 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html', 26527 + \ 'i', 'iframe', 'ins', 'kbd', 'label', 'legend', 'li', 26528 + \ 'map', 'menu', 'noframes', 'noscript', 'object', 'ol', 26529 \ 'optgroup', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub', 26530 \ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td', 26531 - \ 'tr', 'tfoot', 'thead']) 26532 + \ 'tr', 'tbody', 'tfoot', 'thead']) 26533 26534 -" tags added 2011 Sep 09 (especially HTML5 tags): 26535 -call s:AddITags(['area', 'article', 'aside', 'audio', 'bdi', 'canvas', 26536 +" Tags added 2011 Sep 09 (especially HTML5 tags): 26537 +call s:AddITags(s:indent_tags, [ 26538 + \ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas', 26539 \ 'command', 'datalist', 'details', 'embed', 'figure', 'footer', 26540 \ 'header', 'group', 'keygen', 'mark', 'math', 'meter', 'nav', 'output', 26541 \ 'progress', 'ruby', 'section', 'svg', 'texture', 'time', 'video', 26542 \ 'wbr', 'text']) 26543 - 26544 "}}} 26545 -" Add Block Tags: contain alien content "{{{ 26546 + 26547 +" Add Block Tags: these contain alien content 26548 +"{{{ 26549 call s:AddBlockTag('pre', 2) 26550 call s:AddBlockTag('script', 3) 26551 call s:AddBlockTag('style', 4) 26552 call s:AddBlockTag('<!--', 5, '-->') 26553 "}}} 26554 26555 -func! s:CountITags(...) "{{{ 26556 - 26557 - " relative indent steps for current line [unit &sw]: 26558 - let s:curind = 0 26559 - " relative indent steps for next line [unit &sw]: 26560 - let s:nextrel = 0 26561 - 26562 - if a:0==0 26563 - let s:block = s:newstate.block 26564 - let tmpline = substitute(s:curline, '<\zs\/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') 26565 - if s:block == 3 26566 - let s:newstate.scripttype = s:GetScriptType(matchstr(tmpline, '\C.*<SCRIPT\>\zs[^>]*')) 26567 - endif 26568 - let s:newstate.block = s:block 26569 - else 26570 - let s:block = 0 " assume starting outside of a block 26571 - let s:countonly = 1 " don't change state 26572 - let tmpline = substitute(s:altline, '<\zs\/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') 26573 - let s:countonly = 0 26574 - endif 26575 -endfunc "}}} 26576 -func! s:CheckTag(itag) "{{{ 26577 - " "tag" or "/tag" or "<!--" or "-->" 26578 - let ind = get(s:indent_tags, a:itag) 26579 - if ind == -1 26580 - " closing tag 26581 - if s:block != 0 26582 - " ignore itag within a block 26583 - return "foo" 26584 - endif 26585 - if s:nextrel == 0 26586 - let s:curind -= 1 26587 - else 26588 - let s:nextrel -= 1 26589 - endif 26590 - " if s:curind >= 1 26591 - " let s:curind -= 1 26592 - " else 26593 - " let s:nextrel -= 1 26594 - " endif 26595 - elseif ind == 1 26596 - " opening tag 26597 - if s:block != 0 26598 - return "foo" 26599 - endif 26600 - let s:nextrel += 1 26601 - elseif ind != 0 26602 - " block-tag (opening or closing) 26603 - return s:Blocktag(a:itag, ind) 26604 - endif 26605 - " else ind==0 (other tag found): keep indent 26606 - return "foo" " no matter 26607 -endfunc "}}} 26608 -func! s:Blocktag(blocktag, ind) "{{{ 26609 - if a:ind > 0 26610 - " a block starts here 26611 - if s:block != 0 26612 - " already in a block (nesting) - ignore 26613 - " especially ignore comments after other blocktags 26614 - return "foo" 26615 - endif 26616 - let s:block = a:ind " block type 26617 - if s:countonly 26618 - return "foo" 26619 - endif 26620 - let s:newstate.blocklnr = v:lnum 26621 - " save allover indent for the endtag 26622 - let s:newstate.blocktagind = b:indent.baseindent + (s:nextrel + s:curind) * s:ShiftWidth() 26623 - if a:ind == 3 26624 - return "SCRIPT" " all except this must be lowercase 26625 - " line is to be checked again for the type attribute 26626 - endif 26627 - else 26628 - let s:block = 0 26629 - " we get here if starting and closing block-tag on same line 26630 +" Return non-zero when "tagname" is an opening tag, not being a block tag, for 26631 +" which there should be a closing tag. Can be used by scripts that include 26632 +" HTML indenting. 26633 +func! HtmlIndent_IsOpenTag(tagname) 26634 + "{{{ 26635 + if get(s:indent_tags, a:tagname) == 1 26636 + return 1 26637 + endif 26638 + return get(b:hi_tags, a:tagname) == 1 26639 +endfunc "}}} 26640 + 26641 +" Get the value for "tagname", taking care of buffer-local tags. 26642 +func! s:get_tag(tagname) 26643 + "{{{ 26644 + let i = get(s:indent_tags, a:tagname) 26645 + if (i == 1 || i == -1) && get(b:hi_removed_tags, a:tagname) != 0 26646 + return 0 26647 + endif 26648 + if i == 0 26649 + let i = get(b:hi_tags, a:tagname) 26650 + endif 26651 + return i 26652 +endfunc "}}} 26653 + 26654 +" Count the number of start and end tags in "text". 26655 +func! s:CountITags(text) 26656 + "{{{ 26657 + " Store the result in s:curind and s:nextrel. 26658 + let s:curind = 0 " relative indent steps for current line [unit &sw]: 26659 + let s:nextrel = 0 " relative indent steps for next line [unit &sw]: 26660 + let s:block = 0 " assume starting outside of a block 26661 + let s:countonly = 1 " don't change state 26662 + call substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') 26663 + let s:countonly = 0 26664 +endfunc "}}} 26665 + 26666 +" Count the number of start and end tags in text. 26667 +func! s:CountTagsAndState(text) 26668 + "{{{ 26669 + " Store the result in s:curind and s:nextrel. Update b:hi_newstate.block. 26670 + let s:curind = 0 " relative indent steps for current line [unit &sw]: 26671 + let s:nextrel = 0 " relative indent steps for next line [unit &sw]: 26672 + 26673 + let s:block = b:hi_newstate.block 26674 + let tmp = substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') 26675 + if s:block == 3 26676 + let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*')) 26677 + endif 26678 + let b:hi_newstate.block = s:block 26679 +endfunc "}}} 26680 + 26681 +" Used by s:CountITags() and s:CountTagsAndState(). 26682 +func! s:CheckTag(itag) 26683 + "{{{ 26684 + " Returns an empty string or "SCRIPT". 26685 + " a:itag can be "tag" or "/tag" or "<!--" or "-->" 26686 + let ind = s:get_tag(a:itag) 26687 + if ind == -1 26688 + " closing tag 26689 + if s:block != 0 26690 + " ignore itag within a block 26691 + return "" 26692 endif 26693 - return "foo" 26694 -endfunc "}}} 26695 -func! s:GetScriptType(str) "{{{ 26696 - if a:str == "" || a:str =~ "java" 26697 - return "javascript" 26698 + if s:nextrel == 0 26699 + let s:curind -= 1 26700 else 26701 - return "" 26702 + let s:nextrel -= 1 26703 endif 26704 -endfunc "}}} 26705 + elseif ind == 1 26706 + " opening tag 26707 + if s:block != 0 26708 + return "" 26709 + endif 26710 + let s:nextrel += 1 26711 + elseif ind != 0 26712 + " block-tag (opening or closing) 26713 + return s:CheckBlockTag(a:itag, ind) 26714 + " else ind==0 (other tag found): keep indent 26715 + endif 26716 + return "" 26717 +endfunc "}}} 26718 + 26719 +" Used by s:CheckTag(). Returns an empty string or "SCRIPT". 26720 +func! s:CheckBlockTag(blocktag, ind) 26721 + "{{{ 26722 + if a:ind > 0 26723 + " a block starts here 26724 + if s:block != 0 26725 + " already in a block (nesting) - ignore 26726 + " especially ignore comments after other blocktags 26727 + return "" 26728 + endif 26729 + let s:block = a:ind " block type 26730 + if s:countonly 26731 + return "" 26732 + endif 26733 + let b:hi_newstate.blocklnr = v:lnum 26734 + " save allover indent for the endtag 26735 + let b:hi_newstate.blocktagind = b:hi_indent.baseindent + (s:nextrel + s:curind) * s:ShiftWidth() 26736 + if a:ind == 3 26737 + return "SCRIPT" " all except this must be lowercase 26738 + " line is to be checked again for the type attribute 26739 + endif 26740 + else 26741 + let s:block = 0 26742 + " we get here if starting and closing a block-tag on the same line 26743 + endif 26744 + return "" 26745 +endfunc "}}} 26746 + 26747 +" Return the <script> type: either "javascript" or "" 26748 +func! s:GetScriptType(str) 26749 + "{{{ 26750 + if a:str == "" || a:str =~ "java" 26751 + return "javascript" 26752 + else 26753 + return "" 26754 + endif 26755 +endfunc "}}} 26756 + 26757 +" Look back in the file, starting at a:lnum - 1, to compute a state for the 26758 +" start of line a:lnum. Return the new state. 26759 +func! s:FreshState(lnum) 26760 + "{{{ 26761 + " A state is to know ALL relevant details about the 26762 + " lines 1..a:lnum-1, initial calculating (here!) can be slow, but updating is 26763 + " fast (incremental). 26764 + " TODO: this should be split up in detecting the block type and computing the 26765 + " indent for the block type, so that when we do not know the indent we do 26766 + " not need to clear the whole state and re-detect the block type again. 26767 + " State: 26768 + " lnum last indented line == prevnonblank(a:lnum - 1) 26769 + " block = 0 a:lnum located within special tag: 0:none, 2:<pre>, 26770 + " 3:<script>, 4:<style>, 5:<!-- 26771 + " baseindent use this indent for line a:lnum as a start - kind of 26772 + " autoindent (if block==0) 26773 + " scripttype = '' type attribute of a script tag (if block==3) 26774 + " blocktagind indent for current opening (get) and closing (set) 26775 + " blocktag (if block!=0) 26776 + " blocklnr lnum of starting blocktag (if block!=0) 26777 + " inattr line {lnum} starts with attributes of a tag 26778 + let state = {} 26779 + let state.lnum = prevnonblank(a:lnum - 1) 26780 + let state.scripttype = "" 26781 + let state.blocktagind = -1 26782 + let state.block = 0 26783 + let state.baseindent = 0 26784 + let state.blocklnr = 0 26785 + let state.inattr = 0 26786 + 26787 + if state.lnum == 0 26788 + return state 26789 + endif 26790 26791 -func! s:FreshState(lnum) "{{{ 26792 - " Look back in the file (lines 1 to a:lnum-1) to calc a state for line 26793 - " a:lnum. A state is to know ALL relevant details about the lines 26794 - " 1..a:lnum-1, initial calculating (here!) can be slow, but updating is 26795 - " fast (incremental). 26796 - " State: 26797 - " lnum last indented line == prevnonblank(a:lnum - 1) 26798 - " block = 0 a:lnum located within special tag: 0:none, 2:<pre>, 26799 - " 3:<script>, 4:<style>, 5:<!-- 26800 - " baseindent use this indent for line a:lnum as a start - kind of 26801 - " autoindent (if block==0) 26802 - " scripttype = '' type attribute of a script tag (if block==3) 26803 - " blocktagind indent for current opening (get) and closing (set) 26804 - " blocktag (if block!=0) 26805 - " blocklnr lnum of starting blocktag (if block!=0) 26806 - " inattr line {lnum} starts with attributes of a tag 26807 - let state = {} 26808 - let state.lnum = prevnonblank(a:lnum - 1) 26809 - let state.scripttype = "" 26810 - let state.blocktagind = -1 26811 - let state.block = 0 26812 - let state.baseindent = 0 26813 - let state.blocklnr = 0 26814 - let state.inattr = 0 26815 - 26816 - if state.lnum == 0 26817 - return state 26818 - endif 26819 - 26820 - " Heuristic: 26821 - " remember startline state.lnum 26822 - " look back for <pre, </pre, <script, </script, <style, </style tags 26823 - " remember stopline 26824 - " if opening tag found, 26825 - " assume a:lnum within block 26826 - " else 26827 - " look back in result range (stopline, startline) for comment 26828 - " \ delimiters (<!--, -->) 26829 - " if comment opener found, 26830 - " assume a:lnum within comment 26831 - " else 26832 - " assume usual html for a:lnum 26833 - " if a:lnum-1 has a closing comment 26834 - " look back to get indent of comment opener 26835 - " FI 26836 - 26837 - " look back for blocktag 26838 - call cursor(a:lnum, 1) 26839 - let [stopline, stopcol] = searchpos('\c<\zs\/\=\%(pre\>\|script\>\|style\>\)', "bW") 26840 + " Heuristic: 26841 + " remember startline state.lnum 26842 + " look back for <pre, </pre, <script, </script, <style, </style tags 26843 + " remember stopline 26844 + " if opening tag found, 26845 + " assume a:lnum within block 26846 + " else 26847 + " look back in result range (stopline, startline) for comment 26848 + " \ delimiters (<!--, -->) 26849 + " if comment opener found, 26850 + " assume a:lnum within comment 26851 + " else 26852 + " assume usual html for a:lnum 26853 + " if a:lnum-1 has a closing comment 26854 + " look back to get indent of comment opener 26855 + " FI 26856 + 26857 + " look back for a blocktag 26858 + call cursor(a:lnum, 1) 26859 + let [stopline, stopcol] = searchpos('\c<\zs\/\=\%(pre\>\|script\>\|style\>\)', "bW") 26860 + if stopline > 0 26861 " fugly ... why isn't there searchstr() 26862 let tagline = tolower(getline(stopline)) 26863 - let blocktag = matchstr(tagline, '\/\=\%(pre\>\|script\>\|style\>\)', stopcol-1) 26864 - if stopline > 0 && blocktag[0] != "/" 26865 - " opening tag found, assume a:lnum within block 26866 - let state.block = s:indent_tags[blocktag] 26867 - if state.block == 3 26868 - let state.scripttype = s:GetScriptType(matchstr(tagline, '\>[^>]*', stopcol)) 26869 - endif 26870 - let state.blocklnr = stopline 26871 - " check preceding tags in the line: 26872 - let s:altline = tagline[: stopcol-2] 26873 - call s:CountITags(1) 26874 - let state.blocktagind = indent(stopline) + (s:curind + s:nextrel) * s:ShiftWidth() 26875 - return state 26876 + let blocktag = matchstr(tagline, '\/\=\%(pre\>\|script\>\|style\>\)', stopcol - 1) 26877 + if blocktag[0] != "/" 26878 + " opening tag found, assume a:lnum within block 26879 + let state.block = s:indent_tags[blocktag] 26880 + if state.block == 3 26881 + let state.scripttype = s:GetScriptType(matchstr(tagline, '\>[^>]*', stopcol)) 26882 + endif 26883 + let state.blocklnr = stopline 26884 + " check preceding tags in the line: 26885 + call s:CountITags(tagline[: stopcol-2]) 26886 + let state.blocktagind = indent(stopline) + (s:curind + s:nextrel) * s:ShiftWidth() 26887 + return state 26888 elseif stopline == state.lnum 26889 - " handle special case: previous line (= state.lnum) contains a 26890 - " closing blocktag which is preceded by line-noise; 26891 - " blocktag == "/..." 26892 - let swendtag = match(tagline, '^\s*</') >= 0 26893 - if !swendtag 26894 - let [bline, bcol] = searchpos('<'.blocktag[1:].'\>', "bW") 26895 - let s:altline = tolower(getline(bline)[: bcol-2]) 26896 - call s:CountITags(1) 26897 - let state.baseindent = indent(bline) + (s:nextrel+s:curline) * s:ShiftWidth() 26898 - return state 26899 - endif 26900 - endif 26901 - 26902 - " else look back for comment 26903 - call cursor(a:lnum, 1) 26904 - let [comline, comcol, found] = searchpos('\(<!--\)\|-->', 'bpW', stopline) 26905 - if found == 2 26906 - " comment opener found, assume a:lnum within comment 26907 - let state.block = 5 26908 - let state.blocklnr = comline 26909 - " check preceding tags in the line: 26910 - let s:altline = tolower(getline(comline)[: comcol-2]) 26911 - call s:CountITags(1) 26912 - let state.blocktagind = indent(comline) + (s:curind + s:nextrel) * s:ShiftWidth() 26913 - return state 26914 - endif 26915 - 26916 - " else within usual html 26917 - let s:altline = tolower(getline(state.lnum)) 26918 - " check a:lnum-1 for closing comment (we need indent from the opening line) 26919 - let comcol = stridx(s:altline, '-->') 26920 - if comcol >= 0 26921 - call cursor(state.lnum, comcol+1) 26922 - let [comline, comcol] = searchpos('<!--', 'bW') 26923 - if comline == state.lnum 26924 - let s:altline = s:altline[: comcol-2] 26925 - else 26926 - let s:altline = tolower(getline(comline)[: comcol-2]) 26927 - endif 26928 - call s:CountITags(1) 26929 - let state.baseindent = indent(comline) + (s:nextrel+s:curline) * s:ShiftWidth() 26930 - return state 26931 - " TODO check tags that follow "-->" 26932 - endif 26933 - 26934 - " else no comments 26935 - call s:CountITags(1) 26936 - let state.baseindent = indent(state.lnum) + s:nextrel * s:ShiftWidth() 26937 - " line starts with end tag 26938 - let swendtag = match(s:altline, '^\s*</') >= 0 26939 - if !swendtag 26940 - let state.baseindent += s:curind * s:ShiftWidth() 26941 + " handle special case: previous line (= state.lnum) contains a 26942 + " closing blocktag which is preceded by line-noise; 26943 + " blocktag == "/..." 26944 + let swendtag = match(tagline, '^\s*</') >= 0 26945 + if !swendtag 26946 + let [bline, bcol] = searchpos('<'.blocktag[1:].'\>', "bW") 26947 + call s:CountITags(tolower(getline(bline)[: bcol-2])) 26948 + let state.baseindent = indent(bline) + (s:curind + s:nextrel) * s:ShiftWidth() 26949 + return state 26950 + endif 26951 + endif 26952 + endif 26953 + 26954 + " else look back for comment 26955 + call cursor(a:lnum, 1) 26956 + let [comlnum, comcol, found] = searchpos('\(<!--\)\|-->', 'bpW', stopline) 26957 + if found == 2 26958 + " comment opener found, assume a:lnum within comment 26959 + let state.block = 5 26960 + let state.blocklnr = comlnum 26961 + " check preceding tags in the line: 26962 + call s:CountITags(tolower(getline(comlnum)[: comcol-2])) 26963 + let state.blocktagind = indent(comlnum) + (s:curind + s:nextrel) * s:ShiftWidth() 26964 + return state 26965 + endif 26966 + 26967 + " else within usual HTML 26968 + let text = tolower(getline(state.lnum)) 26969 + 26970 + " Check a:lnum-1 for closing comment (we need indent from the opening line). 26971 + " Not when other tags follow (might be --> inside a string). 26972 + let comcol = stridx(text, '-->') 26973 + if comcol >= 0 && match(text, '[<>]', comcol) <= 0 26974 + call cursor(state.lnum, comcol + 1) 26975 + let [comlnum, comcol] = searchpos('<!--', 'bW') 26976 + if comlnum == state.lnum 26977 + let text = text[: comcol-2] 26978 + else 26979 + let text = tolower(getline(comlnum)[: comcol-2]) 26980 endif 26981 + call s:CountITags(text) 26982 + let state.baseindent = indent(comlnum) + (s:curind + s:nextrel) * s:ShiftWidth() 26983 + " TODO check tags that follow "-->" 26984 return state 26985 -endfunc "}}} 26986 + endif 26987 + 26988 + " Check if the previous line starts with end tag. 26989 + let swendtag = match(text, '^\s*</') >= 0 26990 26991 -func! s:Alien2() "{{{ 26992 - " <pre> block 26993 + " If previous line ended in a closing tag, line up with the opening tag. 26994 + if !swendtag && text =~ '</\w\+\s*>\s*$' 26995 + call cursor(state.lnum, 99999) 26996 + normal F< 26997 + let start_lnum = HtmlIndent_FindStartTag() 26998 + if start_lnum > 0 26999 + let state.baseindent = indent(start_lnum) 27000 + if col('.') > 2 27001 + " check for tags before the matching opening tag. 27002 + let text = getline(start_lnum) 27003 + let swendtag = match(text, '^\s*</') >= 0 27004 + call s:CountITags(text[: col('.') - 2]) 27005 + let state.baseindent += s:nextrel * s:ShiftWidth() 27006 + if !swendtag 27007 + let state.baseindent += s:curind * s:ShiftWidth() 27008 + endif 27009 + endif 27010 + return state 27011 + endif 27012 + endif 27013 + 27014 + " Else: no comments. Skip backwards to find the tag we're inside. 27015 + let [state.lnum, found] = HtmlIndent_FindTagStart(state.lnum) 27016 + " Check if that line starts with end tag. 27017 + let text = getline(state.lnum) 27018 + let swendtag = match(text, '^\s*</') >= 0 27019 + call s:CountITags(tolower(text)) 27020 + let state.baseindent = indent(state.lnum) + s:nextrel * s:ShiftWidth() 27021 + if !swendtag 27022 + let state.baseindent += s:curind * s:ShiftWidth() 27023 + endif 27024 + return state 27025 +endfunc "}}} 27026 + 27027 +" Indent inside a <pre> block: Keep indent as-is. 27028 +func! s:Alien2() 27029 + "{{{ 27030 + return -1 27031 +endfunc "}}} 27032 + 27033 +" Return the indent inside a <script> block for javascript. 27034 +func! s:Alien3() 27035 + "{{{ 27036 + let lnum = prevnonblank(v:lnum - 1) 27037 + while lnum > 1 && getline(lnum) =~ '^\s*/[/*]' 27038 + " Skip over comments to avoid that cindent() aligns with the <script> tag 27039 + let lnum = prevnonblank(lnum - 1) 27040 + endwhile 27041 + if lnum == b:hi_indent.blocklnr 27042 + " indent for the first line after <script> 27043 + return eval(b:hi_js1indent) 27044 + endif 27045 + if b:hi_indent.scripttype == "javascript" 27046 + return cindent(v:lnum) 27047 + else 27048 return -1 27049 + endif 27050 endfunc "}}} 27051 -func! s:Alien3() "{{{ 27052 - " <script> javascript 27053 - if prevnonblank(v:lnum-1) == b:indent.blocklnr 27054 - " indent for the first line after <script> 27055 - return eval(s:js1indent) 27056 - endif 27057 - if b:indent.scripttype == "javascript" 27058 - return cindent(v:lnum) 27059 + 27060 +" Return the indent inside a <style> block. 27061 +func! s:Alien4() 27062 + "{{{ 27063 + if prevnonblank(v:lnum-1) == b:hi_indent.blocklnr 27064 + " indent for first content line 27065 + return eval(b:hi_css1indent) 27066 + endif 27067 + return s:CSSIndent() 27068 +endfunc "}}} 27069 + 27070 +" Indending inside a <style> block. Returns the indent. 27071 +func! s:CSSIndent() 27072 + "{{{ 27073 + " This handles standard CSS and also Closure stylesheets where special lines 27074 + " start with @. 27075 + " When the line starts with '*' or the previous line starts with "/*" 27076 + " and does not end in "*/", use C indenting to format the comment. 27077 + " Adopted $VIMRUNTIME/indent/css.vim 27078 + let curtext = getline(v:lnum) 27079 + if curtext =~ '^\s*[*]' 27080 + \ || (v:lnum > 1 && getline(v:lnum - 1) =~ '\s*/\*' 27081 + \ && getline(v:lnum - 1) !~ '\*/\s*$') 27082 + return cindent(v:lnum) 27083 + endif 27084 + 27085 + let min_lnum = b:hi_indent.blocklnr 27086 + let prev_lnum = s:CssPrevNonComment(v:lnum - 1, min_lnum) 27087 + let [prev_lnum, found] = HtmlIndent_FindTagStart(prev_lnum) 27088 + if prev_lnum <= min_lnum 27089 + " Just below the <style> tag, indent for first content line after comments. 27090 + return eval(b:hi_css1indent) 27091 + endif 27092 + 27093 + " If the current line starts with "}" align with it's match. 27094 + if curtext =~ '^\s*}' 27095 + call cursor(v:lnum, 1) 27096 + try 27097 + normal! % 27098 + " Found the matching "{", align with it after skipping unfinished lines. 27099 + let align_lnum = s:CssFirstUnfinished(line('.'), min_lnum) 27100 + return indent(align_lnum) 27101 + catch 27102 + " can't find it, try something else, but it's most likely going to be 27103 + " wrong 27104 + endtry 27105 + endif 27106 + 27107 + " add indent after { 27108 + let brace_counts = HtmlIndent_CountBraces(prev_lnum) 27109 + let extra = brace_counts.c_open * s:ShiftWidth() 27110 + 27111 + let prev_text = getline(prev_lnum) 27112 + let below_end_brace = prev_text =~ '}\s*$' 27113 + 27114 + " Search back to align with the first line that's unfinished. 27115 + let align_lnum = s:CssFirstUnfinished(prev_lnum, min_lnum) 27116 + 27117 + " Handle continuation lines if aligning with previous line and not after a 27118 + " "}". 27119 + if extra == 0 && align_lnum == prev_lnum && !below_end_brace 27120 + let prev_hasfield = prev_text =~ '^\s*[a-zA-Z0-9-]\+:' 27121 + let prev_special = prev_text =~ '^\s*\(/\*\|@\)' 27122 + if curtext =~ '^\s*\(/\*\|@\)' 27123 + " if the current line is not a comment or starts with @ (used by template 27124 + " systems) reduce indent if previous line is a continuation line 27125 + if !prev_hasfield && !prev_special 27126 + let extra = -s:ShiftWidth() 27127 + endif 27128 else 27129 - return -1 27130 + let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:' 27131 + let prev_unfinished = s:CssUnfinished(prev_text) 27132 + if !cur_hasfield && (prev_hasfield || prev_unfinished) 27133 + " Continuation line has extra indent if the previous line was not a 27134 + " continuation line. 27135 + let extra = s:ShiftWidth() 27136 + " Align with @if 27137 + if prev_text =~ '^\s*@if ' 27138 + let extra = 4 27139 + endif 27140 + elseif cur_hasfield && !prev_hasfield && !prev_special 27141 + " less indent below a continuation line 27142 + let extra = -s:ShiftWidth() 27143 + endif 27144 + endif 27145 + endif 27146 + 27147 + if below_end_brace 27148 + " find matching {, if that line starts with @ it's not the start of a rule 27149 + " but something else from a template system 27150 + call cursor(prev_lnum, 1) 27151 + call search('}\s*$') 27152 + try 27153 + normal! % 27154 + " Found the matching "{", align with it. 27155 + let align_lnum = s:CssFirstUnfinished(line('.'), min_lnum) 27156 + let special = getline(align_lnum) =~ '^\s*@' 27157 + catch 27158 + let special = 0 27159 + endtry 27160 + if special 27161 + " do not reduce indent below @{ ... } 27162 + if extra < 0 27163 + let extra += s:ShiftWidth() 27164 + endif 27165 + else 27166 + let extra -= (brace_counts.c_close - (prev_text =~ '^\s*}')) * s:ShiftWidth() 27167 endif 27168 -endfunc "}}} 27169 -func! s:Alien4() "{{{ 27170 - " <style> 27171 - if prevnonblank(v:lnum-1) == b:indent.blocklnr 27172 - " indent for first content line 27173 - return eval(s:css1indent) 27174 - endif 27175 - return s:CSSIndent() 27176 -endfunc 27177 - 27178 -func! s:CSSIndent() "{{{ 27179 - " adopted $VIMRUNTIME/indent/css.vim 27180 - if getline(v:lnum) =~ '^\s*[*}]' 27181 - return cindent(v:lnum) 27182 - endif 27183 - let minline = b:indent.blocklnr 27184 - let pnum = s:css_prevnoncomment(v:lnum - 1, minline) 27185 - if pnum <= minline 27186 - " < is to catch errors 27187 - " indent for first content line after comments 27188 - return eval(s:css1indent) 27189 - endif 27190 - let ind = indent(pnum) + s:css_countbraces(pnum, 1) * s:ShiftWidth() 27191 - let pline = getline(pnum) 27192 - if pline =~ '}\s*$' 27193 - let ind -= (s:css_countbraces(pnum, 0) - (pline =~ '^\s*}')) * s:ShiftWidth() 27194 - endif 27195 - return ind 27196 -endfunc "}}} 27197 -func! s:css_prevnoncomment(lnum, stopline) "{{{ 27198 - " caller starts from a line a:lnum-1 that is not a comment 27199 - let lnum = prevnonblank(a:lnum) 27200 + endif 27201 + 27202 + " if no extra indent yet... 27203 + if extra == 0 27204 + if brace_counts.p_open > brace_counts.p_close 27205 + " previous line has more ( than ): add a shiftwidth 27206 + let extra = s:ShiftWidth() 27207 + elseif brace_counts.p_open < brace_counts.p_close 27208 + " previous line has more ) than (: subtract a shiftwidth 27209 + let extra = -s:ShiftWidth() 27210 + endif 27211 + endif 27212 + 27213 + return indent(align_lnum) + extra 27214 +endfunc "}}} 27215 + 27216 +" Inside <style>: Whether a line is unfinished. 27217 +func! s:CssUnfinished(text) 27218 + "{{{ 27219 + return a:text =~ '\s\(||\|&&\|:\)\s*$' 27220 +endfunc "}}} 27221 + 27222 +" Search back for the first unfinished line above "lnum". 27223 +func! s:CssFirstUnfinished(lnum, min_lnum) 27224 + "{{{ 27225 + let align_lnum = a:lnum 27226 + while align_lnum > a:min_lnum && s:CssUnfinished(getline(align_lnum - 1)) 27227 + let align_lnum -= 1 27228 + endwhile 27229 + return align_lnum 27230 +endfunc "}}} 27231 + 27232 +" Find the non-empty line at or before "lnum" that is not a comment. 27233 +func! s:CssPrevNonComment(lnum, stopline) 27234 + "{{{ 27235 + " caller starts from a line a:lnum + 1 that is not a comment 27236 + let lnum = prevnonblank(a:lnum) 27237 + while 1 27238 let ccol = match(getline(lnum), '\*/') 27239 if ccol < 0 27240 - return lnum 27241 + " No comment end thus its something else. 27242 + return lnum 27243 endif 27244 - call cursor(lnum, ccol+1) 27245 + call cursor(lnum, ccol + 1) 27246 + " Search back for the /* that starts the comment 27247 let lnum = search('/\*', 'bW', a:stopline) 27248 - if indent(".") == virtcol(".")-1 27249 - return prevnonblank(lnum-1) 27250 + if indent(".") == virtcol(".") - 1 27251 + " The found /* is at the start of the line. Now go back to the line 27252 + " above it and again check if it is a comment. 27253 + let lnum = prevnonblank(lnum - 1) 27254 else 27255 - return lnum 27256 + " /* is after something else, thus it's not a comment line. 27257 + return lnum 27258 endif 27259 + endwhile 27260 endfunc "}}} 27261 -func! s:css_countbraces(lnum, count_open) "{{{ 27262 - let brs = substitute(getline(a:lnum),'[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}]','','g') 27263 - let n_open = 0 27264 - let n_close = 0 27265 - for brace in split(brs, '\zs') 27266 - if brace == "{" 27267 - let n_open += 1 27268 - elseif brace == "}" 27269 - if n_open > 0 27270 - let n_open -= 1 27271 - else 27272 - let n_close += 1 27273 - endif 27274 - endif 27275 - endfor 27276 - return a:count_open ? n_open : n_close 27277 -endfunc "}}} 27278 - 27279 -"}}} 27280 -func! s:Alien5() "{{{ 27281 - " <!-- --> 27282 - return -1 27283 -endfunc "}}} 27284 - 27285 -func! HtmlIndent() "{{{ 27286 - let s:curline = tolower(getline(v:lnum)) 27287 - let indentunit = s:ShiftWidth() 27288 27289 - let s:newstate = {} 27290 - let s:newstate.lnum = v:lnum 27291 +" Check the number of {} and () in line "lnum". Return a dict with the counts. 27292 +func! HtmlIndent_CountBraces(lnum) 27293 + "{{{ 27294 + let brs = substitute(getline(a:lnum), '[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}()]', '', 'g') 27295 + let c_open = 0 27296 + let c_close = 0 27297 + let p_open = 0 27298 + let p_close = 0 27299 + for brace in split(brs, '\zs') 27300 + if brace == "{" 27301 + let c_open += 1 27302 + elseif brace == "}" 27303 + if c_open > 0 27304 + let c_open -= 1 27305 + else 27306 + let c_close += 1 27307 + endif 27308 + elseif brace == '(' 27309 + let p_open += 1 27310 + elseif brace == ')' 27311 + if p_open > 0 27312 + let p_open -= 1 27313 + else 27314 + let p_close += 1 27315 + endif 27316 + endif 27317 + endfor 27318 + return {'c_open': c_open, 27319 + \ 'c_close': c_close, 27320 + \ 'p_open': p_open, 27321 + \ 'p_close': p_close} 27322 +endfunc "}}} 27323 + 27324 +" Return the indent for a comment: <!-- --> 27325 +func! s:Alien5() 27326 + "{{{ 27327 + let curtext = getline(v:lnum) 27328 + if curtext =~ '^\s*\zs-->' 27329 + " current line starts with end of comment, line up with comment start. 27330 + call cursor(v:lnum, 0) 27331 + let lnum = search('<!--', 'b') 27332 + if lnum > 0 27333 + " TODO: what if <!-- is not at the start of the line? 27334 + return indent(lnum) 27335 + endif 27336 27337 - " does the line start with a closing tag? 27338 - let swendtag = match(s:curline, '^\s*</') >= 0 27339 + " Strange, can't find it. 27340 + return -1 27341 + endif 27342 27343 - if prevnonblank(v:lnum-1) == b:indent.lnum && s:usestate 27344 - " use state (continue from previous line) 27345 + let prevlnum = prevnonblank(v:lnum - 1) 27346 + let prevtext = getline(prevlnum) 27347 + let idx = match(prevtext, '^\s*\zs<!--') 27348 + if idx >= 0 27349 + " just below comment start, add a shiftwidth 27350 + return idx + s:ShiftWidth() 27351 + endif 27352 + 27353 + " Some files add 4 spaces just below a TODO line. It's difficult to detect 27354 + " the end of the TODO, so let's not do that. 27355 + 27356 + " Align with the previous non-blank line. 27357 + return indent(prevlnum) 27358 +endfunc "}}} 27359 + 27360 +" When the "lnum" line ends in ">" find the line containing the matching "<". 27361 +func! HtmlIndent_FindTagStart(lnum) 27362 + "{{{ 27363 + " Avoids using the indent of a continuation line. 27364 + " Moves the cursor. 27365 + " Return two values: 27366 + " - the matching line number or "lnum". 27367 + " - a flag indicating whether we found the end of a tag. 27368 + " This method is global so that HTML-like indenters can use it. 27369 + " To avoid matching " > " or " < " inside a string require that the opening 27370 + " "<" is followed by a word character and the closing ">" comes after a 27371 + " non-white character. 27372 + let idx = match(getline(a:lnum), '\S>\s*$') 27373 + if idx > 0 27374 + call cursor(a:lnum, idx) 27375 + let lnum = searchpair('<\w', '' , '\S>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0])) 27376 + if lnum > 0 27377 + return [lnum, 1] 27378 + endif 27379 + endif 27380 + return [a:lnum, 0] 27381 +endfunc "}}} 27382 + 27383 +" Find the unclosed start tag from the current cursor position. 27384 +func! HtmlIndent_FindStartTag() 27385 + "{{{ 27386 + " The cursor must be on or before a closing tag. 27387 + " If found, positions the cursor at the match and returns the line number. 27388 + " Otherwise returns 0. 27389 + let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs\w\+\ze') 27390 + let start_lnum = searchpair('<' . tagname . '\>', '', '</' . tagname . '\>', 'bW') 27391 + if start_lnum > 0 27392 + return start_lnum 27393 + endif 27394 + return 0 27395 +endfunc "}}} 27396 + 27397 +" Moves the cursor from a "<" to the matching ">". 27398 +func! HtmlIndent_FindTagEnd() 27399 + "{{{ 27400 + " Call this with the cursor on the "<" of a start tag. 27401 + " This will move the cursor to the ">" of the matching end tag or, when it's 27402 + " a self-closing tag, to the matching ">". 27403 + " Limited to look up to b:html_indent_line_limit lines away. 27404 + let text = getline('.') 27405 + let tagname = matchstr(text, '\w\+\|!--', col('.')) 27406 + if tagname == '!--' 27407 + call search('--\zs>') 27408 + elseif s:get_tag('/' . tagname) != 0 27409 + " tag with a closing tag, find matching "</tag>" 27410 + call searchpair('<' . tagname, '', '</' . tagname . '\zs>', 'W', '', line('.') + b:html_indent_line_limit) 27411 + else 27412 + " self-closing tag, find the ">" 27413 + call search('\S\zs>') 27414 + endif 27415 +endfunc "}}} 27416 + 27417 +" Indenting inside a start tag. Return the correct indent or -1 if unknown. 27418 +func! s:InsideTag(foundHtmlString) 27419 + "{{{ 27420 + if a:foundHtmlString 27421 + " Inside an attribute string. 27422 + " Align with the previous line or use an external function. 27423 + let lnum = v:lnum - 1 27424 + if lnum > 1 27425 + if exists('b:html_indent_tag_string_func') 27426 + return b:html_indent_tag_string_func(lnum) 27427 + endif 27428 + return indent(lnum) 27429 + endif 27430 + endif 27431 + 27432 + " Should be another attribute: " attr="val". Align with the previous 27433 + " attribute start. 27434 + let lnum = v:lnum 27435 + while lnum > 1 27436 + let lnum -= 1 27437 + let text = getline(lnum) 27438 + " Find a match with one of these, align with "attr": 27439 + " attr= 27440 + " <tag attr= 27441 + " text<tag attr= 27442 + " <tag>text</tag>text<tag attr= 27443 + " For long lines search for the first match, finding the last match 27444 + " gets very slow. 27445 + if len(text) < 300 27446 + let idx = match(text, '.*\s\zs[_a-zA-Z0-9-]\+="') 27447 else 27448 - " start over (know nothing) 27449 - let b:indent = s:FreshState(v:lnum) 27450 + let idx = match(text, '\s\zs[_a-zA-Z0-9-]\+="') 27451 endif 27452 + if idx > 0 27453 + " Found the attribute. TODO: assumes spaces, no Tabs. 27454 + return idx 27455 + endif 27456 + endwhile 27457 + return -1 27458 +endfunc "}}} 27459 + 27460 +" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum. 27461 +func! HtmlIndent() 27462 + "{{{ 27463 + if prevnonblank(v:lnum - 1) <= 1 27464 + " First non-blank line has no indent. 27465 + return 0 27466 + endif 27467 + 27468 + let curtext = tolower(getline(v:lnum)) 27469 + let indentunit = s:ShiftWidth() 27470 + 27471 + let b:hi_newstate = {} 27472 + let b:hi_newstate.lnum = v:lnum 27473 + 27474 + " When syntax HL is enabled, detect we are inside a tag. Indenting inside 27475 + " a tag works very differently. Do not do this when the line starts with 27476 + " "<", it gets the "htmlTag" ID but we are not inside a tag then. 27477 + if curtext !~ '^\s*<' 27478 + normal ^ 27479 + let stack = synstack(v:lnum, col('.')) " assumes there are no tabs 27480 + let foundHtmlString = 0 27481 + for synid in reverse(stack) 27482 + let name = synIDattr(synid, "name") 27483 + if index(b:hi_insideStringNames, name) >= 0 27484 + let foundHtmlString = 1 27485 + elseif index(b:hi_insideTagNames, name) >= 0 27486 + " Yes, we are inside a tag. 27487 + let indent = s:InsideTag(foundHtmlString) 27488 + if indent >= 0 27489 + " Do not keep the state. TODO: could keep the block type. 27490 + let b:hi_indent.lnum = 0 27491 + return indent 27492 + endif 27493 + endif 27494 + endfor 27495 + endif 27496 + 27497 + " does the line start with a closing tag? 27498 + let swendtag = match(curtext, '^\s*</') >= 0 27499 27500 - if b:indent.block >= 2 27501 - " within block 27502 - let endtag = s:endtags[b:indent.block-2] 27503 - let blockend = stridx(s:curline, endtag) 27504 - if blockend >= 0 27505 - " block ends here 27506 - let s:newstate.block = 0 27507 - " calc indent for REST OF LINE (may start more blocks): 27508 - let s:curline = strpart(s:curline, blockend+strlen(endtag)) 27509 - call s:CountITags() 27510 - if swendtag && b:indent.block != 5 27511 - let indent = b:indent.blocktagind + s:curind * indentunit 27512 - let s:newstate.baseindent = indent + s:nextrel * indentunit 27513 - else 27514 - let indent = s:Alien{b:indent.block}() 27515 - let s:newstate.baseindent = b:indent.blocktagind + s:nextrel * indentunit 27516 - endif 27517 - call extend(b:indent, s:newstate, "force") 27518 - return indent 27519 - else 27520 - " block continues 27521 - " indent this line with alien method 27522 - let indent = s:Alien{b:indent.block}() 27523 - call extend(b:indent, s:newstate, "force") 27524 - return indent 27525 - endif 27526 + if prevnonblank(v:lnum - 1) == b:hi_indent.lnum && b:hi_lasttick == b:changedtick - 1 27527 + " use state (continue from previous line) 27528 + else 27529 + " start over (know nothing) 27530 + let b:hi_indent = s:FreshState(v:lnum) 27531 + endif 27532 + 27533 + if b:hi_indent.block >= 2 27534 + " within block 27535 + let endtag = s:endtags[b:hi_indent.block] 27536 + let blockend = stridx(curtext, endtag) 27537 + if blockend >= 0 27538 + " block ends here 27539 + let b:hi_newstate.block = 0 27540 + " calc indent for REST OF LINE (may start more blocks): 27541 + call s:CountTagsAndState(strpart(curtext, blockend + strlen(endtag))) 27542 + if swendtag && b:hi_indent.block != 5 27543 + let indent = b:hi_indent.blocktagind + s:curind * indentunit 27544 + let b:hi_newstate.baseindent = indent + s:nextrel * indentunit 27545 + else 27546 + let indent = s:Alien{b:hi_indent.block}() 27547 + let b:hi_newstate.baseindent = b:hi_indent.blocktagind + s:nextrel * indentunit 27548 + endif 27549 else 27550 - " not within a block - within usual html 27551 - " if < 2 then always 0 27552 - let s:newstate.block = b:indent.block 27553 - call s:CountITags() 27554 - if swendtag 27555 - let indent = b:indent.baseindent + s:curind * indentunit 27556 - let s:newstate.baseindent = indent + s:nextrel * indentunit 27557 - else 27558 - let indent = b:indent.baseindent 27559 - let s:newstate.baseindent = indent + (s:curind + s:nextrel) * indentunit 27560 - endif 27561 - call extend(b:indent, s:newstate, "force") 27562 - return indent 27563 + " block continues 27564 + " indent this line with alien method 27565 + let indent = s:Alien{b:hi_indent.block}() 27566 + endif 27567 + else 27568 + " not within a block - within usual html 27569 + let b:hi_newstate.block = b:hi_indent.block 27570 + if swendtag 27571 + " The current line starts with an end tag, align with its start tag. 27572 + call cursor(v:lnum, 1) 27573 + let start_lnum = HtmlIndent_FindStartTag() 27574 + if start_lnum > 0 27575 + " check for the line starting with something inside a tag: 27576 + " <sometag <- align here 27577 + " attr=val><open> not here 27578 + let text = getline(start_lnum) 27579 + let angle = matchstr(text, '[<>]') 27580 + if angle == '>' 27581 + call cursor(start_lnum, 1) 27582 + normal! f>% 27583 + let start_lnum = line('.') 27584 + let text = getline(start_lnum) 27585 + endif 27586 + 27587 + let indent = indent(start_lnum) 27588 + if col('.') > 2 27589 + let swendtag = match(text, '^\s*</') >= 0 27590 + call s:CountITags(text[: col('.') - 2]) 27591 + let indent += s:nextrel * s:ShiftWidth() 27592 + if !swendtag 27593 + let indent += s:curind * s:ShiftWidth() 27594 + endif 27595 + endif 27596 + else 27597 + " not sure what to do 27598 + let indent = b:hi_indent.baseindent 27599 + endif 27600 + let b:hi_newstate.baseindent = indent 27601 + else 27602 + call s:CountTagsAndState(curtext) 27603 + let indent = b:hi_indent.baseindent 27604 + let b:hi_newstate.baseindent = indent + (s:curind + s:nextrel) * indentunit 27605 endif 27606 + endif 27607 27608 + let b:hi_lasttick = b:changedtick 27609 + call extend(b:hi_indent, b:hi_newstate, "force") 27610 + return indent 27611 endfunc "}}} 27612 27613 -" check user settings (first time), clear cpo, Modeline: {{{1 27614 - 27615 -" DEBUG: 27616 -com! -nargs=* IndHtmlLocal <args> 27617 - 27618 +" Check user settings when loading this script the first time. 27619 call HtmlIndent_CheckUserSettings() 27620 27621 let &cpo = s:cpo_save 27622 unlet s:cpo_save 27623 27624 -" vim:set fdm=marker ts=8: 27625 +" vim: fdm=marker ts=8 sw=2 tw=78 25127 27626 diff -Naur vim74.orig/runtime/indent/j.vim vim74/runtime/indent/j.vim 25128 27627 --- vim74.orig/runtime/indent/j.vim 1970-01-01 00:00:00.000000000 +0000 25129 +++ vim74/runtime/indent/j.vim 2014-0 6-01 00:42:56.970857356+000027628 +++ vim74/runtime/indent/j.vim 2014-07-21 23:33:19.843518913 +0000 25130 27629 @@ -0,0 +1,50 @@ 25131 27630 +" Vim indent file … … 25179 27678 + return indent 25180 27679 +endfunction 27680 diff -Naur vim74.orig/runtime/indent/json.vim vim74/runtime/indent/json.vim 27681 --- vim74.orig/runtime/indent/json.vim 1970-01-01 00:00:00.000000000 +0000 27682 +++ vim74/runtime/indent/json.vim 2014-07-21 23:33:19.916852055 +0000 27683 @@ -0,0 +1,13 @@ 27684 +" Vim indent file 27685 +" Language: JSON 27686 +" Maintainer: David Barnett <daviebdawg+vim@gmail.com> 27687 +" Last Change: 2014 Jul 16 27688 + 27689 +if exists('b:did_indent') 27690 + finish 27691 +endif 27692 + 27693 +" JSON is a subset of JavaScript. JavaScript indenting should work fine. 27694 +runtime! indent/javascript.vim 27695 + 27696 +let b:did_indent = 1 25181 27697 diff -Naur vim74.orig/runtime/indent/php.vim vim74/runtime/indent/php.vim 25182 27698 --- vim74.orig/runtime/indent/php.vim 2013-08-07 09:36:56.000000000 +0000 25183 +++ vim74/runtime/indent/php.vim 2014-0 6-01 00:42:57.737522071+000027699 +++ vim74/runtime/indent/php.vim 2014-07-21 23:33:20.656850124 +0000 25184 27700 @@ -3,8 +3,8 @@ 25185 27701 " Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr> … … 25479 27995 if openedparent != lnum 25480 27996 let ind = indent(openedparent) 27997 diff -Naur vim74.orig/runtime/indent/rhelp.vim vim74/runtime/indent/rhelp.vim 27998 --- vim74.orig/runtime/indent/rhelp.vim 1970-01-01 00:00:00.000000000 +0000 27999 +++ vim74/runtime/indent/rhelp.vim 2014-07-21 23:33:20.750183214 +0000 28000 @@ -0,0 +1,111 @@ 28001 +" Vim indent file 28002 +" Language: R Documentation (Help), *.Rd 28003 +" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> 28004 +" Last Change: Wed Jul 09, 2014 07:34PM 28005 + 28006 + 28007 +" Only load this indent file when no other was loaded. 28008 +if exists("b:did_indent") 28009 + finish 28010 +endif 28011 +runtime indent/r.vim 28012 +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) 28013 +let b:did_indent = 1 28014 + 28015 +setlocal indentkeys=0{,0},:,!^F,o,O,e 28016 +setlocal indentexpr=GetRHelpIndent() 28017 + 28018 +" Only define the function once. 28019 +if exists("*GetRHelpIndent") 28020 + finish 28021 +endif 28022 + 28023 +setlocal noautoindent 28024 +setlocal nocindent 28025 +setlocal nosmartindent 28026 +setlocal nolisp 28027 + 28028 +setlocal indentkeys=0{,0},:,!^F,o,O,e 28029 +setlocal indentexpr=GetCorrectRHelpIndent() 28030 + 28031 +function s:SanitizeRHelpLine(line) 28032 + let newline = substitute(a:line, '\\\\', "x", "g") 28033 + let newline = substitute(newline, '\\{', "x", "g") 28034 + let newline = substitute(newline, '\\}', "x", "g") 28035 + let newline = substitute(newline, '\\%', "x", "g") 28036 + let newline = substitute(newline, '%.*', "", "") 28037 + let newline = substitute(newline, '\s*$', "", "") 28038 + return newline 28039 +endfunction 28040 + 28041 +function GetRHelpIndent() 28042 + 28043 + let clnum = line(".") " current line 28044 + if clnum == 1 28045 + return 0 28046 + endif 28047 + let cline = getline(clnum) 28048 + 28049 + if cline =~ '^\s*}\s*$' 28050 + let i = clnum 28051 + let bb = -1 28052 + while bb != 0 && i > 1 28053 + let i -= 1 28054 + let line = s:SanitizeRHelpLine(getline(i)) 28055 + let line2 = substitute(line, "{", "", "g") 28056 + let openb = strlen(line) - strlen(line2) 28057 + let line3 = substitute(line2, "}", "", "g") 28058 + let closeb = strlen(line2) - strlen(line3) 28059 + let bb += openb - closeb 28060 + endwhile 28061 + return indent(i) 28062 + endif 28063 + 28064 + if cline =~ '^\s*#ifdef\>' || cline =~ '^\s*#endif\>' 28065 + return 0 28066 + endif 28067 + 28068 + let lnum = clnum - 1 28069 + let line = getline(lnum) 28070 + if line =~ '^\s*#ifdef\>' || line =~ '^\s*#endif\>' 28071 + let lnum -= 1 28072 + let line = getline(lnum) 28073 + endif 28074 + while lnum > 1 && (line =~ '^\s*$' || line =~ '^#ifdef' || line =~ '^#endif') 28075 + let lnum -= 1 28076 + let line = getline(lnum) 28077 + endwhile 28078 + if lnum == 1 28079 + return 0 28080 + endif 28081 + let line = s:SanitizeRHelpLine(line) 28082 + let line2 = substitute(line, "{", "", "g") 28083 + let openb = strlen(line) - strlen(line2) 28084 + let line3 = substitute(line2, "}", "", "g") 28085 + let closeb = strlen(line2) - strlen(line3) 28086 + let bb = openb - closeb 28087 + 28088 + let ind = indent(lnum) + (bb * &sw) 28089 + 28090 + if line =~ '^\s*}\s*$' 28091 + let ind = indent(lnum) 28092 + endif 28093 + 28094 + if ind < 0 28095 + return 0 28096 + endif 28097 + 28098 + return ind 28099 +endfunction 28100 + 28101 +function GetCorrectRHelpIndent() 28102 + let lastsection = search('^\\[a-z]*{', "bncW") 28103 + let secname = getline(lastsection) 28104 + if secname =~ '^\\usage{' || secname =~ '^\\examples{' || secname =~ '^\\dontshow{' || secname =~ '^\\dontrun{' || secname =~ '^\\donttest{' || secname =~ '^\\testonly{' || secname =~ '^\\method{.*}{.*}(' 28105 + return s:RIndent() 28106 + else 28107 + return GetRHelpIndent() 28108 + endif 28109 +endfunction 28110 + 28111 +" vim: sw=2 28112 diff -Naur vim74.orig/runtime/indent/rmd.vim vim74/runtime/indent/rmd.vim 28113 --- vim74.orig/runtime/indent/rmd.vim 1970-01-01 00:00:00.000000000 +0000 28114 +++ vim74/runtime/indent/rmd.vim 2014-07-21 23:33:20.753516538 +0000 28115 @@ -0,0 +1,46 @@ 28116 +" Vim indent file 28117 +" Language: Rmd 28118 +" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> 28119 +" Last Change: Wed Jul 09, 2014 07:33PM 28120 + 28121 + 28122 +" Only load this indent file when no other was loaded. 28123 +if exists("b:did_indent") 28124 + finish 28125 +endif 28126 +runtime indent/r.vim 28127 +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) 28128 +let b:did_indent = 1 28129 + 28130 +setlocal indentkeys=0{,0},:,!^F,o,O,e 28131 +setlocal indentexpr=GetRmdIndent() 28132 + 28133 +if exists("*GetRmdIndent") 28134 + finish 28135 +endif 28136 + 28137 +function GetMdIndent() 28138 + let pline = getline(v:lnum - 1) 28139 + let cline = getline(v:lnum) 28140 + if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+' 28141 + return indent(v:lnum) 28142 + elseif pline =~ '^\s*[-\+\*]\s' 28143 + return indent(v:lnum - 1) + 2 28144 + elseif pline =~ '^\s*\d\+\.\s\+' 28145 + return indent(v:lnum - 1) + 3 28146 + endif 28147 + return indent(prevnonblank(v:lnum - 1)) 28148 +endfunction 28149 + 28150 +function GetRmdIndent() 28151 + if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$' 28152 + return 0 28153 + endif 28154 + if search('^```{r', "bncW") > search('^```$', "bncW") 28155 + return s:RIndent() 28156 + else 28157 + return GetMdIndent() 28158 + endif 28159 +endfunction 28160 + 28161 +" vim: sw=2 28162 diff -Naur vim74.orig/runtime/indent/rnoweb.vim vim74/runtime/indent/rnoweb.vim 28163 --- vim74.orig/runtime/indent/rnoweb.vim 1970-01-01 00:00:00.000000000 +0000 28164 +++ vim74/runtime/indent/rnoweb.vim 2014-07-21 23:33:20.756849863 +0000 28165 @@ -0,0 +1,35 @@ 28166 +" Vim indent file 28167 +" Language: Rnoweb 28168 +" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> 28169 +" Last Change: Wed Jul 09, 2014 07:28PM 28170 + 28171 + 28172 +" Only load this indent file when no other was loaded. 28173 +if exists("b:did_indent") 28174 + finish 28175 +endif 28176 +runtime indent/tex.vim 28177 +let s:TeXIndent = function(substitute(&indentexpr, "()", "", "")) 28178 +unlet b:did_indent 28179 +runtime indent/r.vim 28180 +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) 28181 +let b:did_indent = 1 28182 + 28183 +setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item 28184 +setlocal indentexpr=GetRnowebIndent() 28185 + 28186 +if exists("*GetRnowebIndent") 28187 + finish 28188 +endif 28189 + 28190 +function GetRnowebIndent() 28191 + if getline(".") =~ "^<<.*>>=$" 28192 + return 0 28193 + endif 28194 + if search("^<<", "bncW") > search("^@", "bncW") 28195 + return s:RIndent() 28196 + endif 28197 + return s:TeXIndent() 28198 +endfunction 28199 + 28200 +" vim: sw=2 28201 diff -Naur vim74.orig/runtime/indent/rrst.vim vim74/runtime/indent/rrst.vim 28202 --- vim74.orig/runtime/indent/rrst.vim 1970-01-01 00:00:00.000000000 +0000 28203 +++ vim74/runtime/indent/rrst.vim 2014-07-21 23:33:20.780183135 +0000 28204 @@ -0,0 +1,46 @@ 28205 +" Vim indent file 28206 +" Language: Rrst 28207 +" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> 28208 +" Last Change: Wed Jul 09, 2014 07:33PM 28209 + 28210 + 28211 +" Only load this indent file when no other was loaded. 28212 +if exists("b:did_indent") 28213 + finish 28214 +endif 28215 +runtime indent/r.vim 28216 +let s:RIndent = function(substitute(&indentexpr, "()", "", "")) 28217 +let b:did_indent = 1 28218 + 28219 +setlocal indentkeys=0{,0},:,!^F,o,O,e 28220 +setlocal indentexpr=GetRrstIndent() 28221 + 28222 +if exists("*GetRrstIndent") 28223 + finish 28224 +endif 28225 + 28226 +function GetRstIndent() 28227 + let pline = getline(v:lnum - 1) 28228 + let cline = getline(v:lnum) 28229 + if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+' 28230 + return indent(v:lnum) 28231 + elseif pline =~ '^\s*[-\+\*]\s' 28232 + return indent(v:lnum - 1) + 2 28233 + elseif pline =~ '^\s*\d\+\.\s\+' 28234 + return indent(v:lnum - 1) + 3 28235 + endif 28236 + return indent(prevnonblank(v:lnum - 1)) 28237 +endfunction 28238 + 28239 +function GetRrstIndent() 28240 + if getline(".") =~ '^\.\. {r .*}$' || getline(".") =~ '^\.\. \.\.$' 28241 + return 0 28242 + endif 28243 + if search('^\.\. {r', "bncW") > search('^\.\. \.\.$', "bncW") 28244 + return s:RIndent() 28245 + else 28246 + return GetRstIndent() 28247 + endif 28248 +endfunction 28249 + 28250 +" vim: sw=2 25481 28251 diff -Naur vim74.orig/runtime/indent/sh.vim vim74/runtime/indent/sh.vim 25482 28252 --- vim74.orig/runtime/indent/sh.vim 2010-05-15 11:03:29.000000000 +0000 25483 +++ vim74/runtime/indent/sh.vim 2014-0 6-01 00:42:57.920854937+000028253 +++ vim74/runtime/indent/sh.vim 2014-07-21 23:33:20.870182901 +0000 25484 28254 @@ -1,7 +1,8 @@ 25485 28255 " Vim indent file … … 25518 28288 diff -Naur vim74.orig/runtime/indent/systemverilog.vim vim74/runtime/indent/systemverilog.vim 25519 28289 --- vim74.orig/runtime/indent/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000 25520 +++ vim74/runtime/indent/systemverilog.vim 2014-0 6-01 00:42:57.954188186+000028290 +++ vim74/runtime/indent/systemverilog.vim 2014-07-21 23:33:20.903516147 +0000 25521 28291 @@ -0,0 +1,230 @@ 25522 28292 +" Vim indent file … … 25752 28522 diff -Naur vim74.orig/runtime/macros/less.vim vim74/runtime/macros/less.vim 25753 28523 --- vim74.orig/runtime/macros/less.vim 2012-05-18 18:58:54.000000000 +0000 25754 +++ vim74/runtime/macros/less.vim 2014-0 6-01 00:43:00.600848113+000028524 +++ vim74/runtime/macros/less.vim 2014-07-21 23:33:23.516842660 +0000 25755 28525 @@ -1,6 +1,6 @@ 25756 28526 " Vim script to work like "less" … … 25837 28607 25838 28608 " vim: sw=2 28609 diff -Naur vim74.orig/runtime/menu.vim vim74/runtime/menu.vim 28610 --- vim74.orig/runtime/menu.vim 2013-05-17 11:01:55.000000000 +0000 28611 +++ vim74/runtime/menu.vim 2014-07-21 23:33:23.866841747 +0000 28612 @@ -2,7 +2,7 @@ 28613 " You can also use this as a start for your own set of menus. 28614 " 28615 " Maintainer: Bram Moolenaar <Bram@vim.org> 28616 -" Last Change: 2013 May 17 28617 +" Last Change: 2014 May 22 28618 28619 " Note that ":an" (short for ":anoremenu") is often used to make a menu work 28620 " in all modes and avoid side effects from mappings defined by the user. 28621 @@ -477,6 +477,7 @@ 28622 an 40.340.110 &Tools.&Folding.&Enable/Disable\ folds<Tab>zi zi 28623 an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv 28624 an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx zMzx 28625 + inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx <C-O>zM<C-O>zx 28626 an 40.340.130 &Tools.&Folding.C&lose\ more\ folds<Tab>zm zm 28627 an 40.340.140 &Tools.&Folding.&Close\ all\ folds<Tab>zM zM 28628 an 40.340.150 &Tools.&Folding.O&pen\ more\ folds<Tab>zr zr 25839 28629 diff -Naur vim74.orig/runtime/optwin.vim vim74/runtime/optwin.vim 25840 28630 --- vim74.orig/runtime/optwin.vim 2013-06-29 12:32:06.000000000 +0000 25841 +++ vim74/runtime/optwin.vim 2014-0 6-01 00:43:00.977513821+000028631 +++ vim74/runtime/optwin.vim 2014-07-21 23:33:23.893508344 +0000 25842 28632 @@ -1,7 +1,7 @@ 25843 28633 " These commands create the option window. … … 25849 28639 " If there already is an option window, jump to that one. 25850 28640 if bufwinnr("option-window") > 0 25851 @@ -855,7 +855,7 @@ 28641 @@ -324,6 +324,12 @@ 28642 call append("$", "linebreak\twrap long lines at a character in 'breakat'") 28643 call append("$", "\t(local to window)") 28644 call <SID>BinOptionL("lbr") 28645 +call append("$", "breakindent\tpreserve indentation in wrapped text") 28646 +call append("$", "\t(local to window)") 28647 +call <SID>BinOptionL("bri") 28648 +call append("$", "breakindentopt\tadjust breakindent behaviour") 28649 +call append("$", "\t(local to window)") 28650 +call <SID>OptionL("briopt") 28651 call append("$", "breakat\twhich characters might cause a line break") 28652 call <SID>OptionG("brk", &brk) 28653 call append("$", "showbreak\tstring to put before wrapped screen lines") 28654 @@ -855,7 +861,7 @@ 25852 28655 call append("$", "\t(local to buffer)") 25853 28656 call <SID>BinOptionL("lisp") … … 25860 28663 diff -Naur vim74.orig/runtime/plugin/getscriptPlugin.vim vim74/runtime/plugin/getscriptPlugin.vim 25861 28664 --- vim74.orig/runtime/plugin/getscriptPlugin.vim 2013-04-17 13:40:44.000000000 +0000 25862 +++ vim74/runtime/plugin/getscriptPlugin.vim 2014-0 6-01 00:43:01.010847069+000028665 +++ vim74/runtime/plugin/getscriptPlugin.vim 2014-07-21 23:33:23.926841590 +0000 25863 28666 @@ -1,7 +1,7 @@ 25864 28667 " --------------------------------------------------------------------- … … 25889 28692 set cpo&vim 25890 28693 28694 diff -Naur vim74.orig/runtime/plugin/matchparen.vim vim74/runtime/plugin/matchparen.vim 28695 --- vim74.orig/runtime/plugin/matchparen.vim 2013-05-08 03:15:53.000000000 +0000 28696 +++ vim74/runtime/plugin/matchparen.vim 2014-07-21 23:33:23.963508161 +0000 28697 @@ -1,6 +1,6 @@ 28698 " Vim plugin for showing matching parens 28699 " Maintainer: Bram Moolenaar <Bram@vim.org> 28700 -" Last Change: 2013 May 08 28701 +" Last Change: 2014 Jul 19 28702 28703 " Exit quickly when: 28704 " - this plugin was already loaded (or disabled) 28705 @@ -39,7 +39,7 @@ 28706 function! s:Highlight_Matching_Pair() 28707 " Remove any previous match. 28708 if exists('w:paren_hl_on') && w:paren_hl_on 28709 - 3match none 28710 + silent! call matchdelete(3) 28711 let w:paren_hl_on = 0 28712 endif 28713 28714 @@ -54,14 +54,15 @@ 28715 let c_col = col('.') 28716 let before = 0 28717 28718 - let c = getline(c_lnum)[c_col - 1] 28719 + let text = getline(c_lnum) 28720 + let c = text[c_col - 1] 28721 let plist = split(&matchpairs, '.\zs[:,]') 28722 let i = index(plist, c) 28723 if i < 0 28724 " not found, in Insert mode try character before the cursor 28725 if c_col > 1 && (mode() == 'i' || mode() == 'R') 28726 let before = 1 28727 - let c = getline(c_lnum)[c_col - 2] 28728 + let c = text[c_col - 2] 28729 let i = index(plist, c) 28730 endif 28731 if i < 0 28732 @@ -87,7 +88,13 @@ 28733 " Find the match. When it was just before the cursor move it there for a 28734 " moment. 28735 if before > 0 28736 - let save_cursor = winsaveview() 28737 + let has_getcurpos = exists("*getcurpos") 28738 + if has_getcurpos 28739 + " getcurpos() is more efficient but doesn't exist before 7.4.313. 28740 + let save_cursor = getcurpos() 28741 + else 28742 + let save_cursor = winsaveview() 28743 + endif 28744 call cursor(c_lnum, c_col - before) 28745 endif 28746 28747 @@ -147,19 +154,27 @@ 28748 endtry 28749 28750 if before > 0 28751 - call winrestview(save_cursor) 28752 + if has_getcurpos 28753 + call setpos('.', save_cursor) 28754 + else 28755 + call winrestview(save_cursor) 28756 + endif 28757 endif 28758 28759 " If a match is found setup match highlighting. 28760 if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom 28761 - exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 28762 - \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' 28763 + if exists('*matchaddpos') 28764 + call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) 28765 + else 28766 + exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 28767 + \ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' 28768 + endif 28769 let w:paren_hl_on = 1 28770 endif 28771 endfunction 28772 28773 " Define commands that will disable and enable the plugin. 28774 -command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen | 28775 +command! NoMatchParen windo silent! call matchdelete(3) | unlet! g:loaded_matchparen | 28776 \ au! matchparen 28777 command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved 28778 25891 28779 diff -Naur vim74.orig/runtime/plugin/netrwPlugin.vim vim74/runtime/plugin/netrwPlugin.vim 25892 28780 --- vim74.orig/runtime/plugin/netrwPlugin.vim 2013-05-19 03:28:33.000000000 +0000 25893 +++ vim74/runtime/plugin/netrwPlugin.vim 2014-0 6-01 00:43:01.040846993+000028781 +++ vim74/runtime/plugin/netrwPlugin.vim 2014-07-21 23:33:23.980174785 +0000 25894 28782 @@ -1,9 +1,9 @@ 25895 28783 " netrwPlugin.vim: Handles file transfer and remote directory listing across a network … … 26075 28963 diff -Naur vim74.orig/runtime/syntax/a65.vim vim74/runtime/syntax/a65.vim 26076 28964 --- vim74.orig/runtime/syntax/a65.vim 2010-05-15 11:03:57.000000000 +0000 26077 +++ vim74/runtime/syntax/a65.vim 2014-0 6-01 00:43:04.117505825+000028965 +++ vim74/runtime/syntax/a65.vim 2014-07-21 23:33:27.223499654 +0000 26078 28966 @@ -1,7 +1,7 @@ 26079 28967 " Vim syntax file … … 26088 28976 diff -Naur vim74.orig/runtime/syntax/apache.vim vim74/runtime/syntax/apache.vim 26089 28977 --- vim74.orig/runtime/syntax/apache.vim 2010-05-15 11:03:57.000000000 +0000 26090 +++ vim74/runtime/syntax/apache.vim 2014-0 6-01 00:43:04.257505469+000028978 +++ vim74/runtime/syntax/apache.vim 2014-07-21 23:33:27.420165808 +0000 26091 28979 @@ -1,11 +1,9 @@ 26092 28980 " Vim syntax file … … 26126 29014 diff -Naur vim74.orig/runtime/syntax/arduino.vim vim74/runtime/syntax/arduino.vim 26127 29015 --- vim74.orig/runtime/syntax/arduino.vim 1970-01-01 00:00:00.000000000 +0000 26128 +++ vim74/runtime/syntax/arduino.vim 2014-0 6-01 00:43:04.297505367+000029016 +++ vim74/runtime/syntax/arduino.vim 2014-07-21 23:33:27.493498950 +0000 26129 29017 @@ -0,0 +1,61 @@ 26130 29018 +" Vim syntax file … … 26191 29079 diff -Naur vim74.orig/runtime/syntax/asm.vim vim74/runtime/syntax/asm.vim 26192 29080 --- vim74.orig/runtime/syntax/asm.vim 2012-04-09 19:37:34.000000000 +0000 26193 +++ vim74/runtime/syntax/asm.vim 2014-0 6-01 00:43:04.327505291+000029081 +++ vim74/runtime/syntax/asm.vim 2014-07-21 23:33:27.513498898 +0000 26194 29082 @@ -3,7 +3,7 @@ 26195 29083 " Maintainer: Erik Wognsen <erik.wognsen@gmail.com> … … 26216 29104 diff -Naur vim74.orig/runtime/syntax/bib.vim vim74/runtime/syntax/bib.vim 26217 29105 --- vim74.orig/runtime/syntax/bib.vim 2011-12-30 11:30:00.000000000 +0000 26218 +++ vim74/runtime/syntax/bib.vim 2014-0 6-01 00:43:04.514171482+000029106 +++ vim74/runtime/syntax/bib.vim 2014-07-21 23:33:27.706831726 +0000 26219 29107 @@ -2,7 +2,7 @@ 26220 29108 " Language: BibTeX (bibliographic database format for (La)TeX) … … 26235 29123 syn keyword bibEntryKw contained address annote author booktitle chapter 26236 29124 syn keyword bibEntryKw contained crossref edition editor howpublished 29125 diff -Naur vim74.orig/runtime/syntax/c.vim vim74/runtime/syntax/c.vim 29126 --- vim74.orig/runtime/syntax/c.vim 2013-07-05 16:09:23.000000000 +0000 29127 +++ vim74/runtime/syntax/c.vim 2014-07-21 23:33:27.810164790 +0000 29128 @@ -1,7 +1,7 @@ 29129 " Vim syntax file 29130 " Language: C 29131 " Maintainer: Bram Moolenaar <Bram@vim.org> 29132 -" Last Change: 2013 Jul 05 29133 +" Last Change: 2014 May 26 29134 29135 " Quit when a (custom) syntax file was already loaded 29136 if exists("b:current_syntax") 29137 @@ -322,6 +322,9 @@ 29138 syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET 29139 syn keyword cConstant TMP_MAX stderr stdin stdout 29140 syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX 29141 + " POSIX 2001 29142 + syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG 29143 + syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ 29144 " Add POSIX errors as well 29145 syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY 29146 syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT 26237 29147 diff -Naur vim74.orig/runtime/syntax/clean.vim vim74/runtime/syntax/clean.vim 26238 29148 --- vim74.orig/runtime/syntax/clean.vim 2013-06-19 19:34:33.000000000 +0000 26239 +++ vim74/runtime/syntax/clean.vim 2014-0 6-01 00:43:04.847503967+000029149 +++ vim74/runtime/syntax/clean.vim 2014-07-21 23:33:28.053497488 +0000 26240 29150 @@ -2,7 +2,7 @@ 26241 29151 " Language: Clean … … 26299 29209 diff -Naur vim74.orig/runtime/syntax/clojure.vim vim74/runtime/syntax/clojure.vim 26300 29210 --- vim74.orig/runtime/syntax/clojure.vim 2013-02-06 14:35:23.000000000 +0000 26301 +++ vim74/runtime/syntax/clojure.vim 2014-0 6-01 00:43:04.904170489+000029211 +++ vim74/runtime/syntax/clojure.vim 2014-07-21 23:33:28.110164007 +0000 26302 29212 @@ -1,34 +1,37 @@ 26303 29213 " Vim syntax file … … 26567 29477 diff -Naur vim74.orig/runtime/syntax/cpp.vim vim74/runtime/syntax/cpp.vim 26568 29478 --- vim74.orig/runtime/syntax/cpp.vim 2013-03-13 17:34:49.000000000 +0000 26569 +++ vim74/runtime/syntax/cpp.vim 2014-0 6-01 00:43:05.014170209+000029479 +++ vim74/runtime/syntax/cpp.vim 2014-07-21 23:33:28.220163720 +0000 26570 29480 @@ -2,7 +2,7 @@ 26571 29481 " Language: C++ … … 26596 29506 diff -Naur vim74.orig/runtime/syntax/css.vim vim74/runtime/syntax/css.vim 26597 29507 --- vim74.orig/runtime/syntax/css.vim 2013-07-23 19:08:29.000000000 +0000 26598 +++ vim74/runtime/syntax/css.vim 2014-0 6-01 00:43:05.110836629+000029508 +++ vim74/runtime/syntax/css.vim 2014-07-21 23:33:28.326830108 +0000 26599 29509 @@ -6,7 +6,7 @@ 26600 29510 " Nikolai Weibull (Add CSS2 support) … … 27349 30259 diff -Naur vim74.orig/runtime/syntax/d.vim vim74/runtime/syntax/d.vim 27350 30260 --- vim74.orig/runtime/syntax/d.vim 2013-05-23 20:52:24.000000000 +0000 27351 +++ vim74/runtime/syntax/d.vim 2014-0 6-01 00:43:05.267502897+000030261 +++ vim74/runtime/syntax/d.vim 2014-07-21 23:33:28.486829691 +0000 27352 30262 @@ -2,8 +2,8 @@ 27353 30263 " … … 27442 30352 diff -Naur vim74.orig/runtime/syntax/datascript.vim vim74/runtime/syntax/datascript.vim 27443 30353 --- vim74.orig/runtime/syntax/datascript.vim 2012-04-30 10:59:58.000000000 +0000 27444 +++ vim74/runtime/syntax/datascript.vim 2014-0 6-01 00:43:05.270836222+000030354 +++ vim74/runtime/syntax/datascript.vim 2014-07-21 23:33:28.490163016 +0000 27445 30355 @@ -1,7 +1,7 @@ 27446 30356 " Vim syntax file … … 27491 30401 diff -Naur vim74.orig/runtime/syntax/debchangelog.vim vim74/runtime/syntax/debchangelog.vim 27492 30402 --- vim74.orig/runtime/syntax/debchangelog.vim 2013-05-17 15:25:15.000000000 +0000 27493 +++ vim74/runtime/syntax/debchangelog.vim 2014-0 6-01 00:43:05.340836044+000030403 +++ vim74/runtime/syntax/debchangelog.vim 2014-07-21 23:33:28.536829560 +0000 27494 30404 @@ -3,7 +3,7 @@ 27495 30405 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> … … 27497 30407 " Wichert Akkerman <wakkerma@debian.org> 27498 30408 -" Last Change: 2013 May 05 27499 +" Last Change: 2014 J an 2030409 +" Last Change: 2014 Jul 11 27500 30410 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim 27501 30411 … … 27506 30416 syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\=" 27507 30417 -syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(lucid|precise|quantal|raring|saucy)%(-%(security|proposed|updates|backports|commercial|partner))=)+" 27508 +syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%( lucid|precise|quantal|saucy|trusty)%(-%(security|proposed|updates|backports|commercial|partner))=)+"30418 +syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+" 27509 30419 syn match debchangelogVersion contained "(.\{-})" 27510 30420 syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" … … 27512 30422 diff -Naur vim74.orig/runtime/syntax/debcontrol.vim vim74/runtime/syntax/debcontrol.vim 27513 30423 --- vim74.orig/runtime/syntax/debcontrol.vim 2013-05-21 10:54:11.000000000 +0000 27514 +++ vim74/runtime/syntax/debcontrol.vim 2014-0 6-01 00:43:05.344169369+000030424 +++ vim74/runtime/syntax/debcontrol.vim 2014-07-21 23:33:28.540162885 +0000 27515 30425 @@ -3,7 +3,7 @@ 27516 30426 " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> … … 27518 30428 " Wichert Akkerman <wakkerma@debian.org> 27519 30429 -" Last Change: 2013 May 05 27520 +" Last Change: 201 3 Oct 2830430 +" Last Change: 2014 May 01 27521 30431 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim 27522 30432 27523 30433 " Standard syntax initialization 27524 @@ -24,7 +24,7 @@ 30434 @@ -13,6 +13,9 @@ 30435 finish 30436 endif 30437 30438 +let s:cpo_save = &cpo 30439 +set cpo&vim 30440 + 30441 " Should match case except for the keys of each field 30442 syn case match 30443 30444 @@ -23,8 +26,17 @@ 30445 syn match debControlComma ", *" 27525 30446 syn match debControlSpace " " 27526 30447 30448 +let s:kernels = '\%(linux\|hurd\|kfreebsd\|knetbsd\|kopensolaris\|netbsd\)' 30449 +let s:archs = '\%(alpha\|amd64\|armeb\|armel\|armhf\|arm64\|avr32\|hppa\|i386' 30450 + \ . '\|ia64\|lpia\|m32r\|m68k\|mipsel\|mips\|powerpcspe\|powerpc\|ppc64el' 30451 + \ . '\|ppc64\|s390x\|s390\|sh3eb\|sh3\|sh4eb\|sh4\|sh\|sparc64\|sparc\|x32\)' 30452 +let s:pairs = 'hurd-i386\|kfreebsd-i386\|kfreebsd-amd64\|knetbsd-i386\|kopensolaris-i386\|netbsd-alpha\|netbsd-i386' 30453 + 27527 30454 " Define some common expressions we can use later on 27528 30455 -syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)" 27529 +syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\|64\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\%(spe\)\=\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|x32\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)" 30456 +exe 'syn match debcontrolArchitecture contained "\%(all\|'. s:kernels .'-any\|\%(any-\)\='. s:archs .'\|'. s:pairs .'\|any\)"' 30457 + 30458 +unlet s:kernels s:archs s:pairs 30459 + 27530 30460 syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)" 27531 30461 syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" 27532 30462 syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" 30463 @@ -108,4 +120,7 @@ 30464 30465 let b:current_syntax = "debcontrol" 30466 30467 +let &cpo = s:cpo_save 30468 +unlet s:cpo_save 30469 + 30470 " vim: ts=8 sw=2 27533 30471 diff -Naur vim74.orig/runtime/syntax/debsources.vim vim74/runtime/syntax/debsources.vim 27534 30472 --- vim74.orig/runtime/syntax/debsources.vim 2013-05-17 15:25:15.000000000 +0000 27535 +++ vim74/runtime/syntax/debsources.vim 2014-0 6-01 00:43:05.357502668+000030473 +++ vim74/runtime/syntax/debsources.vim 2014-07-21 23:33:28.560162833 +0000 27536 30474 @@ -2,7 +2,7 @@ 27537 30475 " Language: Debian sources.list … … 27539 30477 " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> 27540 30478 -" Last Change: 2013 May 05 27541 +" Last Change: 2014 J an 2030479 +" Last Change: 2014 Jul 11 27542 30480 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim 27543 30481 … … 27548 30486 syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ 27549 30487 -syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|lucid\|precise\|quantal\|raring\|saucy\)\([-[:alnum:]_./]*\)+ 27550 +syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\| \(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|lucid\|precise\|quantal\|saucy\|trusty\)\([-[:alnum:]_./]*\)+30488 +syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|jessie\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|devel\|lucid\|precise\|trusty\|utopic\)\([-[:alnum:]_./]*\)+ 27551 30489 27552 30490 " Associate our matches and regions with pretty colours … … 27554 30492 diff -Naur vim74.orig/runtime/syntax/diff.vim vim74/runtime/syntax/diff.vim 27555 30493 --- vim74.orig/runtime/syntax/diff.vim 2013-07-24 09:47:50.000000000 +0000 27556 +++ vim74/runtime/syntax/diff.vim 2014-0 6-01 00:43:05.440835789+000030494 +++ vim74/runtime/syntax/diff.vim 2014-07-21 23:33:28.650162598 +0000 27557 30495 @@ -2,7 +2,7 @@ 27558 30496 " Language: Diff (context or unified) … … 27575 30513 diff -Naur vim74.orig/runtime/syntax/dircolors.vim vim74/runtime/syntax/dircolors.vim 27576 30514 --- vim74.orig/runtime/syntax/dircolors.vim 2012-04-25 09:42:39.000000000 +0000 27577 +++ vim74/runtime/syntax/dircolors.vim 2014-0 6-01 00:43:05.454169089+000030515 +++ vim74/runtime/syntax/dircolors.vim 2014-07-21 23:33:28.660162572 +0000 27578 30516 @@ -1,751 +1,213 @@ 27579 30517 " Vim syntax file … … 28522 31460 diff -Naur vim74.orig/runtime/syntax/dnsmasq.vim vim74/runtime/syntax/dnsmasq.vim 28523 31461 --- vim74.orig/runtime/syntax/dnsmasq.vim 2012-05-19 12:57:09.000000000 +0000 28524 +++ vim74/runtime/syntax/dnsmasq.vim 2014-0 6-01 00:43:05.514168936+000031462 +++ vim74/runtime/syntax/dnsmasq.vim 2014-07-21 23:33:28.723495740 +0000 28525 31463 @@ -1,26 +1,19 @@ 28526 31464 " Vim syntax file … … 28661 31599 diff -Naur vim74.orig/runtime/syntax/dts.vim vim74/runtime/syntax/dts.vim 28662 31600 --- vim74.orig/runtime/syntax/dts.vim 2013-04-05 14:25:40.000000000 +0000 28663 +++ vim74/runtime/syntax/dts.vim 2014-0 6-01 00:43:05.680835178+000031601 +++ vim74/runtime/syntax/dts.vim 2014-07-21 23:33:28.863495375 +0000 28664 31602 @@ -1,7 +1,7 @@ 28665 31603 " Vim syntax file … … 28692 31630 diff -Naur vim74.orig/runtime/syntax/euphoria3.vim vim74/runtime/syntax/euphoria3.vim 28693 31631 --- vim74.orig/runtime/syntax/euphoria3.vim 1970-01-01 00:00:00.000000000 +0000 28694 +++ vim74/runtime/syntax/euphoria3.vim 2014-0 6-01 00:43:05.907501268+000031632 +++ vim74/runtime/syntax/euphoria3.vim 2014-07-21 23:33:29.090161450 +0000 28695 31633 @@ -0,0 +1,135 @@ 28696 31634 +" Vim syntax file … … 28831 31769 diff -Naur vim74.orig/runtime/syntax/euphoria4.vim vim74/runtime/syntax/euphoria4.vim 28832 31770 --- vim74.orig/runtime/syntax/euphoria4.vim 1970-01-01 00:00:00.000000000 +0000 28833 +++ vim74/runtime/syntax/euphoria4.vim 2014-0 6-01 00:43:05.914167917+000031771 +++ vim74/runtime/syntax/euphoria4.vim 2014-07-21 23:33:29.100161424 +0000 28834 31772 @@ -0,0 +1,247 @@ 28835 31773 +" Vim syntax file … … 29082 32020 diff -Naur vim74.orig/runtime/syntax/help.vim vim74/runtime/syntax/help.vim 29083 32021 --- vim74.orig/runtime/syntax/help.vim 2013-07-07 11:27:18.000000000 +0000 29084 +++ vim74/runtime/syntax/help.vim 2014-0 6-01 00:43:06.510833065+000032022 +++ vim74/runtime/syntax/help.vim 2014-07-21 23:33:29.650159989 +0000 29085 32023 @@ -1,7 +1,7 @@ 29086 32024 " Vim syntax file … … 29125 32063 diff -Naur vim74.orig/runtime/syntax/j.vim vim74/runtime/syntax/j.vim 29126 32064 --- vim74.orig/runtime/syntax/j.vim 1970-01-01 00:00:00.000000000 +0000 29127 +++ vim74/runtime/syntax/j.vim 2014-0 6-01 00:43:06.840832224+000029128 @@ -0,0 +1,1 34@@32065 +++ vim74/runtime/syntax/j.vim 2014-07-21 23:33:29.993492426 +0000 32066 @@ -0,0 +1,140 @@ 29129 32067 +" Vim syntax file 29130 32068 +" Language: J 29131 32069 +" Maintainer: David BÃŒrgin <676c7473@gmail.com> 29132 32070 +" URL: https://github.com/glts/vim-j 29133 +" Last Change: 2014-0 4-0532071 +" Last Change: 2014-05-25 29134 32072 + 29135 32073 +if exists('b:current_syntax') … … 29175 32113 +" made. See http://www.jsoftware.com/help/dictionary/dcons.htm for reference. 29176 32114 +syntax match jNumber /\<_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(r_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\=\)\|\%([px]_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\%(\%(j\|a[dr]\|r\)_\=\d\+\%(\.\d*\)\=\%([eE]_\=\d\+\)\=\)\=\)\)\=/ 29177 +syntax match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+ /32115 +syntax match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+\%(\.[0-9a-z]\+\)\=/ 29178 32116 +syntax match jNumber /\<__\=\>/ 29179 32117 +syntax match jNumber /\<_\./ … … 29193 32131 +syntax match jConjunction /;\.\|\^:\|![.:]/ 29194 32132 + 29195 +" Explicit noun definition. The difficulty is that the define expression 29196 +" "0 : 0" can occur in the middle of a line but the jNounDefine region must 29197 +" only start on the next line. The trick is to split the problem into two 29198 +" regions and link them with "nextgroup=". 32133 +" Explicit noun definition. The difficulty is that the define expression can 32134 +" occur in the middle of a line but the jNounDefine region must only start on 32135 +" the next line. The trick is to split the problem into two regions and link 32136 +" them with "nextgroup=". The fold wrapper provides syntax folding. 32137 +syntax region jNounDefineFold 32138 + \ matchgroup=NONE start=/\<\%(\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>\)\@=/ 32139 + \ keepend matchgroup=NONE end=/^\s*)\s*$/ 32140 + \ contains=jNounDefineStart 32141 + \ fold 29199 32142 +syntax region jNounDefineStart 29200 32143 + \ matchgroup=jDefineExpression start=/\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>/ 29201 32144 + \ keepend matchgroup=NONE end=/$/ 29202 32145 + \ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment 29203 + \ oneline skipempty nextgroup=jDefineEnd,jNounDefine32146 + \ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine 29204 32147 +" These two items must have "contained", which allows them to match only after 29205 32148 +" jNounDefineStart thanks to the "nextgroup=" above. … … 29216 32159 + \ matchgroup=jDefineEnd end=/^\s*)\s*$/ 29217 32160 + \ contains=jControl,@jStdlibItems,@jPrimitiveItems,jNumber,jString,jArgument,jParenGroup,jParen,jComment,jDefineMonadDyad 32161 + \ fold 29218 32162 +syntax match jDefineMonadDyad contained /^\s*:\s*$/ 29219 32163 + … … 29261 32205 +let &cpo = s:save_cpo 29262 32206 +unlet s:save_cpo 32207 diff -Naur vim74.orig/runtime/syntax/json.vim vim74/runtime/syntax/json.vim 32208 --- vim74.orig/runtime/syntax/json.vim 1970-01-01 00:00:00.000000000 +0000 32209 +++ vim74/runtime/syntax/json.vim 2014-07-21 23:33:30.130158736 +0000 32210 @@ -0,0 +1,16 @@ 32211 +" Vim syntax file 32212 +" Language: JSON 32213 +" Maintainer: David Barnett <daviebdawg+vim@gmail.com> 32214 +" Last Change: 2014 Jul 16 32215 + 32216 +" For version 5.x: Clear all syntax items. 32217 +" For version 6.x and later: Quit when a syntax file was already loaded. 32218 +if exists('b:current_syntax') 32219 + finish 32220 +endif 32221 + 32222 +" Use JavaScript syntax. JSON is a subset of JavaScript. 32223 +runtime! syntax/javascript.vim 32224 +unlet b:current_syntax 32225 + 32226 +let b:current_syntax = 'json' 32227 diff -Naur vim74.orig/runtime/syntax/kivy.vim vim74/runtime/syntax/kivy.vim 32228 --- vim74.orig/runtime/syntax/kivy.vim 1970-01-01 00:00:00.000000000 +0000 32229 +++ vim74/runtime/syntax/kivy.vim 2014-07-21 23:33:30.163491982 +0000 32230 @@ -0,0 +1,36 @@ 32231 +" Vim syntax file 32232 +" Language: Kivy 32233 +" Maintainer: Corey Prophitt <prophitt.corey@gmail.com> 32234 +" Last Change: May 29th, 2014 32235 +" Version: 1 32236 +" URL: http://kivy.org/ 32237 + 32238 +if exists("b:current_syntax") 32239 + finish 32240 +endif 32241 + 32242 +" Load Python syntax first (Python can be used within Kivy) 32243 +syn include @pyth $VIMRUNTIME/syntax/python.vim 32244 + 32245 +" Kivy language rules can be found here 32246 +" http://kivy.org/docs/guide/lang.html 32247 + 32248 +" Define Kivy syntax 32249 +syn match kivyPreProc /#:.*/ 32250 +syn match kivyComment /#.*/ 32251 +syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/ 32252 +syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue 32253 + 32254 +syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite 32255 + 32256 +syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite 32257 + 32258 +hi def link kivyPreproc PreProc 32259 +hi def link kivyComment Comment 32260 +hi def link kivyRule Function 32261 +hi def link kivyIdent Statement 32262 +hi def link kivyAttribute Label 32263 + 32264 +let b:current_syntax = "kivy" 32265 + 32266 +" vim: ts=8 29263 32267 diff -Naur vim74.orig/runtime/syntax/mail.vim vim74/runtime/syntax/mail.vim 29264 32268 --- vim74.orig/runtime/syntax/mail.vim 2013-07-15 21:28:26.000000000 +0000 29265 +++ vim74/runtime/syntax/mail.vim 2014-0 6-01 00:43:07.424164072+000032269 +++ vim74/runtime/syntax/mail.vim 2014-07-21 23:33:30.653490704 +0000 29266 32270 @@ -2,7 +2,7 @@ 29267 32271 " Language: Mail file … … 29284 32288 diff -Naur vim74.orig/runtime/syntax/masm.vim vim74/runtime/syntax/masm.vim 29285 32289 --- vim74.orig/runtime/syntax/masm.vim 2012-02-04 19:24:10.000000000 +0000 29286 +++ vim74/runtime/syntax/masm.vim 2014-0 6-01 00:43:07.554163741+000032290 +++ vim74/runtime/syntax/masm.vim 2014-07-21 23:33:30.760157092 +0000 29287 32291 @@ -2,14 +2,11 @@ 29288 32292 " Language: Microsoft Macro Assembler (80x86) … … 29423 32427 diff -Naur vim74.orig/runtime/syntax/mix.vim vim74/runtime/syntax/mix.vim 29424 32428 --- vim74.orig/runtime/syntax/mix.vim 1970-01-01 00:00:00.000000000 +0000 29425 +++ vim74/runtime/syntax/mix.vim 2014-0 6-01 00:43:07.694163385+000032429 +++ vim74/runtime/syntax/mix.vim 2014-07-21 23:33:30.886823428 +0000 29426 32430 @@ -0,0 +1,83 @@ 29427 32431 +" Vim syntax file … … 29510 32514 diff -Naur vim74.orig/runtime/syntax/netrw.vim vim74/runtime/syntax/netrw.vim 29511 32515 --- vim74.orig/runtime/syntax/netrw.vim 2013-02-25 17:23:59.000000000 +0000 29512 +++ vim74/runtime/syntax/netrw.vim 2014-0 6-01 00:43:08.124162290+000032516 +++ vim74/runtime/syntax/netrw.vim 2014-07-21 23:33:31.230155866 +0000 29513 32517 @@ -1,7 +1,7 @@ 29514 32518 " Language : Netrw Remote-Directory Listing Syntax … … 29556 32560 hi default link netrwHideSep netrwComment 29557 32561 hi default link netrwList Statement 32562 diff -Naur vim74.orig/runtime/syntax/ninja.vim vim74/runtime/syntax/ninja.vim 32563 --- vim74.orig/runtime/syntax/ninja.vim 2013-04-16 20:48:25.000000000 +0000 32564 +++ vim74/runtime/syntax/ninja.vim 2014-07-21 23:33:31.240155840 +0000 32565 @@ -1,10 +1,10 @@ 32566 " ninja build file syntax. 32567 " Language: ninja build file as described at 32568 " http://martine.github.com/ninja/manual.html 32569 -" Version: 1.3 32570 -" Last Change: 2013/04/16 32571 +" Version: 1.4 32572 +" Last Change: 2014/05/13 32573 " Maintainer: Nicolas Weber <nicolasweber@gmx.de> 32574 -" Version 1.3 of this script is in the upstream vim repository and will be 32575 +" Version 1.4 of this script is in the upstream vim repository and will be 32576 " included in the next vim release. If you change this, please send your change 32577 " upstream. 32578 32579 @@ -55,6 +55,7 @@ 32580 " $simple_varname -> variable 32581 " ${varname} -> variable 32582 32583 +syn match ninjaDollar "\$\$" 32584 syn match ninjaWrapLineOperator "\$$" 32585 syn match ninjaSimpleVar "\$[a-zA-Z0-9_-]\+" 32586 syn match ninjaVar "\${[a-zA-Z0-9_.-]\+}" 32587 @@ -70,6 +71,7 @@ 32588 hi def link ninjaKeyword Keyword 32589 hi def link ninjaRuleCommand Statement 32590 hi def link ninjaPoolCommand Statement 32591 +hi def link ninjaDollar ninjaOperator 32592 hi def link ninjaWrapLineOperator ninjaOperator 32593 hi def link ninjaOperator Operator 32594 hi def link ninjaSimpleVar ninjaVar 29558 32595 diff -Naur vim74.orig/runtime/syntax/php.vim vim74/runtime/syntax/php.vim 29559 32596 --- vim74.orig/runtime/syntax/php.vim 2012-12-11 20:15:31.000000000 +0000 29560 +++ vim74/runtime/syntax/php.vim 2014-0 6-01 00:43:08.470828074+000032597 +++ vim74/runtime/syntax/php.vim 2014-07-21 23:33:31.533488407 +0000 29561 32598 @@ -1,7 +1,7 @@ 29562 32599 " Vim syntax file … … 29597 32634 if exists("php_oldStyle") 29598 32635 hi phpIntVar guifg=Red ctermfg=DarkRed 32636 diff -Naur vim74.orig/runtime/syntax/python.vim vim74/runtime/syntax/python.vim 32637 --- vim74.orig/runtime/syntax/python.vim 2013-02-26 17:28:59.000000000 +0000 32638 +++ vim74/runtime/syntax/python.vim 2014-07-21 23:33:31.893487468 +0000 32639 @@ -1,7 +1,7 @@ 32640 " Vim syntax file 32641 " Language: Python 32642 " Maintainer: Neil Schemenauer <nas@python.ca> 32643 -" Last Change: 2013 Feb 26 32644 +" Last Change: 2014 Jul 16 32645 " Credits: Zvezdan Petkovic <zpetkovic@acm.org> 32646 " Neil Schemenauer <nas@python.ca> 32647 " Dmitry Vasiliev 32648 @@ -113,7 +113,7 @@ 32649 syn match pythonEscape "\\x\x\{2}" contained 32650 syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained 32651 " Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/ 32652 -syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained 32653 +syn match pythonEscape "\\N{.\{-}}" contained 32654 syn match pythonEscape "\\$" 32655 32656 if exists("python_highlight_all") 32657 diff -Naur vim74.orig/runtime/syntax/r.vim vim74/runtime/syntax/r.vim 32658 --- vim74.orig/runtime/syntax/r.vim 2013-06-01 21:00:21.000000000 +0000 32659 +++ vim74/runtime/syntax/r.vim 2014-07-21 23:33:31.916820740 +0000 32660 @@ -3,7 +3,7 @@ 32661 " Maintainer: Jakson Aquino <jalvesaq@gmail.com> 32662 " Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com> 32663 " Tom Payne <tom@tompayne.org> 32664 -" Last Change: Sun May 19, 2013 05:59PM 32665 +" Last Change: Wed Jul 09, 2014 10:29PM 32666 " Filenames: *.R *.r *.Rhistory *.Rt 32667 " 32668 " NOTE: The highlighting of R functions is defined in the 32669 @@ -30,14 +30,16 @@ 32670 syn case match 32671 32672 " Comment 32673 -syn match rComment contains=@Spell "#.*" 32674 +syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):" 32675 +syn match rComment contains=@Spell,rCommentTodo "#.*" 32676 32677 " Roxygen 32678 syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)" 32679 syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)" 32680 syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)" 32681 syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)" 32682 -syn match rOKeyword contained "@\(method\|nord\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)" 32683 +syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)" 32684 +syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritsParams\)" 32685 syn match rOComment contains=@Spell,rOKeyword "#'.*" 32686 32687 32688 @@ -119,7 +121,7 @@ 32689 else 32690 syn match rOperator "[|!<>^~`/:]" 32691 endif 32692 -syn match rOperator "%\{2}\|%\S*%" 32693 +syn match rOperator "%\{2}\|%\S\{-}%" 32694 syn match rOpError '\*\{3}' 32695 syn match rOpError '//' 32696 syn match rOpError '&&&' 32697 @@ -164,8 +166,8 @@ 32698 syn keyword rPreProc library require attach detach source 32699 32700 if &filetype == "rhelp" 32701 - syn match rHelpIdent '\\method' 32702 - syn match rHelpIdent '\\S4method' 32703 + syn match rHelpIdent '\\method' 32704 + syn match rHelpIdent '\\S4method' 32705 endif 32706 32707 " Type 32708 @@ -187,6 +189,7 @@ 32709 hi def link rBoolean Boolean 32710 hi def link rBraceError Error 32711 hi def link rComment Comment 32712 +hi def link rCommentTodo Todo 32713 hi def link rOComment Comment 32714 hi def link rComplex Number 32715 hi def link rConditional Conditional 32716 diff -Naur vim74.orig/runtime/syntax/rhelp.vim vim74/runtime/syntax/rhelp.vim 32717 --- vim74.orig/runtime/syntax/rhelp.vim 2011-10-20 14:48:41.000000000 +0000 32718 +++ vim74/runtime/syntax/rhelp.vim 2014-07-21 23:33:32.083486972 +0000 32719 @@ -2,9 +2,7 @@ 32720 " Language: R Help File 32721 " Maintainer: Jakson Aquino <jalvesaq@gmail.com> 32722 " Former Maintainer: Johannes Ranke <jranke@uni-bremen.de> 32723 -" Last Change: Fri Oct 14, 2011 09:54PM 32724 -" Version: 0.7.4 32725 -" SVN: $Id: rhelp.vim 90 2010-11-22 10:58:11Z ranke $ 32726 +" Last Change: Wed Jul 09, 2014 10:28PM 32727 " Remarks: - Includes R syntax highlighting in the appropriate 32728 " sections if an r.vim file is in the same directory or in the 32729 " default debian location. 32730 @@ -23,6 +21,8 @@ 32731 finish 32732 endif 32733 32734 +setlocal iskeyword=@,48-57,_,. 32735 + 32736 syn case match 32737 32738 " R help identifiers {{{1 32739 @@ -51,7 +51,12 @@ 32740 syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method 32741 syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R 32742 syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R 32743 -syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend 32744 + 32745 +if v:version > 703 32746 + syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1<!{.\{-}\\\@1<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend 32747 +else 32748 + syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend 32749 +endif 32750 syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots 32751 syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R 32752 32753 @@ -127,8 +132,13 @@ 32754 syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend 32755 32756 " Verbatim like {{{1 32757 -syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment 32758 -syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment 32759 +if v:version > 703 32760 + syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment 32761 + syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment 32762 +else 32763 + syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment 32764 + syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment 32765 +endif 32766 32767 " Type Styles {{{1 32768 syn match rhelpType "\\emph\>" 32769 @@ -200,6 +210,8 @@ 32770 syn match rhelpCurlyError /[)\]]/ contained 32771 syn match rhelpParenError /[\]}]/ contained 32772 32773 +syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{" 32774 + 32775 " Define the default highlighting {{{1 32776 " For version 5.7 and earlier: only when not done already 32777 " For version 5.8 and later: only when an item doesn't have highlighting yet 32778 @@ -233,4 +245,5 @@ 32779 endif 32780 32781 let b:current_syntax = "rhelp" 32782 -" vim: foldmethod=marker: 32783 + 32784 +" vim: foldmethod=marker sw=2 32785 diff -Naur vim74.orig/runtime/syntax/rmd.vim vim74/runtime/syntax/rmd.vim 32786 --- vim74.orig/runtime/syntax/rmd.vim 1970-01-01 00:00:00.000000000 +0000 32787 +++ vim74/runtime/syntax/rmd.vim 2014-07-21 23:33:32.123486868 +0000 32788 @@ -0,0 +1,87 @@ 32789 +" markdown Text with R statements 32790 +" Language: markdown with R code chunks 32791 +" Last Change: Wed Jul 09, 2014 10:29PM 32792 +" 32793 +" CONFIGURATION: 32794 +" To highlight chunk headers as R code, put in your vimrc: 32795 +" let rmd_syn_hl_chunk = 1 32796 + 32797 +" for portability 32798 +if version < 600 32799 + syntax clear 32800 +elseif exists("b:current_syntax") 32801 + finish 32802 +endif 32803 + 32804 +" load all of pandoc info 32805 +runtime syntax/pandoc.vim 32806 +if exists("b:current_syntax") 32807 + let rmdIsPandoc = 1 32808 + unlet b:current_syntax 32809 +else 32810 + let rmdIsPandoc = 0 32811 + runtime syntax/markdown.vim 32812 + if exists("b:current_syntax") 32813 + unlet b:current_syntax 32814 + endif 32815 +endif 32816 + 32817 +" load all of the r syntax highlighting rules into @R 32818 +syntax include @R syntax/r.vim 32819 +if exists("b:current_syntax") 32820 + unlet b:current_syntax 32821 +endif 32822 + 32823 +if exists("g:rmd_syn_hl_chunk") 32824 + " highlight R code inside chunk header 32825 + syntax match rmdChunkDelim "^[ \t]*```{r" contained 32826 + syntax match rmdChunkDelim "}$" contained 32827 +else 32828 + syntax match rmdChunkDelim "^[ \t]*```{r.*}$" contained 32829 +endif 32830 +syntax match rmdChunkDelim "^[ \t]*```$" contained 32831 +syntax region rmdChunk start="^[ \t]*``` *{r.*}$" end="^[ \t]*```$" contains=@R,rmdChunkDelim keepend fold 32832 + 32833 +" also match and syntax highlight in-line R code 32834 +syntax match rmdEndInline "`" contained 32835 +syntax match rmdBeginInline "`r " contained 32836 +syntax region rmdrInline start="`r " end="`" contains=@R,rmdBeginInline,rmdEndInline keepend 32837 + 32838 +" match slidify special marker 32839 +syntax match rmdSlidifySpecial "\*\*\*" 32840 + 32841 + 32842 +if rmdIsPandoc == 0 32843 + syn match rmdBlockQuote /^\s*>.*\n\(.*\n\@<!\n\)*/ skipnl 32844 + " LaTeX 32845 + syntax include @LaTeX syntax/tex.vim 32846 + if exists("b:current_syntax") 32847 + unlet b:current_syntax 32848 + endif 32849 + " Inline 32850 + syntax match rmdLaTeXInlDelim "\$" 32851 + syntax match rmdLaTeXInlDelim "\\\$" 32852 + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup 32853 + " Region 32854 + syntax match rmdLaTeXRegDelim "\$\$" contained 32855 + syntax match rmdLaTeXRegDelim "\$\$latex$" contained 32856 + syntax region rmdLaTeXRegion start="^\$\$" skip="\\\$" end="\$\$$" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend 32857 + syntax region rmdLaTeXRegion2 start="^\\\[" end="\\\]" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend 32858 + hi def link rmdLaTeXSt Statement 32859 + hi def link rmdLaTeXInlDelim Special 32860 + hi def link rmdLaTeXRegDelim Special 32861 +endif 32862 + 32863 +setlocal iskeyword=@,48-57,_,. 32864 + 32865 +syn sync match rmdSyncChunk grouphere rmdChunk "^[ \t]*``` *{r" 32866 + 32867 +hi def link rmdChunkDelim Special 32868 +hi def link rmdBeginInline Special 32869 +hi def link rmdEndInline Special 32870 +hi def link rmdBlockQuote Comment 32871 +hi def link rmdSlidifySpecial Special 32872 + 32873 +let b:current_syntax = "rmd" 32874 + 32875 +" vim: ts=8 sw=2 32876 diff -Naur vim74.orig/runtime/syntax/rrst.vim vim74/runtime/syntax/rrst.vim 32877 --- vim74.orig/runtime/syntax/rrst.vim 1970-01-01 00:00:00.000000000 +0000 32878 +++ vim74/runtime/syntax/rrst.vim 2014-07-21 23:33:32.563485720 +0000 32879 @@ -0,0 +1,47 @@ 32880 +" reStructured Text with R statements 32881 +" Language: reST with R code chunks 32882 +" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu 32883 +" Last Change: Wed Jul 09, 2014 10:29PM 32884 +" 32885 +" CONFIGURATION: 32886 +" To highlight chunk headers as R code, put in your vimrc: 32887 +" let rrst_syn_hl_chunk = 1 32888 + 32889 +" for portability 32890 +if version < 600 32891 + syntax clear 32892 +elseif exists("b:current_syntax") 32893 + finish 32894 +endif 32895 + 32896 +" load all of the rst info 32897 +runtime syntax/rst.vim 32898 +unlet b:current_syntax 32899 + 32900 +" load all of the r syntax highlighting rules into @R 32901 +syntax include @R syntax/r.vim 32902 + 32903 +setlocal iskeyword=@,48-57,_,. 32904 + 32905 +" highlight R chunks 32906 +if exists("g:rrst_syn_hl_chunk") 32907 + " highlight R code inside chunk header 32908 + syntax match rrstChunkDelim "^\.\. {r" contained 32909 + syntax match rrstChunkDelim "}$" contained 32910 +else 32911 + syntax match rrstChunkDelim "^\.\. {r .*}$" contained 32912 +endif 32913 +syntax match rrstChunkDelim "^\.\. \.\.$" contained 32914 +syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold 32915 + 32916 +" also highlight in-line R code 32917 +syntax match rrstInlineDelim "`" contained 32918 +syntax match rrstInlineDelim ":r:" contained 32919 +syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend 32920 + 32921 +hi def link rrstChunkDelim Special 32922 +hi def link rrstInlineDelim Special 32923 + 32924 +let b:current_syntax = "rrst" 32925 + 32926 +" vim: ts=8 sw=2 29599 32927 diff -Naur vim74.orig/runtime/syntax/rst.vim vim74/runtime/syntax/rst.vim 29600 32928 --- vim74.orig/runtime/syntax/rst.vim 2013-06-04 14:41:25.000000000 +0000 29601 +++ vim74/runtime/syntax/rst.vim 2014-0 6-01 00:43:09.164159642+000032929 +++ vim74/runtime/syntax/rst.vim 2014-07-21 23:33:32.570152369 +0000 29602 32930 @@ -1,7 +1,7 @@ 29603 32931 " Vim syntax file … … 29620 32948 diff -Naur vim74.orig/runtime/syntax/sh.vim vim74/runtime/syntax/sh.vim 29621 32949 --- vim74.orig/runtime/syntax/sh.vim 2013-07-05 16:35:45.000000000 +0000 29622 +++ vim74/runtime/syntax/sh.vim 2014-0 6-01 00:43:09.417492330+000032950 +++ vim74/runtime/syntax/sh.vim 2014-07-21 23:33:33.180150777 +0000 29623 32951 @@ -2,10 +2,10 @@ 29624 32952 " Language: shell (sh) Korn shell (ksh) bash (sh) … … 29738 33066 diff -Naur vim74.orig/runtime/syntax/spec.vim vim74/runtime/syntax/spec.vim 29739 33067 --- vim74.orig/runtime/syntax/spec.vim 2010-05-15 11:03:57.000000000 +0000 29740 +++ vim74/runtime/syntax/spec.vim 2014-0 6-01 00:43:09.717491566+000033068 +++ vim74/runtime/syntax/spec.vim 2014-07-21 23:33:33.780149212 +0000 29741 33069 @@ -1,8 +1,9 @@ 29742 33070 " Filename: spec.vim … … 29773 33101 diff -Naur vim74.orig/runtime/syntax/svn.vim vim74/runtime/syntax/svn.vim 29774 33102 --- vim74.orig/runtime/syntax/svn.vim 2012-07-25 13:08:55.000000000 +0000 29775 +++ vim74/runtime/syntax/svn.vim 2014-0 6-01 00:43:09.984157553+000033103 +++ vim74/runtime/syntax/svn.vim 2014-07-21 23:33:34.856813069 +0000 29776 33104 @@ -2,15 +2,18 @@ 29777 33105 " Language: Subversion (svn) commit file … … 29838 33166 diff -Naur vim74.orig/runtime/syntax/systemverilog.vim vim74/runtime/syntax/systemverilog.vim 29839 33167 --- vim74.orig/runtime/syntax/systemverilog.vim 1970-01-01 00:00:00.000000000 +0000 29840 +++ vim74/runtime/syntax/systemverilog.vim 2014-0 6-01 00:43:10.054157375+000033168 +++ vim74/runtime/syntax/systemverilog.vim 2014-07-21 23:33:34.916812912 +0000 29841 33169 @@ -0,0 +1,101 @@ 29842 33170 +" Vim syntax file … … 29943 33271 diff -Naur vim74.orig/runtime/syntax/tcl.vim vim74/runtime/syntax/tcl.vim 29944 33272 --- vim74.orig/runtime/syntax/tcl.vim 2010-05-15 11:03:56.000000000 +0000 29945 +++ vim74/runtime/syntax/tcl.vim 2014-0 6-01 00:43:10.170823745+000033273 +++ vim74/runtime/syntax/tcl.vim 2014-07-21 23:33:35.043479248 +0000 29946 33274 @@ -6,11 +6,9 @@ 29947 33275 " (previously Matt Neumann <mattneu@purpleturtle.com>) … … 30078 33406 diff -Naur vim74.orig/runtime/syntax/tex.vim vim74/runtime/syntax/tex.vim 30079 33407 --- vim74.orig/runtime/syntax/tex.vim 2013-07-05 16:35:45.000000000 +0000 30080 +++ vim74/runtime/syntax/tex.vim 2014-0 6-01 00:43:10.227490267+000033408 +++ vim74/runtime/syntax/tex.vim 2014-07-21 23:33:35.256812025 +0000 30081 33409 @@ -1,8 +1,8 @@ 30082 33410 " Vim syntax file … … 30221 33549 diff -Naur vim74.orig/runtime/syntax/upstreamlog.vim vim74/runtime/syntax/upstreamlog.vim 30222 33550 --- vim74.orig/runtime/syntax/upstreamlog.vim 2013-08-03 15:47:26.000000000 +0000 30223 +++ vim74/runtime/syntax/upstreamlog.vim 2014-0 6-01 00:43:10.500822905+000033551 +++ vim74/runtime/syntax/upstreamlog.vim 2014-07-21 23:33:35.950143549 +0000 30224 33552 @@ -1,7 +1,7 @@ 30225 33553 " Vim syntax file … … 30250 33578 diff -Naur vim74.orig/runtime/syntax/usserverlog.vim vim74/runtime/syntax/usserverlog.vim 30251 33579 --- vim74.orig/runtime/syntax/usserverlog.vim 2013-08-03 15:47:26.000000000 +0000 30252 +++ vim74/runtime/syntax/usserverlog.vim 2014-0 6-01 00:43:10.510822879+000033580 +++ vim74/runtime/syntax/usserverlog.vim 2014-07-21 23:33:35.960143523 +0000 30253 33581 @@ -1,7 +1,7 @@ 30254 33582 " Vim syntax file … … 30279 33607 diff -Naur vim74.orig/runtime/syntax/usw2kagtlog.vim vim74/runtime/syntax/usw2kagtlog.vim 30280 33608 --- vim74.orig/runtime/syntax/usw2kagtlog.vim 2013-08-03 15:47:26.000000000 +0000 30281 +++ vim74/runtime/syntax/usw2kagtlog.vim 2014-0 6-01 00:43:10.510822879+000033609 +++ vim74/runtime/syntax/usw2kagtlog.vim 2014-07-21 23:33:35.963476848 +0000 30282 33610 @@ -1,7 +1,7 @@ 30283 33611 " Vim syntax file … … 30308 33636 diff -Naur vim74.orig/runtime/syntax/vhdl.vim vim74/runtime/syntax/vhdl.vim 30309 33637 --- vim74.orig/runtime/syntax/vhdl.vim 2012-06-01 16:05:47.000000000 +0000 30310 +++ vim74/runtime/syntax/vhdl.vim 2014-0 6-01 00:43:10.607489300+000033638 +++ vim74/runtime/syntax/vhdl.vim 2014-07-21 23:33:36.056809938 +0000 30311 33639 @@ -1,12 +1,12 @@ 30312 33640 " Vim syntax file … … 30462 33790 diff -Naur vim74.orig/runtime/syntax/vim.vim vim74/runtime/syntax/vim.vim 30463 33791 --- vim74.orig/runtime/syntax/vim.vim 2013-07-05 16:35:45.000000000 +0000 30464 +++ vim74/runtime/syntax/vim.vim 2014-0 6-01 00:43:10.670822472 +000033792 +++ vim74/runtime/syntax/vim.vim 2014-07-21 23:33:36.110143132 +0000 30465 33793 @@ -1,8 +1,8 @@ 30466 33794 " Vim syntax file … … 30567 33895 diff -Naur vim74.orig/runtime/syntax/yacc.vim vim74/runtime/syntax/yacc.vim 30568 33896 --- vim74.orig/runtime/syntax/yacc.vim 2012-11-15 01:25:58.000000000 +0000 30569 +++ vim74/runtime/syntax/yacc.vim 2014-0 6-01 00:43:11.070821453+000033897 +++ vim74/runtime/syntax/yacc.vim 2014-07-21 23:33:36.570141932 +0000 30570 33898 @@ -1,8 +1,8 @@ 30571 33899 " Vim syntax file … … 30590 33918 diff -Naur vim74.orig/runtime/syntax/yaml.vim vim74/runtime/syntax/yaml.vim 30591 33919 --- vim74.orig/runtime/syntax/yaml.vim 2010-10-08 13:33:39.000000000 +0000 30592 +++ vim74/runtime/syntax/yaml.vim 2014-0 6-01 00:43:11.080821428+000033920 +++ vim74/runtime/syntax/yaml.vim 2014-07-21 23:33:36.576808581 +0000 30593 33921 @@ -108,9 +108,10 @@ 30594 33922 syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter … … 30606 33934 diff -Naur vim74.orig/runtime/tutor/tutor vim74/runtime/tutor/tutor 30607 33935 --- vim74.orig/runtime/tutor/tutor 2012-10-03 13:29:40.000000000 +0000 30608 +++ vim74/runtime/tutor/tutor 2014-0 6-01 00:43:11.947485887+000033936 +++ vim74/runtime/tutor/tutor 2014-07-21 23:33:36.940140966 +0000 30609 33937 @@ -55,8 +55,8 @@ 30610 33938 2. Type: :q! <ENTER>. … … 30620 33948 diff -Naur vim74.orig/runtime/tutor/tutor.es vim74/runtime/tutor/tutor.es 30621 33949 --- vim74.orig/runtime/tutor/tutor.es 2010-05-15 11:04:02.000000000 +0000 30622 +++ vim74/runtime/tutor/tutor.es 2014-0 6-01 00:43:12.157485353 +000033950 +++ vim74/runtime/tutor/tutor.es 2014-07-21 23:33:37.110140523 +0000 30623 33951 @@ -121,7 +121,7 @@ 30624 33952 h (izquierda) j (abajo) k (arriba) l (derecha) … … 30632 33960 diff -Naur vim74.orig/runtime/tutor/tutor.it vim74/runtime/tutor/tutor.it 30633 33961 --- vim74.orig/runtime/tutor/tutor.it 2010-05-23 09:00:00.000000000 +0000 30634 +++ vim74/runtime/tutor/tutor.it 2014-0 6-01 00:43:12.324151595+000033962 +++ vim74/runtime/tutor/tutor.it 2014-07-21 23:33:37.230140209 +0000 30635 33963 @@ -638,7 +638,7 @@ 30636 33964 NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto … … 30644 33972 diff -Naur vim74.orig/runtime/tutor/tutor.it.utf-8 vim74/runtime/tutor/tutor.it.utf-8 30645 33973 --- vim74.orig/runtime/tutor/tutor.it.utf-8 2010-05-23 10:11:46.000000000 +0000 30646 +++ vim74/runtime/tutor/tutor.it.utf-8 2014-0 6-01 00:43:12.337484894+000033974 +++ vim74/runtime/tutor/tutor.it.utf-8 2014-07-21 23:33:37.246806833 +0000 30647 33975 @@ -638,7 +638,7 @@ 30648 33976 NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto … … 30656 33984 diff -Naur vim74.orig/runtime/tutor/tutor.pt vim74/runtime/tutor/tutor.pt 30657 33985 --- vim74.orig/runtime/tutor/tutor.pt 2010-08-11 20:54:33.000000000 +0000 30658 +++ vim74/runtime/tutor/tutor.pt 2014-0 6-01 00:43:12.544151035+000033986 +++ vim74/runtime/tutor/tutor.pt 2014-07-21 23:33:37.463472934 +0000 30659 33987 @@ -58,11 +58,11 @@ 30660 33988 Isso sai do editor SEM salvar qualquer mudança que tenha sido feita. … … 30683 34011 diff -Naur vim74.orig/runtime/tutor/tutor.pt.utf-8 vim74/runtime/tutor/tutor.pt.utf-8 30684 34012 --- vim74.orig/runtime/tutor/tutor.pt.utf-8 2010-08-11 20:54:33.000000000 +0000 30685 +++ vim74/runtime/tutor/tutor.pt.utf-8 2014-0 6-01 00:43:12.567484309+000034013 +++ vim74/runtime/tutor/tutor.pt.utf-8 2014-07-21 23:33:37.470139583 +0000 30686 34014 @@ -58,11 +58,11 @@ 30687 34015 Isso sai do editor SEM salvar qualquer mudança que tenha sido feita. … … 30708 34036 30709 34037 3. Agora digite :s/aa/a/g significando substituir globalmente na linha. 34038 diff -Naur vim74.orig/runtime/tutor/tutor.sr.cp1250 vim74/runtime/tutor/tutor.sr.cp1250 34039 --- vim74.orig/runtime/tutor/tutor.sr.cp1250 1970-01-01 00:00:00.000000000 +0000 34040 +++ vim74/runtime/tutor/tutor.sr.cp1250 2014-07-21 23:33:37.566805998 +0000 34041 @@ -0,0 +1,971 @@ 34042 +=============================================================================== 34043 += D o b r o d o l i u VIM p r i r u è n i k - Verzija 1.7 = 34044 +=============================================================================== 34045 + 34046 + Vim je moæan editor sa mnogo komandi, suvie da bismo ih ovde sve 34047 + opisali. Priruènik je zamiljen da opie dovoljno komandi da biste 34048 + mogli lagodno da koristite Vim kao editor opte namene. 34049 + 34050 + Priblino vreme potrebno za uspean zavretak priruènika je izmeðu 34051 + 25 i 30 minuta, u zavisnosti od vremena potroenog na vebu. 34052 + 34053 + UPOZORENJE: 34054 + Komande u lekcijama æe menjati tekst. Iskopirajte ovaj fajl i 34055 + vebajte na kopiji (ako ste pokrenuli "vimtutor" ovo je veæ kopija). 34056 + 34057 + Vano je upamtiti da je ovaj priruènik zamiljen za aktivnu vebu. 34058 + To znaèi da morate upotrebljavati komande o kojima èitate da biste 34059 + ih nauèili. Ako samo èitate tekst, zaboraviæete komande! 34060 + 34061 + Ako je Caps Lock ukljuèen ISKLJUÈITE ga. Pritisnite taster j dovoljno 34062 + puta da lekcija 1.1 cela stane na ekran. 34063 + 34064 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34065 + Lekcija 1.1: POMERANJE KURSORA 34066 + 34067 + 34068 + ** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano ** 34069 + ^ 34070 + k Savet: h je s leve strane i pomera kursor u levo. 34071 + < h l > l je s desne strane i pomera kursor u desno. 34072 + j j izgleda kao strelica nanie. 34073 + v 34074 + 1. Pomerajte kursor po ekranu dok se ne naviknete na komande. 34075 + 34076 + 2. Pritisnite taster (j) dok ne poène da se ponavlja. 34077 + Sada znate kako da doðete do naredne lekcije. 34078 + 34079 + 3. Koristeæi taster j preðite na lekciju 1.2. 34080 + 34081 +NAPOMENA: Ako niste sigurni ta ste zapravo pritisnuli, pritisnite <ESC> 34082 + za prelazak u Normal mod i pokuajte ponovo. 34083 + 34084 +NAPOMENA: Strelice takoðe pomeraju kursor, ali koriæenje tastera hjkl je 34085 + znatno bre, kad se jednom naviknete na njih. Zaista! 34086 + 34087 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34088 + Lekcija 1.2: IZLAZAK IZ VIM-a 34089 + 34090 + 34091 + !! UPOZORENJE: Pre izvoðenja bilo kog koraka, proèitajte celu lekciju!! 34092 + 34093 + 1. Pritisnite <ESC> (editor je sada u Normal modu). 34094 + 34095 + 2. Otkucajte: :q! <ENTER>. 34096 + Ovime se izlazi iz editora, sa GUBITKOM svih izmena. 34097 + 34098 + 3. Kada se pojavi komandni prompt, unesite komandu koja je pokrenula 34099 + ovaj priruènik: vimtutor <ENTER> 34100 + 34101 + 4. Ako ste upamtili ove korake, izvrite ih redom od 1 do 3 da biste 34102 + izali iz editora i ponovo ga pokrenuli. 34103 + 34104 +NAPOMENA: :q! <ENTER> ponitava sve izmene koje ste napravili. 34105 + U narednim lekcijama nauèiæete kako da saèuvate izmene. 34106 + 34107 + 5. Pomerite kursor na lekciju 1.3. 34108 + 34109 + 34110 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34111 + Lekcija 1.3: IZMENA TEKSTA - BRISANJE 34112 + 34113 + 34114 + ** Pritisnite x za brisanje znaka pod kursorom. ** 34115 + 34116 + 1. Pomerite kursor na red oznaèen sa --->. 34117 + 34118 + 2. Da biste ispravili greke, pomerajte kursor dok se 34119 + ne naðe na slovu koje treba izbrisati. 34120 + 34121 + 3. Pritisnite taster x da izbriete neeljeno slovo. 34122 + 34123 + 4. Ponavljajte korake od 2 do 4 dok ne ispravite sve greke. 34124 + 34125 +---> RRRibaa riibi grizzze rrreepp. 34126 + 34127 + 5. Kad ispravite red, preðite na lekciju 1.4. 34128 + 34129 +NAPOMENA: Dok koristite priruènik, nemojte uèiti komande napamet, 34130 + veæ vebajte njihovu primenu. 34131 + 34132 + 34133 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34134 + Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE 34135 + 34136 + 34137 + ** Pritisnite i za ubacivanje teksta ispred kursora. ** 34138 + 34139 + 1. Pomerite kursor na prvi sledeæi red oznaèen sa --->. 34140 + 34141 + 2. Da biste tekst prvog reda izjednaèili s tekstom drugog, namestite 34142 + kursor na prvi znak POSLE kog æete ubaciti potreban tekst. 34143 + 34144 + 3. Pritisnite i pa unesite potrebne dopune. 34145 + 34146 + 4. Po ispravci svake greke pritisnite <ESC> da se vratite u Normal mod. 34147 + Ponovite korake od 2 do 4 da biste ispravili celu reèenicu. 34148 + 34149 +---> Do teka neoje v red. 34150 +---> Deo teksta nedostaje iz ovog reda. 34151 + 34152 + 5. Preðite na sledeæu lekciju. 34153 + 34154 + 34155 + 34156 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34157 + Lekcija 1.5: IZMENA TEKSTA - DODAVANJE 34158 + 34159 + 34160 + ** Pritisnite A za dodavanje teksta. ** 34161 + 34162 + 1. Pomerite kursor na prvi sledeæi red oznaèen sa --->. 34163 + Nije vano gde se nalazi kursor u tom redu. 34164 + 34165 + 2. Pritisnite A i unesite dodatni tekst. 34166 + 34167 + 3. Poto ste dodali tekst, pritisnite <ESC> za povratak u 34168 + Normal mod. 34169 + 34170 + 4. Pomerite kursor na drugi red oznaèen sa ---> i ponavljajte 34171 + korake 2 i 3 dok ne ispravite tekst. 34172 + 34173 +---> Deo teksta nedostaje u 34174 + Deo teksta nedostaje u ovom redu. 34175 +---> Deo teksta nedostaje 34176 + Deo teksta nedostaje i ovde. 34177 + 34178 + 5. Preðite na lekciju 1.6. 34179 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34180 + Lekcija 1.6: IZMENA FAJLA 34181 + 34182 + 34183 + ** Upotrebite :wq za snimanje teksta i izlazak iz editora. ** 34184 + 34185 + !! UPOZORENJE: Pre izvoðenja bilo kog koraka, proèitajte celu lekciju!! 34186 + 34187 + 1. Izaðite iz editora kao u lekciji 1.2: :q! 34188 + 34189 + 2. Na komandnom promptu unesite sledeæu komandu: vim tutor <ENTER> 34190 + 'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji 34191 + elite da menjate. Koristite fajl koji imate pravo da menjate. 34192 + 34193 + 3. Ubacujte i briite tekst kao u prethodnim lekcijama. 34194 + 34195 + 4. Snimite izmenjeni tekst i izaðite iz Vim-a: :wq <ENTER> 34196 + 34197 + 5. Ponovo pokrenite vimtutor i proèitajte rezime koji sledi. 34198 + 34199 + 6. Poto proèitate korake iznad i u potpunosti ih razumete: 34200 + izvrite ih. 34201 + 34202 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34203 + REZIME lekcije 1 34204 + 34205 + 34206 + 1. Kursor se pomera strelicama ili pomoæu tastera hjkl . 34207 + h (levo) j (dole) k (gore) l (desno) 34208 + 34209 + 2. Za pokretanje Vim-a iz shell-a: vim IME_FAJLA <ENTER> 34210 + 34211 + 3. Izlaz: <ESC> :q! <ENTER> sve promene su izgubljene. 34212 + ILI: <ESC> :wq <ENTER> promene su saèuvane. 34213 + 34214 + 4. Brisanje znaka na kome se nalazi kursor: x 34215 + 34216 + 5. Ubacivanja ili dodavanje teksta: 34217 + i unesite tekst <ESC> unos ispred kursora 34218 + A unesite tekst <ESC> dodavanje na kraju reda 34219 + 34220 +NAPOMENA: Pritiskom na <ESC> prebacujete Vim u Normal mod i 34221 + prekidate neeljenu ili delimièno izvrenu komandu. 34222 + 34223 +Nastavite sa lekcijom 2. 34224 + 34225 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34226 + Lekcija 2.1: NAREDBE BRISANJA 34227 + 34228 + 34229 + ** Otkucajte dw za brisanje reèi. ** 34230 + 34231 + 1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu. 34232 + 34233 + 2. Pomerite kursor na red oznaèen sa --->. 34234 + 34235 + 3. Pomerite kursor na poèetak reèi koju treba izbrisati. 34236 + 34237 + 4. Otkucajte dw da biste uklonili reè. 34238 + 34239 +NAPOMENA: Slovo d æe se pojaviti na dnu ekrana kad ga otkucate. Vim èeka 34240 + da otkucate w . Ako je prikazano neko drugo slovo, pogreili ste u 34241 + kucanju; pritisnite <ESC> i pokuajte ponovo. (Ako se ne pojavi 34242 + nita, moda je iskljuèena opcija 'showcmd': vidi lekciju 6.5.) 34243 + 34244 +---> Neke reèi smeno ne pripadaju na papir ovoj reèenici. 34245 + 34246 + 5. Ponavljajte korake 3 i 4 dok ne ispravite reèenicu, pa 34247 + preðite na lekciju 2.2. 34248 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34249 + Lekcija 2.2: JO BRISANJA 34250 + 34251 + 34252 + ** Otkucajte d$ za brisanje znakova do kraja reda. ** 34253 + 34254 + 1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu. 34255 + 34256 + 2. Pomerite kursor na red oznaèen sa --->. 34257 + 34258 + 3. Pomerite kursor do kraja ispravnog dela reèenice 34259 + (POSLE prve . ). 34260 + 34261 + 4. Otkucajte d$ za brisanje ostatka reda. 34262 + 34263 +---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput. 34264 + 34265 + 5. Preðite na lekciju 2.3 za podrobnije objanjenje. 34266 + 34267 + 34268 + 34269 + 34270 + 34271 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34272 + Lekcija 2.3: O OPERATORIMA I POKRETIMA 34273 + 34274 + 34275 + Mnoge komande za izmenu teksta sastoje se od operatora i pokreta. 34276 + Oblik komande brisanja sa d operatorom je sledeæi: 34277 + 34278 + d pokret 34279 + 34280 + Pri èemu je: 34281 + d - operator brisanja. 34282 + pokret - ono na èemu æe se operacija izvravati (opisano u nastavku). 34283 + 34284 + Kratak spisak pokreta: 34285 + w - sve do poèetka sledeæe reèi, NE UKLJUÈUJUÆI prvo slovo. 34286 + e - sve do kraja tekuæe reèi, UKLJUÈUJUÆI poslednje slovo. 34287 + $ - sve do kraje reda, UKLJUÈUJUÆI poslednje slovo. 34288 + 34289 + Kucanjem de brisaæe se tekst od kursora do kraja reèi. 34290 + 34291 +NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez 34292 + operatora, kursor se pomera kao to je opisano. 34293 + 34294 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34295 + Lekcija 2.4: KORIÆENJE BROJANJA ZA POKRETE 34296 + 34297 + 34298 + ** Unoenjem nekog broja pre pokreta, pokret se izvrava taj broj puta. ** 34299 + 34300 + 1. Pomerite kursor na red oznaèen sa --->. 34301 + 34302 + 2. Otkucajte 2w da pomerite kursor dve reèi napred. 34303 + 34304 + 3. Otkucajte 3e da pomerite kursor na kraj treæe reèi napred. 34305 + 34306 + 4. Otkucajte 0 (nulu) da pomerite kursor na poèetak reda. 34307 + 34308 + 5. Ponovite korake 2 i 3 s nekim drugim brojevima. 34309 + 34310 +---> Reèenica sa reèima po kojoj moete pomerati kursor. 34311 + 34312 + 6. Preðite na lekciju 2.5. 34313 + 34314 + 34315 + 34316 + 34317 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34318 + Lekcija 2.5: KORIÆENJE BROJANJA ZA VEÆE BRISANJE 34319 + 34320 + 34321 + ** Unoenje nekog broja s operatorom ponavlja operator taj broj puta. ** 34322 + 34323 + U kombinaciji operatora brisanja s pokretima spomenutim iznad 34324 + moete uneti broj pre pokreta da biste izbrisali vie znakova: 34325 + 34326 + d broj pokret 34327 + 34328 + 1. Pomerite kursor na prvo slovo u reèi s VELIKIM SLOVIMA u redu 34329 + oznaèenom sa --->. 34330 + 34331 + 2. Otkucajte d2w da izbriete dve reèi sa VELIKIM SLOVIMA 34332 + 34333 + 3. Ponovite korake 1 i 2 sa razlièitim brojevima da izbriete 34334 + uzastopne reèi sa VELIKIM SLOVIMA koriæenjem samo jedne komande. 34335 + 34336 +---> ovaj ABCÈÆ DÐE red FGHI JK LMN OP s reèima je RS TUVZ ispravljen. 34337 + 34338 + 34339 + 34340 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34341 + Lekcija 2.6: OPERACIJE NAD REDOVIMA 34342 + 34343 + 34344 + ** Otkucajte dd za brisanje celog reda. ** 34345 + 34346 + Zbog uèestalosti brisanja celih redova, autori Vi-ja odluèili su da 34347 + je lake brisati redove ako se otkuca d dvaput. 34348 + 34349 + 1. Pomerite kursor na drugi red u donjoj strofi. 34350 + 2. Otkucajte dd da ga izbriete. 34351 + 3. Pomerite kursor na èetvrti red. 34352 + 4. Otkucajte 2dd da biste izbrisali dva reda. 34353 + 34354 +---> 1) Sedlo mi je od marame, 34355 +---> 2) blato na sve strane, 34356 +---> 3) uzda od kanapa, 34357 +---> 4) auto mi je ovde, 34358 +---> 5) satovi pokazuju vreme, 34359 +---> 6) a biè mi je od oèina 34360 +---> 7) prebijena tapa. 34361 + 34362 + 34363 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34364 + Lekcija 2.7: PONITAVANJE PROMENA 34365 + 34366 + 34367 + ** Pritisnite u za ponitavanje poslednje komande, U za ceo red. ** 34368 + 34369 + 1. Pomerite kursor na red oznaèen sa ---> i postavite ga na mesto 34370 + prve greke. 34371 + 2. Otkucajte x da izbriete prvi neeljeni znak. 34372 + 3. Otkucajte u da ponitite poslednju izvrenu komandu. 34373 + 4. Sad ispravite sve greke u redu koristeæi komandu x . 34374 + 5. Otkucajte veliko U da biste vratili sadraj reda u prvobitno 34375 + stanje. 34376 + 6. Onda otkucajte u nekoliko puta da biste ponitili U 34377 + i prethodne komande. 34378 + 7. Sad otkucajte CTRL-R (dreæi CTRL dok pritiskate R) 34379 + nekoliko puta da biste vratili izmene (ponitili ponitavanja). 34380 + 34381 +---> Iiisspravite greke uu ovvom redu ii poonititeee ih. 34382 + 34383 + 8. Ovo su veoma korisne komande. Preðite na rezime lekcije 2. 34384 + 34385 + 34386 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34387 + REZIME lekcije 2 34388 + 34389 + 34390 + 1. Brisanje od kursora do sledeæe reèi: dw 34391 + 2. Brisanje od kursora do kraja reda: d$ 34392 + 3. Brisanje celog reda: dd 34393 + 34394 + 4. Za ponavljanje pokreta prethodno unesite broj: 2w 34395 + 5. Oblik komande za izmenu: 34396 + operator [broj] pokret 34397 + gde je: 34398 + operator - ta uraditi, recimo d za brisanje 34399 + [broj] - neobavezan broj ponavljanja pokreta 34400 + pokret - kretanje po tekstu na kome se radi, 34401 + kao to je: w (reè), $ (kraj reda), itd. 34402 + 34403 + 6. Pomeranje kursora na poèetak reda: 0 34404 + 34405 + 7. Za ponitavanje prethodnih izmena, pritisnite: u (malo u) 34406 + Za ponitavanje svih promena u redu, pritisnite: U (veliko U) 34407 + Za vraæanja promena, otkucajte: CTRL-R 34408 + 34409 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34410 + Lekcija 3.1: KOMANDA POSTAVLJANJA 34411 + 34412 + 34413 + ** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. ** 34414 + 34415 + 1. Pomerite kursor na prvi sledeæi red oznaèen sa --->. 34416 + 34417 + 2. Otkucajte dd da izbriete red i smestite ga u Vim registar. 34418 + 34419 + 3. Pomerite kursor na red c), IZNAD mesta gde treba postaviti izbrisan red. 34420 + 34421 + 4. Otkucajte p da postavite red ispod kursora. 34422 + 34423 + 5. Ponavljajte korake 2 do 4 da biste postavili sve linije u pravilnom 34424 + redosledu. 34425 + 34426 +---> d) prebijena tapa. 34427 +---> b) uzda od kanapa, 34428 +---> c) a biè mi je od oèina 34429 +---> a) Sedlo mi je od marame, 34430 + 34431 + 34432 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34433 + Lekcija 3.2: KOMANDA ZAMENE 34434 + 34435 + 34436 + ** Otkucajte rx da zamenite znak ispod kursora slovom x . ** 34437 + 34438 + 1. Pomerite kursor na prvi sledeæi red oznaèen sa --->. 34439 + 34440 + 2. Pomerite kursor tako da se nalazi na prvoj greci. 34441 + 34442 + 3. Otkucajte r i onda znak koji treba da tu stoji. 34443 + 34444 + 4. Ponavljajte korake 2 i 3 sve dok prvi red ne bude 34445 + isti kao drugi. 34446 + 34447 +---> Kedi ju ovej red ugaen, nako je protresao pustane testere! 34448 +---> Kada je ovaj red unoen, neko je pritiskao pogrene tastere! 34449 + 34450 + 5. Preðite na lekciju 3.2. 34451 + 34452 +NAPOMENA: Setite se da treba da uèite vebanjem, ne pamæenjem. 34453 + 34454 + 34455 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34456 + Lekcija 3.3: OPERATOR IZMENE 34457 + 34458 + 34459 + ** Za izmenu teksta do kraja reèi, otkucajte ce .** 34460 + 34461 + 1. Pomerite kursor na prvi sledeæi red oznaèen sa --->. 34462 + 34463 + 2. Postavite kursor na a u rakdur. 34464 + 34465 + 3. Otkucajte ce i ispravite reè (u ovom sluèaju otkucajte ed ). 34466 + 34467 + 4. Pritisnite <ESC> i pomerite kursor na sledeæi znak koji 34468 + treba ispraviti. 34469 + 34470 + 5. Ponavljajte korake 3 i 4 sve dok prva reèenica ne bude ista 34471 + kao druga. 34472 + 34473 +---> Ovaj rakdur ima nekoliko rejga koje treflja isprpikati operagrom izmene. 34474 +---> Ovaj red ima nekoliko reèi koje treba ispraviti operatorom izmene. 34475 + 34476 +Uoèite da ce brie reè i postavlja editor u Insert mod. 34477 + 34478 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34479 + Lekcija 3.4: DALJE IZMENE UPOTREBOM c 34480 + 34481 + 34482 + ** Komanda izmene se koristi sa istim pokretima kao i brisanje. ** 34483 + 34484 + 1. Operator izmene se koristi na isti naèin kao i operator brisanja: 34485 + 34486 + c [broj] pokret 34487 + 34488 + 2. Pokreti su isti, recimo: w (reè) i $ (kraj reda). 34489 + 34490 + 3. Pomerite kursor na prvi sledeæi red oznaèen sa --->. 34491 + 34492 + 4. Pomerite kursor na prvu greku. 34493 + 34494 + 5. Otkucajte c$ i unesite ostatak reda tako da bude isti kao 34495 + drugi red, pa pritisnite <ESC>. 34496 + 34497 +---> Kraj ovog reda treba izmeniti tako da izgleda kao red ispod. 34498 +---> Kraj ovog reda treba ispraviti koriæenjem c$ komande. 34499 + 34500 +NAPOMENA: Za ispravljanje greaka moete koristiti Backspace . 34501 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34502 + REZIME lekcije 3 34503 + 34504 + 34505 + 1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo 34506 + postavlja tekst IZA kursora (ako je bio izbrisan jedan ili vie redova 34507 + sadraj æe doæi na red ispod kursora). 34508 + 34509 + 2. Za zamenu znaka na kome se nalazi kursor, pritisnite r i onda 34510 + eljeni znak. 34511 + 34512 + 3. Operator izmene dozvoljava promenu teksta od kursora do pozicije gde 34513 + se zavrava pokret. Primera radi, kucajte ce za izmenu od kursora do 34514 + kraja reèi, ili c$ za izmenu od kursora do kraja reda. 34515 + 34516 + 4. Oblik operacije izmene je: 34517 + 34518 + c [broj] pokret 34519 + 34520 +Preðite na narednu lekciju. 34521 + 34522 + 34523 + 34524 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34525 + Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA 34526 + 34527 + ** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla. 34528 + Pritisnite G za pomeranje kursora na neki red u tekstu. ** 34529 + 34530 +NAPOMENA: Proèitajte celu lekciju pre izvoðenja bilo kog koraka!! 34531 + 34532 + 1. Drite taster CTRL i pritisnite g . Ovo zovemo CTRL-G. 34533 + Editor æe na dnu ekrana ispisati poruku sa imenom fajla i pozicijom 34534 + kursora u tekstu. Zapamtite broj reda za 3. korak. 34535 + 34536 +NAPOMENA: U donjem desnom uglu moe se videti poziciju kursora ako je 34537 + ukljuèena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.) 34538 + 34539 + 2. Pritisnite G za pomeranje kursora na kraj teksta. 34540 + Pritisnite 1G ili gg za pomranje kursora na poèetak teksta. 34541 + 34542 + 3. Otkucajte broj reda na kome ste malopre bili i onda G . Kursor 34543 + æe se vratiti na red na kome je bio kad ste otkucali CTRL-G. 34544 + 34545 + 4. Ako ste spremni, izvrite korake od 1 do 3. 34546 + 34547 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34548 + Lekcija 4.2: KOMANDE PRETRAIVANJA 34549 + 34550 + ** Otkucajte / i onda izraz koji elite da potraite. ** 34551 + 34552 + 1. U Normal modu otkucajte znak / . Primietite da se znak pojavio 34553 + zajedno sa kursorom na dnu ekrana kao i kod komande : . 34554 + 34555 + 2. Sada otkucajte 'grrreka' <ENTER>. (Bez razmaka i navodnika.) 34556 + To je reè koju traite. 34557 + 34558 + 3. Za ponovno traenje istog izraza, otkucajte n . 34559 + Za traenje istog izraza u suprotnom smeru, otkucajte N . 34560 + 34561 + 4. Za traenje izraza unatrag, koristite ? umesto / . 34562 + 34563 + 5. Za povratak na prethodnu poziciju otkucajte CTRL-O (drite CTRL dok 34564 + pritiskate O ). Ponavljajte za ranije pozicije. CTRL-I ide napred. 34565 + 34566 +---> "grrreka" je pogreno; umesto grrreka treba da stoji greka. 34567 + 34568 +NAPOMENA: Ako pretraga doðe do kraja teksta traenje æe se nastaviti od 34569 + njegovog poèetka osim ako je opcija 'wrapscan' iskljuèena. 34570 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34571 + Lekcija 4.3: TRAENJE PARA ZAGRADE 34572 + 34573 + 34574 + ** Otkucajte % za nalaenje para ), ] ili } . ** 34575 + 34576 + 1. Postavite kursor na bilo koju od ( , [ ili { 34577 + otvorenih zagrada u redu oznaèenom sa --->. 34578 + 34579 + 2. Otkucajte znak % . 34580 + 34581 + 3. Kursor æe se pomeriti na odgovarajuæu zatvorenu zagradu. 34582 + 34583 + 4. Otkucajte % da pomerite kursor na prvu zagradu u paru. 34584 + 34585 + 5. Pomerite kursor na neku od (,),[,],{ ili } i ponovite komandu % . 34586 + 34587 +---> Red ( testiranja obiènih ( [ uglastih ] i { vitièastih } zagrada.)) 34588 + 34589 + 34590 +NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! 34591 + 34592 + 34593 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34594 + Lekcija 4.4: KOMANDA ZAMENE 34595 + 34596 + 34597 + ** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. ** 34598 + 34599 + 1. Pomerite kursor na red oznaèen sa --->. 34600 + 34601 + 2. Otkucajte :s/rdi/ri/ <ENTER> . Primetite da ova komanda zamenjuje 34602 + samo prvo "rdi" u redu. 34603 + 34604 + 3. Otkucajte :s/rdi/ri/g . Dodavanje opcije g znaèi da æe se komanda 34605 + izvriti u celom redu, zamenom svih pojava niza "rdi". 34606 + 34607 +---> rdiba rdibi grdize rep. 34608 + 34609 + 4. Za zamenu svih izraza izmeðu neka dva reda, 34610 + otkucajte :#,#s/staro/novo/g gde su #,# krajnji brojevi redova u opsegu 34611 + u kome æe se obaviti zamena. 34612 + Otkucajte :%s/staro/novo/g za zamenu svih izraza u celom tekstu. 34613 + Otkucajte :%s/staro/novo/gc za nalaenje svih izraza u tekstu i 34614 + potvrdu zamene. 34615 + 34616 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34617 + REZIME lekcije 4 34618 + 34619 + 34620 + 1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla. 34621 + G pomera kursor na kraj teksta. 34622 + broj G pomera kursor na navedeni red. 34623 + gg pomera kursor na prvi red teksta. 34624 + 34625 + 2. Kucanjem / sa izrazom taj izraz se trai UNAPRED. 34626 + Kucanjem ? sa izrazom taj izraz se trai UNAZAD. 34627 + Posle komande traenja koristite n za nalaenje izraza u istom 34628 + smeru, a N za nalaenje u suprotnom smeru. 34629 + CTRL-O vraæa kursor na prethodnu poziciju, a CTRL-I na narednu. 34630 + 34631 + 3. Kucanjem % kad je kursor na zagradi on se pomera na njen par. 34632 + 34633 + 4. Za zamenu prvog izraza staro za izraz novo :s/staro/novo/ 34634 + Za zamenu svih izraza u celom redu :s/staro/novo/g 34635 + Za zamenu svih izraza u opsegu linija #,# :#,#s/staro/novo/g 34636 + Za zamenu u celom tekstu :%s/staro/novo/g 34637 + Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc 34638 + 34639 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34640 + Lekcija 5.1: IZVRAVANJE SPOLJANJIH KOMANDI 34641 + 34642 + 34643 + ** Otkucajte :! pa spoljanju komandu koju elite da izvrite. ** 34644 + 34645 + 1. Otkucajte poznatu komandu : da biste namestili kursor na dno 34646 + ekrana. Time omoguæavate unos komande u komandnoj liniji editora. 34647 + 34648 + 2. Otkucajte znak ! (uzviènik). Ovime omoguæavate 34649 + izvravanje bilo koje spoljanje komande. 34650 + 34651 + 3. Kao primer otkucajte ls posle ! i pritisnite <ENTER>. Ovo æe 34652 + prikazati sadraj direktorijuma, kao da ste na komandnom promptu. 34653 + Otkucajte :!dir ako :!ls ne radi. 34654 + 34655 +NAPOMENA: Na ovaj naèin moguæe je izvriti bilo koju spoljanju komandu, 34656 + zajedno sa njenim argumentima. 34657 + 34658 +NAPOMENA: Sve : komande se izvravaju poto pritisnete <ENTER> . 34659 + U daljem tekstu to neæemo uvek napominjati. 34660 + 34661 + 34662 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34663 + Lekcija 5.2: VIE O SNIMANJU FAJLOVA 34664 + 34665 + ** Za snimanje promena, otkucajte :w IME_FAJLA . ** 34666 + 34667 + 1. Otkucajte :!dir ili :!ls za pregled sadraja direktorijuma. 34668 + Veæ znate da morate pritisnuti <ENTER> posle toga. 34669 + 34670 + 2. Izaberite ime fajla koji jo ne postoji, npr. TEST. 34671 + 34672 + 3. Otkucajte: :w TEST (gde je TEST ime koje ste izabrali.) 34673 + 34674 + 4. Time æete snimiti ceo fajl (Vim Tutor) pod imenom TEST. 34675 + Za proveru, otkucajte opet :!dir ili :!ls za pregled 34676 + sadraja direktorijuma. 34677 + 34678 +NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST , 34679 + tekst bi bio taèna kopija ovog fajla u trenutku kad ste 34680 + ga snimili. 34681 + 34682 + 5. Izbriite fajl tako to æete otkucati (MS-DOS): :!del TEST 34683 + ili (Unix): :!rm TEST 34684 + 34685 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34686 + Lekcija 5.3: SNIMANJE OZNAÈENOG TEKSTA 34687 + 34688 + 34689 + ** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA ** 34690 + 34691 + 1. Pomerite kursor na ovu liniju. 34692 + 34693 + 2. Pritisnite v i pomerite kursor pet redova ispod. Primetite da je 34694 + tekst oznaèen inverzno. 34695 + 34696 + 3. Pritisnite : . Na dnu ekrana pojaviæe se :'<,'> . 34697 + 34698 + 4. Otkucajte w TEST , gde je TEST ime fajla koji jo ne postoji. 34699 + Proverite da zaista pie :'<,'>w TEST pre nego to pritisnete <ENTER>. 34700 + 34701 + 5. Vim æe snimiti oznaèeni tekst u TEST. Proverite sa :!dir ili !ls . 34702 + Nemojte jo brisati fajl! Koristiæemo ga u narednoj lekciji. 34703 + 34704 +NAPOMENA: Komanda v zapoèinje vizuelno oznaèavanje. Moete pomerati kursor 34705 + i tako menjati velièinu oznaèenog teksta. Onda moete upotrebiti 34706 + operatore nad tekstom. Na primer, d æe izbrisati oznaèeni tekst. 34707 + 34708 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34709 + Lekcija 5.4: UÈITAVANJE FAJLA U TEKST 34710 + 34711 + 34712 + ** Za ubacivanje sadraja fajla, otkucajte :r IME_FAJLA ** 34713 + 34714 + 1. Postavite kursor iznad ove linije. 34715 + 34716 +NAPOMENA: Poto izvrite 2. korak videæete tekst iz lekcije 5.3. Tada 34717 + pomerite kursor DOLE da biste ponovo videli ovu lekciju. 34718 + 34719 + 2. Uèitajte fajl TEST koristeæi komandu :r TEST gde je TEST ime fajla 34720 + koje ste koristili u prethodnoj lekciji. Sadraj uèitanog fajla je 34721 + ubaèen ispod kursora. 34722 + 34723 + 3. Da biste proverili da je fajl uèitan, vratite kursor unazad i 34724 + primetite dve kopije lekcije 5.3, originalnu i onu iz fajla. 34725 + 34726 +NAPOMENA: Takoðe moete uèitati izlaz spoljanje komande. Na primer, 34727 + :r !ls æe uèitati izlaz komande ls i postaviti ga ispod 34728 + kursora. 34729 + 34730 + 34731 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34732 + REZIME lekcije 5 34733 + 34734 + 34735 + 1. :!komanda izvrava spoljanju komandu. 34736 + 34737 + Korisni primeri: 34738 + (MS-DOS) (Unix) 34739 + :!dir :!ls - pregled sadraja direktorijuma. 34740 + :!del FAJL :!rm FAJL - brie fajl FAJL. 34741 + 34742 + 2. :w FAJL zapisuje trenutni tekst na disk pod imenom FAJL. 34743 + 34744 + 3. v pokret :w IME_FAJLA snima vizuelno oznaèene redove u fajl 34745 + IME_FAJLA. 34746 + 34747 + 4. :r IME_FAJLA uèitava fajl IME_FAJLA sa diska i stavlja 34748 + njegov sadraj ispod kursora. 34749 + 34750 + 5. :r !dir uèitava izlaz komande dir i postavlja ga ispod kursora. 34751 + 34752 + 34753 + 34754 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34755 + Lekcija 6.1: KOMANDA OTVORI 34756 + 34757 + 34758 + ** Pritisnite o da biste otvorili red ispod kursora 34759 + i preli u Insert mod. ** 34760 + 34761 + 1. Pomerite kursor na sledeæi red oznaèen sa --->. 34762 + 34763 + 2. Otkucajte malo o da biste otvorili novi red ISPOD kursora 34764 + i preli u Insert mod. 34765 + 34766 + 3. Otkucajte neki tekst i onda pritisnite <ESC> da biste izali 34767 + iz Insert moda. 34768 + 34769 +---> Kad pritisnete o kursor prelazi u novootvoreni red u Insert modu. 34770 + 34771 + 4. Za otvaranje reda IZNAD kursora, umesto malog otkucajte veliko O . 34772 + Isprobajte na donjem redu oznaèenom sa --->. 34773 + 34774 +---> Otvorite red iznad ovog kucanjem velikog O dok je kursor u ovom redu. 34775 + 34776 + 34777 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34778 + Lekcija 6.2: KOMANDA DODAJ 34779 + 34780 + 34781 + ** Otkucajte a za dodavanje teksta IZA kursora. ** 34782 + 34783 + 1. Pomerite kursor na poèetak sledeæeg reda oznaèenog sa --->. 34784 + 34785 + 2. Kucajte e dok kursor ne doðe na kraj reèi re . 34786 + 34787 + 3. Otkucajte a (malo) da biste dodali tekst IZA kursora. 34788 + 34789 + 4. Dopunite reè kao to je u redu ispod. Pritisnite <ESC> za izlazak 34790 + iz Insert moda. 34791 + 34792 + 5. Sa e preðite na narednu nepotpunu reè i ponovite korake 3 i 4. 34793 + 34794 +---> Ovaj re omoguæava ve dodav teksta u nekom redu. 34795 +---> Ovaj red omoguæava vebanje dodavanja teksta u nekom redu. 34796 + 34797 +NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina 34798 + razlika je u poziciji od koje æe se tekst ubacivati. 34799 + 34800 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34801 + Lekcija 6.3: DRUGI NAÈIN ZAMENE 34802 + 34803 + 34804 + ** Otkucajte veliko R da biste zamenili vie od jednog znaka. ** 34805 + 34806 + 1. Pomerite kursor na prvi sledeæi red oznaèen sa --->. 34807 + Pomerite kursor na poèetak prvog xxx . 34808 + 34809 + 2. Pritisnite R i otkucajte broj koji je red ispod, 34810 + tako da zameni xxx . 34811 + 34812 + 3. Pritisnite <ESC> za izlazak iz Replace moda. 34813 + Primetite da je ostatak reda ostao nepromenjen. 34814 + 34815 + 4. Ponovite korake da biste zamenili drugo xxx. 34816 + 34817 +---> Dodavanje 123 na xxx daje xxx. 34818 +---> Dodavanje 123 na 456 daje 579. 34819 + 34820 +NAPOMENA: Replace mod je kao Insert mod, s tom razlikom to svaki 34821 + uneti znak brie veæ postojeæi. 34822 + 34823 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34824 + Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA 34825 + 34826 + 34827 + ** Koristite operator y za kopiranje a p za lepljenje teksta. ** 34828 + 34829 + 1. Pomerite kursor na red sa ---> i postavite kursor posle "a)". 34830 + 34831 + 2. Aktivirajte Visual mod sa v i pomerite kursor sve do ispred "prvi". 34832 + 34833 + 3. Pritisnite y da biste kopirali oznaèeni tekst u interni bafer. 34834 + 34835 + 4. Pomerite kursor do kraja sledeæeg reda: j$ 34836 + 34837 + 5. Pritisnite p da biste zalepili tekst. Onda otkucajte: a drugi <ESC> . 34838 + 34839 + 6. Upotrebite Visual mod da oznaèite " red.", kopirajte sa y , kursor 34840 + pomerite na kraj sledeæeg reda sa j$ i tamo zalepite tekst sa p . 34841 + 34842 +---> a) ovo je prvi red. 34843 + b) 34844 + 34845 +NAPOMENA: takoðe moete koristiti y kao operator; yw kopira jednu reè. 34846 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34847 + Lekcija 6.5: POSTAVLJANJE OPCIJA 34848 + 34849 + 34850 + ** Postavite opciju tako da traenje i zamena ignoriu velièinu slova ** 34851 + 34852 + 1. Potraite reè 'razlika': /razlika <ENTER> 34853 + Ponovite nekoliko puta pritiskom na n . 34854 + 34855 + 2. Aktivirajte opciju 'ic' (Ignore case): :set ic 34856 + 34857 + 3. Ponovo potraite reè 'razlika' pritiskom na n 34858 + Primetite da su sada pronaðeni i RAZLIKA i Razlika. 34859 + 34860 + 4. Aktivirajte opcije 'hlsearch' i 'incsearch': :set hls is 34861 + 34862 + 5. Ponovo otkucajte komandu traenja i uoèite razlike: /razlika <ENTER> 34863 + 34864 + 6. Za deaktiviranje opcije ic kucajte: :set noic 34865 + 34866 +NAPOMENA: Za neoznaèavanje pronaðenih izraza otkucajte: :nohlsearch 34867 +NAPOMENA: Ako elite da ne razlikujete velièinu slova u samo jednoj komandi 34868 + traenja, dodajte \c u izraz: /razlika\c <ENTER> 34869 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34870 + REZIME lekcije 6 34871 + 34872 + 1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod. 34873 + Pritisnite O za otvaranje reda IZNAD kursora. 34874 + 34875 + 2. Pritisnite a za unos teksta IZA kursora. 34876 + Pritisnite A za unos teksta na kraju reda. 34877 + 34878 + 3. Komanda e pomera kursor na kraj reèi. 34879 + 34880 + 4. Operator y kopira tekst, p ga lepi. 34881 + 34882 + 5. Kucanje velikog R aktivira Replace mod dok ne pritisnete <ESC> . 34883 + 34884 + 6. Kucanje ":set xxx" aktivira opciju "xxx". Neke opcije su: 34885 + 'ic' 'ignorecase' ne razlikuje velika/mala slova pri traenju 34886 + 'is' 'incsearch' prikazuje pronaðen tekst dok kucate izraz 34887 + 'hls' 'hlsearch' oznaèava inverzno sve pronaðene izraze 34888 + Moete koristite dugo ili kratko ime opcije. 34889 + 34890 + 7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic 34891 + 34892 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34893 + Lekcija 7.1: DOBIJANJE POMOÆI 34894 + 34895 + 34896 + ** Koristite on-line sistem za pomoæ ** 34897 + 34898 + Vim ima detaljan on-line sistem za pomoæ. Za poèetak, pokuajte neto 34899 + od sledeæeg: 34900 + - pritisnite taster <HELP> (ako ga imate na tastaturi) 34901 + - pritisnite taster <F1> (ako ga imate na tastaturi) 34902 + - otkucajte :help <ENTER> 34903 + 34904 + Proèitajte tekst u prozoru pomoæi da biste nauèili pomoæ radi. 34905 + Kucanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. 34906 + Otkucajte :q <ENTER> da zatvorite prozor pomoæi. 34907 + 34908 + Pomoæ o praktièno bilo kojoj temi moete dobiti dodavanjem argumenta 34909 + komandi ":help". Pokuajte ovo (ne zaboravite <ENTER> na kraju): 34910 + 34911 + :help w 34912 + :help c_CTRL-D 34913 + :help insert-index 34914 + :help user-manual 34915 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34916 + Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA 34917 + 34918 + 34919 + ** Aktivirajte moguænosti editora ** 34920 + 34921 + Vim ima mnogo vie moguænosti nego Vi, ali veæina nije automatski 34922 + aktivirana. Za dodatne moguænosti napravite "vimrc" fajl. 34923 + 34924 + 1. Otvorite "vimrc" fajl. Ovo zavisi od vaeg sistema: 34925 + :e ~/.vimrc za Unix 34926 + :e $VIM/_vimrc za MS-Windows 34927 + 34928 + 2. Onda uèitajte primer sadraja "vimrc" fajla: 34929 + :r $VIMRUNTIME/vimrc_example.vim 34930 + 34931 + 3. Snimite fajl sa: 34932 + :w 34933 + 34934 + Sledeæi put kada pokrenete Vim, bojenje sintakse teksta biæe 34935 + aktivirano. Sva svoja podeavanja moete dodati u "vimrc" fajl. 34936 + Za vie informacija otkucajte :help vimrc-intro 34937 + 34938 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34939 + Lekcija 7.3: AUTOMATSKO DOVRAVANJE 34940 + 34941 + 34942 + ** Dovravanje komandne linije sa CTRL-D i <TAB> ** 34943 + 34944 + 1. Podesite Vim da ne bude u Vi-kompatibilnom modu: :set nocp 34945 + 34946 + 2. Pogledajte koji fajlovi postoje u direktorijumu: :!ls ili :!dir 34947 + 34948 + 3. Otkucajte poèetak komande: :e 34949 + 34950 + 4. Otkucajte CTRL-D i Vim æe prikazati spisak komandi koje poèinju sa "e". 34951 + 34952 + 5. Pritisnite <TAB> i Vim æe dopuniti ime komande u ":edit". 34953 + 34954 + 6. Dodajte razmak i poèetak imena postojeæeg fajla: :edit FA 34955 + 34956 + 7. Pritisnite <TAB>. Vim æe dopuniti ime fajla (ako je jedinstveno). 34957 + 34958 +NAPOMENA: Moguæe je dopuniti mnoge komande. Samo probajte CTRL-D i <TAB>. 34959 + Naroèito je korisno za :help komande. 34960 + 34961 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34962 + REZIME lekcije 7 34963 + 34964 + 34965 + 1. Otkucajte :help ili pritisnite <F1> ili <Help> za pomoæ. 34966 + 34967 + 2. Otkucajte :help komanda biste dobili pomoæ za tu komandu. 34968 + 34969 + 3. Otkucajte CTRL-W CTRL-W za prelazak u drugi prozor. 34970 + 34971 + 4. Otkucajte :q da zatvorite prozor pomoæi. 34972 + 34973 + 5. Napravite vimrc startni skript za aktiviranje podeavanja koja 34974 + vam odgovaraju. 34975 + 34976 + 6. Dok kucate neku od : komandi, pritisnite CTRL-D da biste videli moguæe 34977 + vrednosti. Pritisnite <TAB> da odaberete jednu od njih. 34978 + 34979 + 34980 + 34981 + 34982 + 34983 + 34984 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 34985 + Ovim je priruènik zavren. Njegov cilj je bio kratak pregled Vim editora, 34986 + koliko da omoguæi njegovo relativno jednostavno koriæenje. Priruènik nije 34987 + potpun, jer Vim ima mnogo vie komandi. Kao sledeæe, proèitajte priruènik: 34988 + ":help user-manual". 34989 + 34990 + Za dalje èitanje i uèenje, preporuèujemo knjigu: 34991 + Vim - Vi Improved - by Steve Oualline 34992 + Izdavaè: New Riders 34993 + Prva knjiga potpuno posveæena Vim-u. Naroèito korisna za poèetnike. 34994 + Ima mnotvo primera i slika. 34995 + Vidite http://iccf-holland.org/click5.html 34996 + 34997 + Sledeæa knjiga je starija i vie govori o Vi-u nego o Vim-u, ali je takoðe 34998 + preporuèujemo: 34999 + Learning the Vi Editor - by Linda Lamb 35000 + Izdavaè: O'Reilly & Associates Inc. 35001 + Dobra knjiga iz koje moete saznati skoro sve to moete raditi u Vi-ju. 35002 + esto izdanje ima i informacija o Vim-u. 35003 + 35004 + Ovaj priruènik su napisali: Michael C. Pierce i Robert K. Ware, 35005 + Colorado School of Mines koristeæi ideje Charlesa Smitha, 35006 + Colorado State University. E-mail: bware@mines.colorado.edu. 35007 + 35008 + Prilagoðavanje za Vim uradio je Bram Moolenaar. 35009 + 35010 + Prevod na srpski: Ivan Nejgebauer <ian@uns.ac.rs> 35011 + Verzija 1.0, maj/juni 2014. 35012 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35013 diff -Naur vim74.orig/runtime/tutor/tutor.sr.utf-8 vim74/runtime/tutor/tutor.sr.utf-8 35014 --- vim74.orig/runtime/tutor/tutor.sr.utf-8 1970-01-01 00:00:00.000000000 +0000 35015 +++ vim74/runtime/tutor/tutor.sr.utf-8 2014-07-21 23:33:37.576805972 +0000 35016 @@ -0,0 +1,971 @@ 35017 +=============================================================================== 35018 += D o b r o d o Å¡ l i u VIM p r i r u Ä n i k - Verzija 1.7 = 35019 +=============================================================================== 35020 + 35021 + Vim je moÄan editor sa mnogo komandi, suviÅ¡e da bismo ih ovde sve 35022 + opisali. PriruÄnik je zamiÅ¡ljen da opiÅ¡e dovoljno komandi da biste 35023 + mogli lagodno da koristite Vim kao editor opÅ¡te namene. 35024 + 35025 + PribliÅŸno vreme potrebno za uspeÅ¡an zavrÅ¡etak priruÄnika je izmeÄu 35026 + 25 i 30 minuta, u zavisnosti od vremena potroÅ¡enog na veÅŸbu. 35027 + 35028 + UPOZORENJE: 35029 + Komande u lekcijama Äe menjati tekst. Iskopirajte ovaj fajl i 35030 + veÅŸbajte na kopiji (ako ste pokrenuli "vimtutor" ovo je veÄ kopija). 35031 + 35032 + VaÅŸno je upamtiti da je ovaj priruÄnik zamiÅ¡ljen za aktivnu veÅŸbu. 35033 + To znaÄi da morate upotrebljavati komande o kojima Äitate da biste 35034 + ih nauÄili. Ako samo Äitate tekst, zaboraviÄete komande! 35035 + 35036 + Ako je Caps Lock ukljuÄen ISKLJUÄITE ga. Pritisnite taster j dovoljno 35037 + puta da lekcija 1.1 cela stane na ekran. 35038 + 35039 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35040 + Lekcija 1.1: POMERANJE KURSORA 35041 + 35042 + 35043 + ** Za pomeranje kursora, pritiskajte tastere h,j,k,l kako je prikazano ** 35044 + ^ 35045 + k Savet: h je s leve strane i pomera kursor u levo. 35046 + < h l > l je s desne strane i pomera kursor u desno. 35047 + j j izgleda kao strelica naniÅŸe. 35048 + v 35049 + 1. Pomerajte kursor po ekranu dok se ne naviknete na komande. 35050 + 35051 + 2. Pritisnite taster (j) dok ne poÄne da se ponavlja. 35052 + Sada znate kako da doÄete do naredne lekcije. 35053 + 35054 + 3. KoristeÄi taster j preÄite na lekciju 1.2. 35055 + 35056 +NAPOMENA: Ako niste sigurni Å¡ta ste zapravo pritisnuli, pritisnite <ESC> 35057 + za prelazak u Normal mod i pokuÅ¡ajte ponovo. 35058 + 35059 +NAPOMENA: Strelice takoÄe pomeraju kursor, ali koriÅ¡Äenje tastera hjkl je 35060 + znatno brÅŸe, kad se jednom naviknete na njih. Zaista! 35061 + 35062 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35063 + Lekcija 1.2: IZLAZAK IZ VIM-a 35064 + 35065 + 35066 + !! UPOZORENJE: Pre izvoÄenja bilo kog koraka, proÄitajte celu lekciju!! 35067 + 35068 + 1. Pritisnite <ESC> (editor je sada u Normal modu). 35069 + 35070 + 2. Otkucajte: :q! <ENTER>. 35071 + Ovime se izlazi iz editora, sa GUBITKOM svih izmena. 35072 + 35073 + 3. Kada se pojavi komandni prompt, unesite komandu koja je pokrenula 35074 + ovaj priruÄnik: vimtutor <ENTER> 35075 + 35076 + 4. Ako ste upamtili ove korake, izvrÅ¡ite ih redom od 1 do 3 da biste 35077 + izaÅ¡li iz editora i ponovo ga pokrenuli. 35078 + 35079 +NAPOMENA: :q! <ENTER> poniÅ¡tava sve izmene koje ste napravili. 35080 + U narednim lekcijama nauÄiÄete kako da saÄuvate izmene. 35081 + 35082 + 5. Pomerite kursor na lekciju 1.3. 35083 + 35084 + 35085 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35086 + Lekcija 1.3: IZMENA TEKSTA - BRISANJE 35087 + 35088 + 35089 + ** Pritisnite x za brisanje znaka pod kursorom. ** 35090 + 35091 + 1. Pomerite kursor na red oznaÄen sa --->. 35092 + 35093 + 2. Da biste ispravili greÅ¡ke, pomerajte kursor dok se 35094 + ne naÄe na slovu koje treba izbrisati. 35095 + 35096 + 3. Pritisnite taster x da izbriÅ¡ete neÅŸeljeno slovo. 35097 + 35098 + 4. Ponavljajte korake od 2 do 4 dok ne ispravite sve greÅ¡ke. 35099 + 35100 +---> RRRibaa riibi grizzze rrreepp. 35101 + 35102 + 5. Kad ispravite red, preÄite na lekciju 1.4. 35103 + 35104 +NAPOMENA: Dok koristite priruÄnik, nemojte uÄiti komande napamet, 35105 + veÄ veÅŸbajte njihovu primenu. 35106 + 35107 + 35108 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35109 + Lekcija 1.4: IZMENA TEKSTA - UBACIVANJE 35110 + 35111 + 35112 + ** Pritisnite i za ubacivanje teksta ispred kursora. ** 35113 + 35114 + 1. Pomerite kursor na prvi sledeÄi red oznaÄen sa --->. 35115 + 35116 + 2. Da biste tekst prvog reda izjednaÄili s tekstom drugog, namestite 35117 + kursor na prvi znak POSLE kog Äete ubaciti potreban tekst. 35118 + 35119 + 3. Pritisnite i pa unesite potrebne dopune. 35120 + 35121 + 4. Po ispravci svake greÅ¡ke pritisnite <ESC> da se vratite u Normal mod. 35122 + Ponovite korake od 2 do 4 da biste ispravili celu reÄenicu. 35123 + 35124 +---> Do teka neoje v red. 35125 +---> Deo teksta nedostaje iz ovog reda. 35126 + 35127 + 5. PreÄite na sledeÄu lekciju. 35128 + 35129 + 35130 + 35131 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35132 + Lekcija 1.5: IZMENA TEKSTA - DODAVANJE 35133 + 35134 + 35135 + ** Pritisnite A za dodavanje teksta. ** 35136 + 35137 + 1. Pomerite kursor na prvi sledeÄi red oznaÄen sa --->. 35138 + Nije vaÅŸno gde se nalazi kursor u tom redu. 35139 + 35140 + 2. Pritisnite A i unesite dodatni tekst. 35141 + 35142 + 3. PoÅ¡to ste dodali tekst, pritisnite <ESC> za povratak u 35143 + Normal mod. 35144 + 35145 + 4. Pomerite kursor na drugi red oznaÄen sa ---> i ponavljajte 35146 + korake 2 i 3 dok ne ispravite tekst. 35147 + 35148 +---> Deo teksta nedostaje u 35149 + Deo teksta nedostaje u ovom redu. 35150 +---> Deo teksta nedostaje 35151 + Deo teksta nedostaje i ovde. 35152 + 35153 + 5. PreÄite na lekciju 1.6. 35154 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35155 + Lekcija 1.6: IZMENA FAJLA 35156 + 35157 + 35158 + ** Upotrebite :wq za snimanje teksta i izlazak iz editora. ** 35159 + 35160 + !! UPOZORENJE: Pre izvoÄenja bilo kog koraka, proÄitajte celu lekciju!! 35161 + 35162 + 1. IzaÄite iz editora kao u lekciji 1.2: :q! 35163 + 35164 + 2. Na komandnom promptu unesite sledeÄu komandu: vim tutor <ENTER> 35165 + 'vim' je komanda za pokretanja Vim editora, 'tutor' je ime fajla koji 35166 + ÅŸelite da menjate. Koristite fajl koji imate pravo da menjate. 35167 + 35168 + 3. Ubacujte i briÅ¡ite tekst kao u prethodnim lekcijama. 35169 + 35170 + 4. Snimite izmenjeni tekst i izaÄite iz Vim-a: :wq <ENTER> 35171 + 35172 + 5. Ponovo pokrenite vimtutor i proÄitajte rezime koji sledi. 35173 + 35174 + 6. PoÅ¡to proÄitate korake iznad i u potpunosti ih razumete: 35175 + izvrÅ¡ite ih. 35176 + 35177 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35178 + REZIME lekcije 1 35179 + 35180 + 35181 + 1. Kursor se pomera strelicama ili pomoÄu tastera hjkl . 35182 + h (levo) j (dole) k (gore) l (desno) 35183 + 35184 + 2. Za pokretanje Vim-a iz shell-a: vim IME_FAJLA <ENTER> 35185 + 35186 + 3. Izlaz: <ESC> :q! <ENTER> sve promene su izgubljene. 35187 + ILI: <ESC> :wq <ENTER> promene su saÄuvane. 35188 + 35189 + 4. Brisanje znaka na kome se nalazi kursor: x 35190 + 35191 + 5. Ubacivanja ili dodavanje teksta: 35192 + i unesite tekst <ESC> unos ispred kursora 35193 + A unesite tekst <ESC> dodavanje na kraju reda 35194 + 35195 +NAPOMENA: Pritiskom na <ESC> prebacujete Vim u Normal mod i 35196 + prekidate neÅŸeljenu ili delimiÄno izvrÅ¡enu komandu. 35197 + 35198 +Nastavite sa lekcijom 2. 35199 + 35200 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35201 + Lekcija 2.1: NAREDBE BRISANJA 35202 + 35203 + 35204 + ** Otkucajte dw za brisanje reÄi. ** 35205 + 35206 + 1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu. 35207 + 35208 + 2. Pomerite kursor na red oznaÄen sa --->. 35209 + 35210 + 3. Pomerite kursor na poÄetak reÄi koju treba izbrisati. 35211 + 35212 + 4. Otkucajte dw da biste uklonili reÄ. 35213 + 35214 +NAPOMENA: Slovo d Äe se pojaviti na dnu ekrana kad ga otkucate. Vim Äeka 35215 + da otkucate w . Ako je prikazano neko drugo slovo, pogreÅ¡ili ste u 35216 + kucanju; pritisnite <ESC> i pokuÅ¡ajte ponovo. (Ako se ne pojavi 35217 + niÅ¡ta, moÅŸda je iskljuÄena opcija 'showcmd': vidi lekciju 6.5.) 35218 + 35219 +---> Neke reÄi smeÅ¡no ne pripadaju na papir ovoj reÄenici. 35220 + 35221 + 5. Ponavljajte korake 3 i 4 dok ne ispravite reÄenicu, pa 35222 + preÄite na lekciju 2.2. 35223 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35224 + Lekcija 2.2: JOÅ BRISANJA 35225 + 35226 + 35227 + ** Otkucajte d$ za brisanje znakova do kraja reda. ** 35228 + 35229 + 1. Pritisnite <ESC> da biste bili sigurni da ste u Normal modu. 35230 + 35231 + 2. Pomerite kursor na red oznaÄen sa --->. 35232 + 35233 + 3. Pomerite kursor do kraja ispravnog dela reÄenice 35234 + (POSLE prve . ). 35235 + 35236 + 4. Otkucajte d$ za brisanje ostatka reda. 35237 + 35238 +---> Neko je uneo kraj ovog reda dvaput. kraj ovog reda dvaput. 35239 + 35240 + 5. PreÄite na lekciju 2.3 za podrobnije objaÅ¡njenje. 35241 + 35242 + 35243 + 35244 + 35245 + 35246 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35247 + Lekcija 2.3: O OPERATORIMA I POKRETIMA 35248 + 35249 + 35250 + Mnoge komande za izmenu teksta sastoje se od operatora i pokreta. 35251 + Oblik komande brisanja sa d operatorom je sledeÄi: 35252 + 35253 + d pokret 35254 + 35255 + Pri Äemu je: 35256 + d - operator brisanja. 35257 + pokret - ono na Äemu Äe se operacija izvrÅ¡avati (opisano u nastavku). 35258 + 35259 + Kratak spisak pokreta: 35260 + w - sve do poÄetka sledeÄe reÄi, NE UKLJUÄUJUÄI prvo slovo. 35261 + e - sve do kraja tekuÄe reÄi, UKLJUÄUJUÄI poslednje slovo. 35262 + $ - sve do kraje reda, UKLJUÄUJUÄI poslednje slovo. 35263 + 35264 + Kucanjem de brisaÄe se tekst od kursora do kraja reÄi. 35265 + 35266 +NAPOMENA: Pritiskom samo na taster pokreta dok ste u Normal modu, bez 35267 + operatora, kursor se pomera kao Å¡to je opisano. 35268 + 35269 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35270 + Lekcija 2.4: KORIÅ ÄENJE BROJANJA ZA POKRETE 35271 + 35272 + 35273 + ** UnoÅ¡enjem nekog broja pre pokreta, pokret se izvrÅ¡ava taj broj puta. ** 35274 + 35275 + 1. Pomerite kursor na red oznaÄen sa --->. 35276 + 35277 + 2. Otkucajte 2w da pomerite kursor dve reÄi napred. 35278 + 35279 + 3. Otkucajte 3e da pomerite kursor na kraj treÄe reÄi napred. 35280 + 35281 + 4. Otkucajte 0 (nulu) da pomerite kursor na poÄetak reda. 35282 + 35283 + 5. Ponovite korake 2 i 3 s nekim drugim brojevima. 35284 + 35285 +---> ReÄenica sa reÄima po kojoj moÅŸete pomerati kursor. 35286 + 35287 + 6. PreÄite na lekciju 2.5. 35288 + 35289 + 35290 + 35291 + 35292 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35293 + Lekcija 2.5: KORIÅ ÄENJE BROJANJA ZA VEÄE BRISANJE 35294 + 35295 + 35296 + ** UnoÅ¡enje nekog broja s operatorom ponavlja operator taj broj puta. ** 35297 + 35298 + U kombinaciji operatora brisanja s pokretima spomenutim iznad 35299 + moÅŸete uneti broj pre pokreta da biste izbrisali viÅ¡e znakova: 35300 + 35301 + d broj pokret 35302 + 35303 + 1. Pomerite kursor na prvo slovo u reÄi s VELIKIM SLOVIMA u redu 35304 + oznaÄenom sa --->. 35305 + 35306 + 2. Otkucajte d2w da izbriÅ¡ete dve reÄi sa VELIKIM SLOVIMA 35307 + 35308 + 3. Ponovite korake 1 i 2 sa razliÄitim brojevima da izbriÅ¡ete 35309 + uzastopne reÄi sa VELIKIM SLOVIMA koriÅ¡Äenjem samo jedne komande. 35310 + 35311 +---> ovaj ABCÄÄ DÄE red FGHI JK LMN OP s reÄima je RSÅ TUVZÅœ ispravljen. 35312 + 35313 + 35314 + 35315 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35316 + Lekcija 2.6: OPERACIJE NAD REDOVIMA 35317 + 35318 + 35319 + ** Otkucajte dd za brisanje celog reda. ** 35320 + 35321 + Zbog uÄestalosti brisanja celih redova, autori Vi-ja odluÄili su da 35322 + je lakÅ¡e brisati redove ako se otkuca d dvaput. 35323 + 35324 + 1. Pomerite kursor na drugi red u donjoj strofi. 35325 + 2. Otkucajte dd da ga izbriÅ¡ete. 35326 + 3. Pomerite kursor na Äetvrti red. 35327 + 4. Otkucajte 2dd da biste izbrisali dva reda. 35328 + 35329 +---> 1) Sedlo mi je od marame, 35330 +---> 2) blato na sve strane, 35331 +---> 3) uzda od kanapa, 35332 +---> 4) auto mi je ovde, 35333 +---> 5) satovi pokazuju vreme, 35334 +---> 6) a biÄ mi je od oÄina 35335 +---> 7) prebijena Å¡tapa. 35336 + 35337 + 35338 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35339 + Lekcija 2.7: PONIÅ TAVANJE PROMENA 35340 + 35341 + 35342 + ** Pritisnite u za poniÅ¡tavanje poslednje komande, U za ceo red. ** 35343 + 35344 + 1. Pomerite kursor na red oznaÄen sa ---> i postavite ga na mesto 35345 + prve greÅ¡ke. 35346 + 2. Otkucajte x da izbriÅ¡ete prvi neÅŸeljeni znak. 35347 + 3. Otkucajte u da poniÅ¡tite poslednju izvrÅ¡enu komandu. 35348 + 4. Sad ispravite sve greÅ¡ke u redu koristeÄi komandu x . 35349 + 5. Otkucajte veliko U da biste vratili sadrÅŸaj reda u prvobitno 35350 + stanje. 35351 + 6. Onda otkucajte u nekoliko puta da biste poniÅ¡tili U 35352 + i prethodne komande. 35353 + 7. Sad otkucajte CTRL-R (drÅŸeÄi CTRL dok pritiskate R) 35354 + nekoliko puta da biste vratili izmene (poniÅ¡tili poniÅ¡tavanja). 35355 + 35356 +---> Iiisspravite greÅ¡ke uu ovvom redu ii pooniÅ¡titeee ih. 35357 + 35358 + 8. Ovo su veoma korisne komande. PreÄite na rezime lekcije 2. 35359 + 35360 + 35361 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35362 + REZIME lekcije 2 35363 + 35364 + 35365 + 1. Brisanje od kursora do sledeÄe reÄi: dw 35366 + 2. Brisanje od kursora do kraja reda: d$ 35367 + 3. Brisanje celog reda: dd 35368 + 35369 + 4. Za ponavljanje pokreta prethodno unesite broj: 2w 35370 + 5. Oblik komande za izmenu: 35371 + operator [broj] pokret 35372 + gde je: 35373 + operator - Å¡ta uraditi, recimo d za brisanje 35374 + [broj] - neobavezan broj ponavljanja pokreta 35375 + pokret - kretanje po tekstu na kome se radi, 35376 + kao Å¡to je: w (reÄ), $ (kraj reda), itd. 35377 + 35378 + 6. Pomeranje kursora na poÄetak reda: 0 35379 + 35380 + 7. Za poniÅ¡tavanje prethodnih izmena, pritisnite: u (malo u) 35381 + Za poniÅ¡tavanje svih promena u redu, pritisnite: U (veliko U) 35382 + Za vraÄanja promena, otkucajte: CTRL-R 35383 + 35384 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35385 + Lekcija 3.1: KOMANDA POSTAVLJANJA 35386 + 35387 + 35388 + ** Otkucajte p da postavite prethodno izbrisan tekst iza kursora. ** 35389 + 35390 + 1. Pomerite kursor na prvi sledeÄi red oznaÄen sa --->. 35391 + 35392 + 2. Otkucajte dd da izbriÅ¡ete red i smestite ga u Vim registar. 35393 + 35394 + 3. Pomerite kursor na red c), IZNAD mesta gde treba postaviti izbrisan red. 35395 + 35396 + 4. Otkucajte p da postavite red ispod kursora. 35397 + 35398 + 5. Ponavljajte korake 2 do 4 da biste postavili sve linije u pravilnom 35399 + redosledu. 35400 + 35401 +---> d) prebijena Å¡tapa. 35402 +---> b) uzda od kanapa, 35403 +---> c) a biÄ mi je od oÄina 35404 +---> a) Sedlo mi je od marame, 35405 + 35406 + 35407 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35408 + Lekcija 3.2: KOMANDA ZAMENE 35409 + 35410 + 35411 + ** Otkucajte rx da zamenite znak ispod kursora slovom x . ** 35412 + 35413 + 1. Pomerite kursor na prvi sledeÄi red oznaÄen sa --->. 35414 + 35415 + 2. Pomerite kursor tako da se nalazi na prvoj greÅ¡ci. 35416 + 35417 + 3. Otkucajte r i onda znak koji treba da tu stoji. 35418 + 35419 + 4. Ponavljajte korake 2 i 3 sve dok prvi red ne bude 35420 + isti kao drugi. 35421 + 35422 +---> Kedi ju ovej red ugaÅ¡en, nako je protresao pustaÅ¡ne testere! 35423 +---> Kada je ovaj red unoÅ¡en, neko je pritiskao pogreÅ¡ne tastere! 35424 + 35425 + 5. PreÄite na lekciju 3.2. 35426 + 35427 +NAPOMENA: Setite se da treba da uÄite veÅŸbanjem, ne pamÄenjem. 35428 + 35429 + 35430 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35431 + Lekcija 3.3: OPERATOR IZMENE 35432 + 35433 + 35434 + ** Za izmenu teksta do kraja reÄi, otkucajte ce .** 35435 + 35436 + 1. Pomerite kursor na prvi sledeÄi red oznaÄen sa --->. 35437 + 35438 + 2. Postavite kursor na a u rakdur. 35439 + 35440 + 3. Otkucajte ce i ispravite reÄ (u ovom sluÄaju otkucajte ed ). 35441 + 35442 + 4. Pritisnite <ESC> i pomerite kursor na sledeÄi znak koji 35443 + treba ispraviti. 35444 + 35445 + 5. Ponavljajte korake 3 i 4 sve dok prva reÄenica ne bude ista 35446 + kao druga. 35447 + 35448 +---> Ovaj rakdur ima nekoliko rejga koje treflja isprpikati operagrom izmene. 35449 +---> Ovaj red ima nekoliko reÄi koje treba ispraviti operatorom izmene. 35450 + 35451 +UoÄite da ce briÅ¡e reÄ i postavlja editor u Insert mod. 35452 + 35453 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35454 + Lekcija 3.4: DALJE IZMENE UPOTREBOM c 35455 + 35456 + 35457 + ** Komanda izmene se koristi sa istim pokretima kao i brisanje. ** 35458 + 35459 + 1. Operator izmene se koristi na isti naÄin kao i operator brisanja: 35460 + 35461 + c [broj] pokret 35462 + 35463 + 2. Pokreti su isti, recimo: w (reÄ) i $ (kraj reda). 35464 + 35465 + 3. Pomerite kursor na prvi sledeÄi red oznaÄen sa --->. 35466 + 35467 + 4. Pomerite kursor na prvu greÅ¡ku. 35468 + 35469 + 5. Otkucajte c$ i unesite ostatak reda tako da bude isti kao 35470 + drugi red, pa pritisnite <ESC>. 35471 + 35472 +---> Kraj ovog reda treba izmeniti tako da izgleda kao red ispod. 35473 +---> Kraj ovog reda treba ispraviti koriÅ¡Äenjem c$ komande. 35474 + 35475 +NAPOMENA: Za ispravljanje greÅ¡aka moÅŸete koristiti Backspace . 35476 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35477 + REZIME lekcije 3 35478 + 35479 + 35480 + 1. Za postavljanje teksta koji ste upravo izbrisali, pritisnite p . Ovo 35481 + postavlja tekst IZA kursora (ako je bio izbrisan jedan ili viÅ¡e redova 35482 + sadrÅŸaj Äe doÄi na red ispod kursora). 35483 + 35484 + 2. Za zamenu znaka na kome se nalazi kursor, pritisnite r i onda 35485 + ÅŸeljeni znak. 35486 + 35487 + 3. Operator izmene dozvoljava promenu teksta od kursora do pozicije gde 35488 + se zavrÅ¡ava pokret. Primera radi, kucajte ce za izmenu od kursora do 35489 + kraja reÄi, ili c$ za izmenu od kursora do kraja reda. 35490 + 35491 + 4. Oblik operacije izmene je: 35492 + 35493 + c [broj] pokret 35494 + 35495 +PreÄite na narednu lekciju. 35496 + 35497 + 35498 + 35499 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35500 + Lekcija 4.1: POZICIJA KURSORA I STATUS FAJLA 35501 + 35502 + ** Pritisnite CTRL-G za prikaz pozicije kursora u tekstu i status fajla. 35503 + Pritisnite G za pomeranje kursora na neki red u tekstu. ** 35504 + 35505 +NAPOMENA: ProÄitajte celu lekciju pre izvoÄenja bilo kog koraka!! 35506 + 35507 + 1. DrÅŸite taster CTRL i pritisnite g . Ovo zovemo CTRL-G. 35508 + Editor Äe na dnu ekrana ispisati poruku sa imenom fajla i pozicijom 35509 + kursora u tekstu. Zapamtite broj reda za 3. korak. 35510 + 35511 +NAPOMENA: U donjem desnom uglu moÅŸe se videti poziciju kursora ako je 35512 + ukljuÄena opcija 'ruler' (vidi :help ruler ili lekciju 6.5.) 35513 + 35514 + 2. Pritisnite G za pomeranje kursora na kraj teksta. 35515 + Pritisnite 1G ili gg za pomranje kursora na poÄetak teksta. 35516 + 35517 + 3. Otkucajte broj reda na kome ste malopre bili i onda G . Kursor 35518 + Äe se vratiti na red na kome je bio kad ste otkucali CTRL-G. 35519 + 35520 + 4. Ako ste spremni, izvrÅ¡ite korake od 1 do 3. 35521 + 35522 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35523 + Lekcija 4.2: KOMANDE PRETRAÅœIVANJA 35524 + 35525 + ** Otkucajte / i onda izraz koji ÅŸelite da potraÅŸite. ** 35526 + 35527 + 1. U Normal modu otkucajte znak / . Primietite da se znak pojavio 35528 + zajedno sa kursorom na dnu ekrana kao i kod komande : . 35529 + 35530 + 2. Sada otkucajte 'grrreÅ¡ka' <ENTER>. (Bez razmaka i navodnika.) 35531 + To je reÄ koju traÅŸite. 35532 + 35533 + 3. Za ponovno traÅŸenje istog izraza, otkucajte n . 35534 + Za traÅŸenje istog izraza u suprotnom smeru, otkucajte N . 35535 + 35536 + 4. Za traÅŸenje izraza unatrag, koristite ? umesto / . 35537 + 35538 + 5. Za povratak na prethodnu poziciju otkucajte CTRL-O (drÅŸite CTRL dok 35539 + pritiskate O ). Ponavljajte za ranije pozicije. CTRL-I ide napred. 35540 + 35541 +---> "grrreÅ¡ka" je pogreÅ¡no; umesto grrreÅ¡ka treba da stoji greÅ¡ka. 35542 + 35543 +NAPOMENA: Ako pretraga doÄe do kraja teksta traÅŸenje Äe se nastaviti od 35544 + njegovog poÄetka osim ako je opcija 'wrapscan' iskljuÄena. 35545 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35546 + Lekcija 4.3: TRAÅœENJE PARA ZAGRADE 35547 + 35548 + 35549 + ** Otkucajte % za nalaÅŸenje para ), ] ili } . ** 35550 + 35551 + 1. Postavite kursor na bilo koju od ( , [ ili { 35552 + otvorenih zagrada u redu oznaÄenom sa --->. 35553 + 35554 + 2. Otkucajte znak % . 35555 + 35556 + 3. Kursor Äe se pomeriti na odgovarajuÄu zatvorenu zagradu. 35557 + 35558 + 4. Otkucajte % da pomerite kursor na prvu zagradu u paru. 35559 + 35560 + 5. Pomerite kursor na neku od (,),[,],{ ili } i ponovite komandu % . 35561 + 35562 +---> Red ( testiranja obiÄnih ( [ uglastih ] i { vitiÄastih } zagrada.)) 35563 + 35564 + 35565 +NAPOMENA: Vrlo korisno u ispravljanju koda sa rasparenim zagradama! 35566 + 35567 + 35568 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35569 + Lekcija 4.4: KOMANDA ZAMENE 35570 + 35571 + 35572 + ** Otkucajte :s/staro/novo/g da zamenite 'staro' za 'novo'. ** 35573 + 35574 + 1. Pomerite kursor na red oznaÄen sa --->. 35575 + 35576 + 2. Otkucajte :s/rdi/ri/ <ENTER> . Primetite da ova komanda zamenjuje 35577 + samo prvo "rdi" u redu. 35578 + 35579 + 3. Otkucajte :s/rdi/ri/g . Dodavanje opcije g znaÄi da Äe se komanda 35580 + izvrÅ¡iti u celom redu, zamenom svih pojava niza "rdi". 35581 + 35582 +---> rdiba rdibi grdize rep. 35583 + 35584 + 4. Za zamenu svih izraza izmeÄu neka dva reda, 35585 + otkucajte :#,#s/staro/novo/g gde su #,# krajnji brojevi redova u opsegu 35586 + u kome Äe se obaviti zamena. 35587 + Otkucajte :%s/staro/novo/g za zamenu svih izraza u celom tekstu. 35588 + Otkucajte :%s/staro/novo/gc za nalaÅŸenje svih izraza u tekstu i 35589 + potvrdu zamene. 35590 + 35591 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35592 + REZIME lekcije 4 35593 + 35594 + 35595 + 1. CTRL-G prikazuje poziciju kursora u tekstu i status fajla. 35596 + G pomera kursor na kraj teksta. 35597 + broj G pomera kursor na navedeni red. 35598 + gg pomera kursor na prvi red teksta. 35599 + 35600 + 2. Kucanjem / sa izrazom taj izraz se traÅŸi UNAPRED. 35601 + Kucanjem ? sa izrazom taj izraz se traÅŸi UNAZAD. 35602 + Posle komande traÅŸenja koristite n za nalaÅŸenje izraza u istom 35603 + smeru, a N za nalaÅŸenje u suprotnom smeru. 35604 + CTRL-O vraÄa kursor na prethodnu poziciju, a CTRL-I na narednu. 35605 + 35606 + 3. Kucanjem % kad je kursor na zagradi on se pomera na njen par. 35607 + 35608 + 4. Za zamenu prvog izraza staro za izraz novo :s/staro/novo/ 35609 + Za zamenu svih izraza u celom redu :s/staro/novo/g 35610 + Za zamenu svih izraza u opsegu linija #,# :#,#s/staro/novo/g 35611 + Za zamenu u celom tekstu :%s/staro/novo/g 35612 + Za potvrdu svake zamene dodajte 'c' :%s/staro/novo/gc 35613 + 35614 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35615 + Lekcija 5.1: IZVRÅ AVANJE SPOLJAÅ NJIH KOMANDI 35616 + 35617 + 35618 + ** Otkucajte :! pa spoljaÅ¡nju komandu koju ÅŸelite da izvrÅ¡ite. ** 35619 + 35620 + 1. Otkucajte poznatu komandu : da biste namestili kursor na dno 35621 + ekrana. Time omoguÄavate unos komande u komandnoj liniji editora. 35622 + 35623 + 2. Otkucajte znak ! (uzviÄnik). Ovime omoguÄavate 35624 + izvrÅ¡avanje bilo koje spoljaÅ¡nje komande. 35625 + 35626 + 3. Kao primer otkucajte ls posle ! i pritisnite <ENTER>. Ovo Äe 35627 + prikazati sadrÅŸaj direktorijuma, kao da ste na komandnom promptu. 35628 + Otkucajte :!dir ako :!ls ne radi. 35629 + 35630 +NAPOMENA: Na ovaj naÄin moguÄe je izvrÅ¡iti bilo koju spoljaÅ¡nju komandu, 35631 + zajedno sa njenim argumentima. 35632 + 35633 +NAPOMENA: Sve : komande se izvrÅ¡avaju poÅ¡to pritisnete <ENTER> . 35634 + U daljem tekstu to neÄemo uvek napominjati. 35635 + 35636 + 35637 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35638 + Lekcija 5.2: VIÅ E O SNIMANJU FAJLOVA 35639 + 35640 + ** Za snimanje promena, otkucajte :w IME_FAJLA . ** 35641 + 35642 + 1. Otkucajte :!dir ili :!ls za pregled sadrÅŸaja direktorijuma. 35643 + VeÄ znate da morate pritisnuti <ENTER> posle toga. 35644 + 35645 + 2. Izaberite ime fajla koji joÅ¡ ne postoji, npr. TEST. 35646 + 35647 + 3. Otkucajte: :w TEST (gde je TEST ime koje ste izabrali.) 35648 + 35649 + 4. Time Äete snimiti ceo fajl (Vim Tutor) pod imenom TEST. 35650 + Za proveru, otkucajte opet :!dir ili :!ls za pregled 35651 + sadrÅŸaja direktorijuma. 35652 + 35653 +NAPOMENA: Ako biste napustili Vim i ponovo ga pokrenuli sa vim TEST , 35654 + tekst bi bio taÄna kopija ovog fajla u trenutku kad ste 35655 + ga snimili. 35656 + 35657 + 5. IzbriÅ¡ite fajl tako Å¡to Äete otkucati (MS-DOS): :!del TEST 35658 + ili (Unix): :!rm TEST 35659 + 35660 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35661 + Lekcija 5.3: SNIMANJE OZNAÄENOG TEKSTA 35662 + 35663 + 35664 + ** Da biste snimili deo teksta, otkucajte v pokret :w IME_FAJLA ** 35665 + 35666 + 1. Pomerite kursor na ovu liniju. 35667 + 35668 + 2. Pritisnite v i pomerite kursor pet redova ispod. Primetite da je 35669 + tekst oznaÄen inverzno. 35670 + 35671 + 3. Pritisnite : . Na dnu ekrana pojaviÄe se :'<,'> . 35672 + 35673 + 4. Otkucajte w TEST , gde je TEST ime fajla koji joÅ¡ ne postoji. 35674 + Proverite da zaista piÅ¡e :'<,'>w TEST pre nego Å¡to pritisnete <ENTER>. 35675 + 35676 + 5. Vim Äe snimiti oznaÄeni tekst u TEST. Proverite sa :!dir ili !ls . 35677 + Nemojte joÅ¡ brisati fajl! KoristiÄemo ga u narednoj lekciji. 35678 + 35679 +NAPOMENA: Komanda v zapoÄinje vizuelno oznaÄavanje. MoÅŸete pomerati kursor 35680 + i tako menjati veliÄinu oznaÄenog teksta. Onda moÅŸete upotrebiti 35681 + operatore nad tekstom. Na primer, d Äe izbrisati oznaÄeni tekst. 35682 + 35683 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35684 + Lekcija 5.4: UÄITAVANJE FAJLA U TEKST 35685 + 35686 + 35687 + ** Za ubacivanje sadrÅŸaja fajla, otkucajte :r IME_FAJLA ** 35688 + 35689 + 1. Postavite kursor iznad ove linije. 35690 + 35691 +NAPOMENA: PoÅ¡to izvrÅ¡ite 2. korak videÄete tekst iz lekcije 5.3. Tada 35692 + pomerite kursor DOLE da biste ponovo videli ovu lekciju. 35693 + 35694 + 2. UÄitajte fajl TEST koristeÄi komandu :r TEST gde je TEST ime fajla 35695 + koje ste koristili u prethodnoj lekciji. SadrÅŸaj uÄitanog fajla je 35696 + ubaÄen ispod kursora. 35697 + 35698 + 3. Da biste proverili da je fajl uÄitan, vratite kursor unazad i 35699 + primetite dve kopije lekcije 5.3, originalnu i onu iz fajla. 35700 + 35701 +NAPOMENA: TakoÄe moÅŸete uÄitati izlaz spoljaÅ¡nje komande. Na primer, 35702 + :r !ls Äe uÄitati izlaz komande ls i postaviti ga ispod 35703 + kursora. 35704 + 35705 + 35706 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35707 + REZIME lekcije 5 35708 + 35709 + 35710 + 1. :!komanda izvrÅ¡ava spoljaÅ¡nju komandu. 35711 + 35712 + Korisni primeri: 35713 + (MS-DOS) (Unix) 35714 + :!dir :!ls - pregled sadrÅŸaja direktorijuma. 35715 + :!del FAJL :!rm FAJL - briÅ¡e fajl FAJL. 35716 + 35717 + 2. :w FAJL zapisuje trenutni tekst na disk pod imenom FAJL. 35718 + 35719 + 3. v pokret :w IME_FAJLA snima vizuelno oznaÄene redove u fajl 35720 + IME_FAJLA. 35721 + 35722 + 4. :r IME_FAJLA uÄitava fajl IME_FAJLA sa diska i stavlja 35723 + njegov sadrÅŸaj ispod kursora. 35724 + 35725 + 5. :r !dir uÄitava izlaz komande dir i postavlja ga ispod kursora. 35726 + 35727 + 35728 + 35729 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35730 + Lekcija 6.1: KOMANDA OTVORI 35731 + 35732 + 35733 + ** Pritisnite o da biste otvorili red ispod kursora 35734 + i preÅ¡li u Insert mod. ** 35735 + 35736 + 1. Pomerite kursor na sledeÄi red oznaÄen sa --->. 35737 + 35738 + 2. Otkucajte malo o da biste otvorili novi red ISPOD kursora 35739 + i preÅ¡li u Insert mod. 35740 + 35741 + 3. Otkucajte neki tekst i onda pritisnite <ESC> da biste izaÅ¡li 35742 + iz Insert moda. 35743 + 35744 +---> Kad pritisnete o kursor prelazi u novootvoreni red u Insert modu. 35745 + 35746 + 4. Za otvaranje reda IZNAD kursora, umesto malog otkucajte veliko O . 35747 + Isprobajte na donjem redu oznaÄenom sa --->. 35748 + 35749 +---> Otvorite red iznad ovog kucanjem velikog O dok je kursor u ovom redu. 35750 + 35751 + 35752 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35753 + Lekcija 6.2: KOMANDA DODAJ 35754 + 35755 + 35756 + ** Otkucajte a za dodavanje teksta IZA kursora. ** 35757 + 35758 + 1. Pomerite kursor na poÄetak sledeÄeg reda oznaÄenog sa --->. 35759 + 35760 + 2. Kucajte e dok kursor ne doÄe na kraj reÄi re . 35761 + 35762 + 3. Otkucajte a (malo) da biste dodali tekst IZA kursora. 35763 + 35764 + 4. Dopunite reÄ kao Å¡to je u redu ispod. Pritisnite <ESC> za izlazak 35765 + iz Insert moda. 35766 + 35767 + 5. Sa e preÄite na narednu nepotpunu reÄ i ponovite korake 3 i 4. 35768 + 35769 +---> Ovaj re omoguÄava ve dodav teksta u nekom redu. 35770 +---> Ovaj red omoguÄava veÅŸbanje dodavanja teksta u nekom redu. 35771 + 35772 +NAPOMENA: Komande a, i, i A aktiviraju isti Insert mod, jedina 35773 + razlika je u poziciji od koje Äe se tekst ubacivati. 35774 + 35775 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35776 + Lekcija 6.3: DRUGI NAÄIN ZAMENE 35777 + 35778 + 35779 + ** Otkucajte veliko R da biste zamenili viÅ¡e od jednog znaka. ** 35780 + 35781 + 1. Pomerite kursor na prvi sledeÄi red oznaÄen sa --->. 35782 + Pomerite kursor na poÄetak prvog xxx . 35783 + 35784 + 2. Pritisnite R i otkucajte broj koji je red ispod, 35785 + tako da zameni xxx . 35786 + 35787 + 3. Pritisnite <ESC> za izlazak iz Replace moda. 35788 + Primetite da je ostatak reda ostao nepromenjen. 35789 + 35790 + 4. Ponovite korake da biste zamenili drugo xxx. 35791 + 35792 +---> Dodavanje 123 na xxx daje xxx. 35793 +---> Dodavanje 123 na 456 daje 579. 35794 + 35795 +NAPOMENA: Replace mod je kao Insert mod, s tom razlikom Å¡to svaki 35796 + uneti znak briÅ¡e veÄ postojeÄi. 35797 + 35798 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35799 + Lekcija 6.4: KOPIRANJE I LEPLJENJE TEKSTA 35800 + 35801 + 35802 + ** Koristite operator y za kopiranje a p za lepljenje teksta. ** 35803 + 35804 + 1. Pomerite kursor na red sa ---> i postavite kursor posle "a)". 35805 + 35806 + 2. Aktivirajte Visual mod sa v i pomerite kursor sve do ispred "prvi". 35807 + 35808 + 3. Pritisnite y da biste kopirali oznaÄeni tekst u interni bafer. 35809 + 35810 + 4. Pomerite kursor do kraja sledeÄeg reda: j$ 35811 + 35812 + 5. Pritisnite p da biste zalepili tekst. Onda otkucajte: a drugi <ESC> . 35813 + 35814 + 6. Upotrebite Visual mod da oznaÄite " red.", kopirajte sa y , kursor 35815 + pomerite na kraj sledeÄeg reda sa j$ i tamo zalepite tekst sa p . 35816 + 35817 +---> a) ovo je prvi red. 35818 + b) 35819 + 35820 +NAPOMENA: takoÄe moÅŸete koristiti y kao operator; yw kopira jednu reÄ. 35821 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35822 + Lekcija 6.5: POSTAVLJANJE OPCIJA 35823 + 35824 + 35825 + ** Postavite opciju tako da traÅŸenje i zamena ignoriÅ¡u veliÄinu slova ** 35826 + 35827 + 1. PotraÅŸite reÄ 'razlika': /razlika <ENTER> 35828 + Ponovite nekoliko puta pritiskom na n . 35829 + 35830 + 2. Aktivirajte opciju 'ic' (Ignore case): :set ic 35831 + 35832 + 3. Ponovo potraÅŸite reÄ 'razlika' pritiskom na n 35833 + Primetite da su sada pronaÄeni i RAZLIKA i Razlika. 35834 + 35835 + 4. Aktivirajte opcije 'hlsearch' i 'incsearch': :set hls is 35836 + 35837 + 5. Ponovo otkucajte komandu traÅŸenja i uoÄite razlike: /razlika <ENTER> 35838 + 35839 + 6. Za deaktiviranje opcije ic kucajte: :set noic 35840 + 35841 +NAPOMENA: Za neoznaÄavanje pronaÄenih izraza otkucajte: :nohlsearch 35842 +NAPOMENA: Ako ÅŸelite da ne razlikujete veliÄinu slova u samo jednoj komandi 35843 + traÅŸenja, dodajte \c u izraz: /razlika\c <ENTER> 35844 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35845 + REZIME lekcije 6 35846 + 35847 + 1. Pritisnite o za otvaranje reda ISPOD kursora i prelazak u Insert mod. 35848 + Pritisnite O za otvaranje reda IZNAD kursora. 35849 + 35850 + 2. Pritisnite a za unos teksta IZA kursora. 35851 + Pritisnite A za unos teksta na kraju reda. 35852 + 35853 + 3. Komanda e pomera kursor na kraj reÄi. 35854 + 35855 + 4. Operator y kopira tekst, p ga lepi. 35856 + 35857 + 5. Kucanje velikog R aktivira Replace mod dok ne pritisnete <ESC> . 35858 + 35859 + 6. Kucanje ":set xxx" aktivira opciju "xxx". Neke opcije su: 35860 + 'ic' 'ignorecase' ne razlikuje velika/mala slova pri traÅŸenju 35861 + 'is' 'incsearch' prikazuje pronaÄen tekst dok kucate izraz 35862 + 'hls' 'hlsearch' oznaÄava inverzno sve pronaÄene izraze 35863 + MoÅŸete koristite dugo ili kratko ime opcije. 35864 + 35865 + 7. Ispred imena opcije stavite "no" da je deaktivirate: :set noic 35866 + 35867 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35868 + Lekcija 7.1: DOBIJANJE POMOÄI 35869 + 35870 + 35871 + ** Koristite on-line sistem za pomoÄ ** 35872 + 35873 + Vim ima detaljan on-line sistem za pomoÄ. Za poÄetak, pokuÅ¡ajte neÅ¡to 35874 + od sledeÄeg: 35875 + - pritisnite taster <HELP> (ako ga imate na tastaturi) 35876 + - pritisnite taster <F1> (ako ga imate na tastaturi) 35877 + - otkucajte :help <ENTER> 35878 + 35879 + ProÄitajte tekst u prozoru pomoÄi da biste nauÄili pomoÄ radi. 35880 + Kucanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. 35881 + Otkucajte :q <ENTER> da zatvorite prozor pomoÄi. 35882 + 35883 + PomoÄ o praktiÄno bilo kojoj temi moÅŸete dobiti dodavanjem argumenta 35884 + komandi ":help". PokuÅ¡ajte ovo (ne zaboravite <ENTER> na kraju): 35885 + 35886 + :help w 35887 + :help c_CTRL-D 35888 + :help insert-index 35889 + :help user-manual 35890 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35891 + Lekcija 7.2: PRAVLJENJE STARTNOG SKRIPTA 35892 + 35893 + 35894 + ** Aktivirajte moguÄnosti editora ** 35895 + 35896 + Vim ima mnogo viÅ¡e moguÄnosti nego Vi, ali veÄina nije automatski 35897 + aktivirana. Za dodatne moguÄnosti napravite "vimrc" fajl. 35898 + 35899 + 1. Otvorite "vimrc" fajl. Ovo zavisi od vaÅ¡eg sistema: 35900 + :e ~/.vimrc za Unix 35901 + :e $VIM/_vimrc za MS-Windows 35902 + 35903 + 2. Onda uÄitajte primer sadrÅŸaja "vimrc" fajla: 35904 + :r $VIMRUNTIME/vimrc_example.vim 35905 + 35906 + 3. Snimite fajl sa: 35907 + :w 35908 + 35909 + SledeÄi put kada pokrenete Vim, bojenje sintakse teksta biÄe 35910 + aktivirano. Sva svoja podeÅ¡avanja moÅŸete dodati u "vimrc" fajl. 35911 + Za viÅ¡e informacija otkucajte :help vimrc-intro 35912 + 35913 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35914 + Lekcija 7.3: AUTOMATSKO DOVRÅ AVANJE 35915 + 35916 + 35917 + ** DovrÅ¡avanje komandne linije sa CTRL-D i <TAB> ** 35918 + 35919 + 1. Podesite Vim da ne bude u Vi-kompatibilnom modu: :set nocp 35920 + 35921 + 2. Pogledajte koji fajlovi postoje u direktorijumu: :!ls ili :!dir 35922 + 35923 + 3. Otkucajte poÄetak komande: :e 35924 + 35925 + 4. Otkucajte CTRL-D i Vim Äe prikazati spisak komandi koje poÄinju sa "e". 35926 + 35927 + 5. Pritisnite <TAB> i Vim Äe dopuniti ime komande u ":edit". 35928 + 35929 + 6. Dodajte razmak i poÄetak imena postojeÄeg fajla: :edit FA 35930 + 35931 + 7. Pritisnite <TAB>. Vim Äe dopuniti ime fajla (ako je jedinstveno). 35932 + 35933 +NAPOMENA: MoguÄe je dopuniti mnoge komande. Samo probajte CTRL-D i <TAB>. 35934 + NaroÄito je korisno za :help komande. 35935 + 35936 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35937 + REZIME lekcije 7 35938 + 35939 + 35940 + 1. Otkucajte :help ili pritisnite <F1> ili <Help> za pomoÄ. 35941 + 35942 + 2. Otkucajte :help komanda biste dobili pomoÄ za tu komandu. 35943 + 35944 + 3. Otkucajte CTRL-W CTRL-W za prelazak u drugi prozor. 35945 + 35946 + 4. Otkucajte :q da zatvorite prozor pomoÄi. 35947 + 35948 + 5. Napravite vimrc startni skript za aktiviranje podeÅ¡avanja koja 35949 + vam odgovaraju. 35950 + 35951 + 6. Dok kucate neku od : komandi, pritisnite CTRL-D da biste videli moguÄe 35952 + vrednosti. Pritisnite <TAB> da odaberete jednu od njih. 35953 + 35954 + 35955 + 35956 + 35957 + 35958 + 35959 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35960 + Ovim je priruÄnik zavrÅ¡en. Njegov cilj je bio kratak pregled Vim editora, 35961 + koliko da omoguÄi njegovo relativno jednostavno koriÅ¡Äenje. PriruÄnik nije 35962 + potpun, jer Vim ima mnogo viÅ¡e komandi. Kao sledeÄe, proÄitajte priruÄnik: 35963 + ":help user-manual". 35964 + 35965 + Za dalje Äitanje i uÄenje, preporuÄujemo knjigu: 35966 + Vim - Vi Improved - by Steve Oualline 35967 + IzdavaÄ: New Riders 35968 + Prva knjiga potpuno posveÄena Vim-u. NaroÄito korisna za poÄetnike. 35969 + Ima mnoÅ¡tvo primera i slika. 35970 + Vidite http://iccf-holland.org/click5.html 35971 + 35972 + SledeÄa knjiga je starija i viÅ¡e govori o Vi-u nego o Vim-u, ali je takoÄe 35973 + preporuÄujemo: 35974 + Learning the Vi Editor - by Linda Lamb 35975 + IzdavaÄ: O'Reilly & Associates Inc. 35976 + Dobra knjiga iz koje moÅŸete saznati skoro sve Å¡to moÅŸete raditi u Vi-ju. 35977 + Å esto izdanje ima i informacija o Vim-u. 35978 + 35979 + Ovaj priruÄnik su napisali: Michael C. Pierce i Robert K. Ware, 35980 + Colorado School of Mines koristeÄi ideje Charlesa Smitha, 35981 + Colorado State University. E-mail: bware@mines.colorado.edu. 35982 + 35983 + PrilagoÄavanje za Vim uradio je Bram Moolenaar. 35984 + 35985 + Prevod na srpski: Ivan Nejgebauer <ian@uns.ac.rs> 35986 + Verzija 1.0, maj/juni 2014. 35987 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35988 diff -Naur vim74.orig/runtime/tutor/tutor.vim vim74/runtime/tutor/tutor.vim 35989 --- vim74.orig/runtime/tutor/tutor.vim 2012-09-21 12:23:48.000000000 +0000 35990 +++ vim74/runtime/tutor/tutor.vim 2014-07-21 23:33:37.640139140 +0000 35991 @@ -1,7 +1,7 @@ 35992 " Vim tutor support file 35993 " Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es> 35994 " Maintainer: Bram Moolenaar 35995 -" Last Change: 2012 Sep 21 35996 +" Last Change: 2014 Jun 25 35997 35998 " This Vim script is used for detecting if a translation of the 35999 " tutor file exist, i.e., a tutor.xx file, where xx is the language. 36000 @@ -36,6 +36,8 @@ 36001 let s:ext = ".pl" 36002 elseif s:lang =~ "Slovak" 36003 let s:ext = ".sk" 36004 + elseif s:lang =~ "Serbian" 36005 + let s:ext = ".sr" 36006 elseif s:lang =~ "Czech" 36007 let s:ext = ".cs" 36008 elseif s:lang =~ "Dutch" 36009 @@ -122,6 +124,15 @@ 36010 endif 36011 endif 36012 36013 +" The Slovak tutor is available in two encodings, guess which one to use 36014 +" Note that the utf-8 version is the original, the cp1250 version is created 36015 +" from it. 36016 +if s:ext =~? '\.sr' 36017 + if &enc =~ 1250 36018 + let s:ext = ".sr.cp1250" 36019 + endif 36020 +endif 36021 + 36022 " The Czech tutor is available in three encodings, guess which one to use 36023 if s:ext =~? '\.cs' 36024 if &enc =~ 1250 30710 36025 diff -Naur vim74.orig/runtime/vimlogo.eps vim74/runtime/vimlogo.eps 30711 36026 --- vim74.orig/runtime/vimlogo.eps 2010-05-15 11:03:57.000000000 +0000 30712 +++ vim74/runtime/vimlogo.eps 2014-0 6-01 00:43:12.880816844 +000036027 +++ vim74/runtime/vimlogo.eps 2014-07-21 23:33:37.830138644 +0000 30713 36028 @@ -1,791 +1,803 @@ 30714 36029 -%!PS-Adobe-3.0 EPSF-3.0 … … 32307 37622 diff -Naur vim74.orig/runtime/vimrc_example.vim vim74/runtime/vimrc_example.vim 32308 37623 --- vim74.orig/runtime/vimrc_example.vim 2011-04-15 18:58:36.000000000 +0000 32309 +++ vim74/runtime/vimrc_example.vim 2014-0 6-01 00:43:12.944150016+000037624 +++ vim74/runtime/vimrc_example.vim 2014-07-21 23:33:37.886805163 +0000 32310 37625 @@ -1,7 +1,7 @@ 32311 37626 " An example for a vimrc file. … … 32329 37644 diff -Naur vim74.orig/src/GvimExt/Make_cyg.mak vim74/src/GvimExt/Make_cyg.mak 32330 37645 --- vim74.orig/src/GvimExt/Make_cyg.mak 2011-09-30 14:45:49.000000000 +0000 32331 +++ vim74/src/GvimExt/Make_cyg.mak 2014-0 6-01 00:43:13.007483188+000037646 +++ vim74/src/GvimExt/Make_cyg.mak 2014-07-21 23:33:37.970138279 +0000 32332 37647 @@ -31,12 +31,12 @@ 32333 37648 ifeq ($(CROSS),yes) … … 32348 37663 diff -Naur vim74.orig/src/Make_bc5.mak vim74/src/Make_bc5.mak 32349 37664 --- vim74.orig/src/Make_bc5.mak 2013-06-03 18:09:58.000000000 +0000 32350 +++ vim74/src/Make_bc5.mak 2014-0 6-01 00:43:13.324149048 +000037665 +++ vim74/src/Make_bc5.mak 2014-07-21 23:33:38.200137678 +0000 32351 37666 @@ -419,7 +419,7 @@ 32352 37667 ALIGNARG = -a$(ALIGN) … … 32360 37675 diff -Naur vim74.orig/src/Make_cyg.mak vim74/src/Make_cyg.mak 32361 37676 --- vim74.orig/src/Make_cyg.mak 2013-07-06 11:32:11.000000000 +0000 32362 +++ vim74/src/Make_cyg.mak 2014-0 6-01 00:43:13.337482348+000037677 +++ vim74/src/Make_cyg.mak 2014-07-21 23:33:38.213470977 +0000 32363 37678 @@ -1,6 +1,6 @@ 32364 37679 # … … 32398 37713 diff -Naur vim74.orig/src/Make_ming.mak vim74/src/Make_ming.mak 32399 37714 --- vim74.orig/src/Make_ming.mak 2013-07-06 11:32:11.000000000 +0000 32400 +++ vim74/src/Make_ming.mak 2014-0 6-01 00:43:13.407482170+000037715 +++ vim74/src/Make_ming.mak 2014-07-21 23:33:38.293470768 +0000 32401 37716 @@ -359,6 +359,7 @@ 32402 37717 … … 32439 37754 diff -Naur vim74.orig/src/Make_mvc.mak vim74/src/Make_mvc.mak 32440 37755 --- vim74.orig/src/Make_mvc.mak 2013-07-09 11:13:12.000000000 +0000 32441 +++ vim74/src/Make_mvc.mak 2014-0 6-01 00:43:13.444148743+000037756 +++ vim74/src/Make_mvc.mak 2014-07-21 23:33:38.343470638 +0000 32442 37757 @@ -424,6 +424,12 @@ 32443 37758 !if "$(_NMAKE_VER)" == "11.00.60610.1" … … 32512 37827 diff -Naur vim74.orig/src/Make_vms.mms vim74/src/Make_vms.mms 32513 37828 --- vim74.orig/src/Make_vms.mms 2013-05-06 02:06:04.000000000 +0000 32514 +++ vim74/src/Make_vms.mms 2014-0 6-01 00:43:13.494148616+000037829 +++ vim74/src/Make_vms.mms 2014-07-21 23:33:38.380137209 +0000 32515 37830 @@ -2,7 +2,7 @@ 32516 37831 # Makefile for Vim on OpenVMS … … 32628 37943 diff -Naur vim74.orig/src/Makefile vim74/src/Makefile 32629 37944 --- vim74.orig/src/Makefile 2013-08-10 12:21:15.000000000 +0000 32630 +++ vim74/src/Makefile 2014-0 6-01 00:43:13.524148539+000037945 +++ vim74/src/Makefile 2014-07-21 23:33:38.420137104 +0000 32631 37946 @@ -546,6 +546,7 @@ 32632 37947 # again. … … 32739 38054 diff -Naur vim74.orig/src/auto/configure vim74/src/auto/configure 32740 38055 --- vim74.orig/src/auto/configure 2013-08-04 18:01:06.000000000 +0000 32741 +++ vim74/src/auto/configure 2014-0 6-01 00:43:13.910814221+000038056 +++ vim74/src/auto/configure 2014-07-21 23:33:38.890135878 +0000 32742 38057 @@ -1,11 +1,9 @@ 32743 38058 #! /bin/sh … … 36762 42077 diff -Naur vim74.orig/src/blowfish.c vim74/src/blowfish.c 36763 42078 --- vim74.orig/src/blowfish.c 2010-12-17 18:58:18.000000000 +0000 36764 +++ vim74/src/blowfish.c 2014-0 6-01 00:43:13.954147444+000042079 +++ vim74/src/blowfish.c 2014-07-21 23:33:38.936802423 +0000 36765 42080 @@ -6,7 +6,7 @@ 36766 42081 * Do ":help credits" in Vim to see a list of people who contributed. … … 36890 42205 diff -Naur vim74.orig/src/buffer.c vim74/src/buffer.c 36891 42206 --- vim74.orig/src/buffer.c 2013-07-17 14:39:00.000000000 +0000 36892 +++ vim74/src/buffer.c 2014-0 6-01 00:43:13.980814043+000042207 +++ vim74/src/buffer.c 2014-07-21 23:33:38.956802371 +0000 36893 42208 @@ -211,7 +211,12 @@ 36894 42209 … … 36904 42219 /* 36905 42220 * Set/reset the Changed flag first, autocmds may change the buffer. 36906 @@ -671,8 +676,16 @@ 42221 @@ -366,7 +371,11 @@ 42222 unload_buf = TRUE; 42223 #endif 42224 42225 - if (win != NULL) 42226 + if (win != NULL 42227 +#ifdef FEAT_WINDOWS 42228 + && win_valid(win) /* in case autocommands closed the window */ 42229 +#endif 42230 + ) 42231 { 42232 /* Set b_last_cursor when closing the last window for the buffer. 42233 * Remember the last cursor position and window options of the buffer. 42234 @@ -671,8 +680,16 @@ 36907 42235 #endif 36908 42236 #ifdef FEAT_AUTOCMD … … 36922 42250 36923 42251 /* 36924 @@ -989,6 +100 2,50 @@42252 @@ -989,6 +1006,50 @@ 36925 42253 #if defined(FEAT_LISTCMDS) || defined(FEAT_PYTHON) \ 36926 42254 || defined(FEAT_PYTHON3) || defined(PROTO) … … 36973 42301 * Implementation of the commands for the buffer list. 36974 42302 * 36975 @@ -1109,7 +11 66,6 @@42303 @@ -1109,7 +1170,6 @@ 36976 42304 if (unload) 36977 42305 { … … 36981 42309 /* When unloading or deleting a buffer that's already unloaded and 36982 42310 * unlisted: fail silently. */ 36983 @@ -1150,30 +12 06,7 @@42311 @@ -1150,30 +1210,7 @@ 36984 42312 if (bp->b_p_bl && bp != buf) 36985 42313 break; … … 37013 42341 #ifdef FEAT_WINDOWS 37014 42342 /* 37015 @@ -1186,7 +12 19,10 @@42343 @@ -1186,7 +1223,10 @@ 37016 42344 && !(curwin->w_closing || curwin->w_buffer->b_closing) 37017 42345 # endif … … 37025 42353 37026 42354 /* 37027 @@ -1204,7 +124 0,8 @@42355 @@ -1204,7 +1244,8 @@ 37028 42356 37029 42357 /* … … 37035 42363 * Then prefer the buffer we most recently visited. 37036 42364 * Else try to find one that is loaded, after the current buffer, 37037 @@ -1303,6 +134 0,13 @@42365 @@ -1303,6 +1344,13 @@ 37038 42366 } 37039 42367 } … … 37049 42377 * make buf current buffer 37050 42378 */ 37051 @@ -1396,10 +144 0,8 @@42379 @@ -1396,10 +1444,8 @@ 37052 42380 curwin->w_alt_fnum = curbuf->b_fnum; /* remember alternate file */ 37053 42381 buflist_altfpos(curwin); /* remember curpos */ … … 37060 42388 /* close_windows() or apply_autocmds() may change curbuf */ 37061 42389 prevbuf = curbuf; 37062 @@ -1647,7 +16 89,11 @@42390 @@ -1647,7 +1693,11 @@ 37063 42391 buf->b_p_bl = TRUE; 37064 42392 #ifdef FEAT_AUTOCMD … … 37072 42400 } 37073 42401 return buf; 37074 @@ -1823,8 +18 69,14 @@42402 @@ -1823,8 +1873,14 @@ 37075 42403 if (!(flags & BLN_DUMMY)) 37076 42404 { … … 37087 42415 if (aborting()) /* autocmds may abort script processing */ 37088 42416 return NULL; 37089 @@ -1941,6 +199 3,10 @@42417 @@ -1941,6 +1997,10 @@ 37090 42418 clear_string_option(&buf->b_p_qe); 37091 42419 #endif … … 37098 42426 37099 42427 /* 37100 @@ -4059,7 +411 5,8 @@42428 @@ -4059,7 +4119,8 @@ 37101 42429 item[curitem].minwid = -syn_namen2id(t, (int)(s - t)); 37102 42430 curitem++; … … 37108 42436 } 37109 42437 37110 @@ -5468,6 +552 5,10 @@42438 @@ -5468,6 +5529,10 @@ 37111 42439 return; 37112 42440 } … … 37119 42447 buf_change_sign_type(buf, markId, typenr) 37120 42448 buf_T *buf; /* buffer to store sign in */ 37121 @@ -5636,6 +5 697,14 @@42449 @@ -5636,6 +5701,14 @@ 37122 42450 { 37123 42451 signlist_T *next; 37124 42452 37125 42453 + /* When deleting the last sign need to redraw the windows to remove the 37126 + * sign column. */37127 + if (buf->b_signlist != NULL )42454 + * sign column. Not when curwin is NULL (this means we're exiting). */ 42455 + if (buf->b_signlist != NULL && curwin != NULL) 37128 42456 + { 37129 42457 + redraw_buf_later(buf, NOT_VALID); … … 37134 42462 { 37135 42463 next = buf->b_signlist->next; 37136 @@ -5654,11 +572 3,7 @@42464 @@ -5654,11 +5727,7 @@ 37137 42465 37138 42466 for (buf = firstbuf; buf != NULL; buf = buf->b_next) … … 37148 42476 diff -Naur vim74.orig/src/charset.c vim74/src/charset.c 37149 42477 --- vim74.orig/src/charset.c 2013-02-06 15:20:01.000000000 +0000 37150 +++ vim74/src/charset.c 2014-06-01 00:43:14.000813992 +0000 37151 @@ -1380,10 +1380,7 @@ 42478 +++ vim74/src/charset.c 2014-07-21 23:33:38.990135617 +0000 42479 @@ -867,9 +867,10 @@ 42480 char_u *s; 42481 { 42482 colnr_T col = startcol; 42483 + char_u *line = s; /* pointer to start of line, for breakindent */ 42484 42485 while (*s != NUL) 42486 - col += lbr_chartabsize_adv(&s, col); 42487 + col += lbr_chartabsize_adv(line, &s, col); 42488 return (int)col; 42489 } 42490 42491 @@ -877,16 +878,17 @@ 42492 * Like linetabsize(), but for a given window instead of the current one. 42493 */ 42494 int 42495 -win_linetabsize(wp, p, len) 42496 +win_linetabsize(wp, line, len) 42497 win_T *wp; 42498 - char_u *p; 42499 + char_u *line; 42500 colnr_T len; 42501 { 42502 colnr_T col = 0; 42503 char_u *s; 42504 42505 - for (s = p; *s != NUL && (len == MAXCOL || s < p + len); mb_ptr_adv(s)) 42506 - col += win_lbr_chartabsize(wp, s, col, NULL); 42507 + for (s = line; *s != NUL && (len == MAXCOL || s < line + len); 42508 + mb_ptr_adv(s)) 42509 + col += win_lbr_chartabsize(wp, line, s, col, NULL); 42510 return (int)col; 42511 } 42512 42513 @@ -1021,12 +1023,13 @@ 42514 * like chartabsize(), but also check for line breaks on the screen 42515 */ 42516 int 42517 -lbr_chartabsize(s, col) 42518 +lbr_chartabsize(line, s, col) 42519 + char_u *line UNUSED; /* start of the line */ 42520 unsigned char *s; 42521 colnr_T col; 42522 { 42523 #ifdef FEAT_LINEBREAK 42524 - if (!curwin->w_p_lbr && *p_sbr == NUL) 42525 + if (!curwin->w_p_lbr && *p_sbr == NUL && !curwin->w_p_bri) 42526 { 42527 #endif 42528 #ifdef FEAT_MBYTE 42529 @@ -1036,7 +1039,7 @@ 42530 RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col) 42531 #ifdef FEAT_LINEBREAK 42532 } 42533 - return win_lbr_chartabsize(curwin, s, col, NULL); 42534 + return win_lbr_chartabsize(curwin, line == NULL ? s : line, s, col, NULL); 42535 #endif 42536 } 42537 42538 @@ -1044,13 +1047,14 @@ 42539 * Call lbr_chartabsize() and advance the pointer. 42540 */ 42541 int 42542 -lbr_chartabsize_adv(s, col) 42543 +lbr_chartabsize_adv(line, s, col) 42544 + char_u *line; /* start of the line */ 42545 char_u **s; 42546 colnr_T col; 42547 { 42548 int retval; 42549 42550 - retval = lbr_chartabsize(*s, col); 42551 + retval = lbr_chartabsize(line, *s, col); 42552 mb_ptr_adv(*s); 42553 return retval; 42554 } 42555 @@ -1063,8 +1067,9 @@ 42556 * value, init to 0 before calling. 42557 */ 42558 int 42559 -win_lbr_chartabsize(wp, s, col, headp) 42560 +win_lbr_chartabsize(wp, line, s, col, headp) 42561 win_T *wp; 42562 + char_u *line UNUSED; /* start of the line */ 42563 char_u *s; 42564 colnr_T col; 42565 int *headp UNUSED; 42566 @@ -1073,6 +1078,7 @@ 42567 int c; 42568 int size; 42569 colnr_T col2; 42570 + colnr_T col_adj = 0; /* col + screen size of tab */ 42571 colnr_T colmax; 42572 int added; 42573 # ifdef FEAT_MBYTE 42574 @@ -1086,9 +1092,9 @@ 42575 int n; 42576 42577 /* 42578 - * No 'linebreak' and 'showbreak': return quickly. 42579 + * No 'linebreak', 'showbreak' and 'breakindent': return quickly. 42580 */ 42581 - if (!wp->w_p_lbr && *p_sbr == NUL) 42582 + if (!wp->w_p_lbr && !wp->w_p_bri && *p_sbr == NUL) 42583 #endif 42584 { 42585 #ifdef FEAT_MBYTE 42586 @@ -1104,6 +1110,8 @@ 42587 */ 42588 size = win_chartabsize(wp, s, col); 42589 c = *s; 42590 + if (tab_corr) 42591 + col_adj = size - 1; 42592 42593 /* 42594 * If 'linebreak' set check at a blank before a non-blank if the line 42595 @@ -1112,7 +1120,6 @@ 42596 if (wp->w_p_lbr 42597 && vim_isbreak(c) 42598 && !vim_isbreak(s[1]) 42599 - && !wp->w_p_list 42600 && wp->w_p_wrap 42601 # ifdef FEAT_VERTSPLIT 42602 && wp->w_width != 0 42603 @@ -1125,12 +1132,13 @@ 42604 */ 42605 numberextra = win_col_off(wp); 42606 col2 = col; 42607 - colmax = (colnr_T)(W_WIDTH(wp) - numberextra); 42608 + colmax = (colnr_T)(W_WIDTH(wp) - numberextra - col_adj); 42609 if (col >= colmax) 42610 { 42611 - n = colmax + win_col_off2(wp); 42612 + colmax += col_adj; 42613 + n = colmax + win_col_off2(wp); 42614 if (n > 0) 42615 - colmax += (((col - colmax) / n) + 1) * n; 42616 + colmax += (((col - colmax) / n) + 1) * n - col_adj; 42617 } 42618 42619 for (;;) 42620 @@ -1147,7 +1155,7 @@ 42621 col2 += win_chartabsize(wp, s, col2); 42622 if (col2 >= colmax) /* doesn't fit */ 42623 { 42624 - size = colmax - col; 42625 + size = colmax - col + col_adj; 42626 tab_corr = FALSE; 42627 break; 42628 } 42629 @@ -1163,11 +1171,12 @@ 42630 # endif 42631 42632 /* 42633 - * May have to add something for 'showbreak' string at start of line 42634 + * May have to add something for 'breakindent' and/or 'showbreak' 42635 + * string at start of line. 42636 * Set *headp to the size of what we add. 42637 */ 42638 added = 0; 42639 - if (*p_sbr != NUL && wp->w_p_wrap && col != 0) 42640 + if ((*p_sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0) 42641 { 42642 numberextra = win_col_off(wp); 42643 col += numberextra + mb_added; 42644 @@ -1180,7 +1189,12 @@ 42645 } 42646 if (col == 0 || col + size > (colnr_T)W_WIDTH(wp)) 42647 { 42648 - added = vim_strsize(p_sbr); 42649 + added = 0; 42650 + if (*p_sbr != NUL) 42651 + added += vim_strsize(p_sbr); 42652 + if (wp->w_p_bri) 42653 + added += get_breakindent_win(wp, line); 42654 + 42655 if (tab_corr) 42656 size += (added / wp->w_buffer->b_p_ts) * wp->w_buffer->b_p_ts; 42657 else 42658 @@ -1274,13 +1288,14 @@ 42659 colnr_T vcol; 42660 char_u *ptr; /* points to current char */ 42661 char_u *posptr; /* points to char at pos->col */ 42662 + char_u *line; /* start of the line */ 42663 int incr; 42664 int head; 42665 int ts = wp->w_buffer->b_p_ts; 42666 int c; 42667 42668 vcol = 0; 42669 - ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); 42670 + line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE); 42671 if (pos->col == MAXCOL) 42672 posptr = NULL; /* continue until the NUL */ 42673 else 42674 @@ -1288,12 +1303,13 @@ 42675 42676 /* 42677 * This function is used very often, do some speed optimizations. 42678 - * When 'list', 'linebreak' and 'showbreak' are not set use a simple loop. 42679 + * When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set 42680 + * use a simple loop. 42681 * Also use this when 'list' is set but tabs take their normal size. 42682 */ 42683 if ((!wp->w_p_list || lcs_tab1 != NUL) 42684 #ifdef FEAT_LINEBREAK 42685 - && !wp->w_p_lbr && *p_sbr == NUL 42686 + && !wp->w_p_lbr && *p_sbr == NUL && !wp->w_p_bri 42687 #endif 42688 ) 42689 { 42690 @@ -1355,7 +1371,7 @@ 42691 { 42692 /* A tab gets expanded, depending on the current column */ 42693 head = 0; 42694 - incr = win_lbr_chartabsize(wp, ptr, vcol, &head); 42695 + incr = win_lbr_chartabsize(wp, line, ptr, vcol, &head); 42696 /* make sure we don't go past the end of the line */ 42697 if (*ptr == NUL) 42698 { 42699 @@ -1380,10 +1396,7 @@ 37152 42700 && (State & NORMAL) 37153 42701 && !wp->w_p_list … … 37161 42709 *cursor = vcol + incr - 1; /* cursor at end */ 37162 42710 else 37163 @@ -1463,7 +14 60,6 @@42711 @@ -1463,7 +1476,6 @@ 37164 42712 } 37165 42713 #endif … … 37169 42717 * Get the leftmost and rightmost virtual column of pos1 and pos2. 37170 42718 * Used for Visual block mode. 37171 @@ -1500,7 +1 496,6 @@42719 @@ -1500,7 +1512,6 @@ 37172 42720 else 37173 42721 *right = to1; … … 37179 42727 diff -Naur vim74.orig/src/config.h.in vim74/src/config.h.in 37180 42728 --- vim74.orig/src/config.h.in 2013-02-26 13:18:19.000000000 +0000 37181 +++ vim74/src/config.h.in 2014-0 6-01 00:43:14.020813941+000042729 +++ vim74/src/config.h.in 2014-07-21 23:33:39.016802214 +0000 37182 42730 @@ -37,10 +37,10 @@ 37183 42731 #undef UNIX … … 37208 42756 +/* Define if we have AvailabilityMacros.h on Mac OS X */ 37209 42757 +#undef HAVE_AVAILABILITYMACROS_H 42758 diff -Naur vim74.orig/src/config.mk.in vim74/src/config.mk.in 42759 --- vim74.orig/src/config.mk.in 2010-11-03 21:26:24.000000000 +0000 42760 +++ vim74/src/config.mk.in 2014-07-21 23:33:39.036802162 +0000 42761 @@ -164,6 +164,8 @@ 42762 ### If the *.po files are to be translated to *.mo files. 42763 MAKEMO = @MAKEMO@ 42764 42765 +MSGFMT = @MSGFMT@ 42766 + 42767 # Make sure that "make first" will run "make all" once configure has done its 42768 # work. This is needed when using the Makefile in the top directory. 42769 first: all 37210 42770 diff -Naur vim74.orig/src/configure.in vim74/src/configure.in 37211 42771 --- vim74.orig/src/configure.in 2013-08-04 18:00:50.000000000 +0000 37212 +++ vim74/src/configure.in 2014-0 6-01 00:43:14.080813788 +000042772 +++ vim74/src/configure.in 2014-07-21 23:33:39.076802058 +0000 37213 42773 @@ -14,6 +14,7 @@ 37214 42774 AC_PROG_CC dnl required by almost everything … … 37733 43293 diff -Naur vim74.orig/src/diff.c vim74/src/diff.c 37734 43294 --- vim74.orig/src/diff.c 2013-07-17 11:43:15.000000000 +0000 37735 +++ vim74/src/diff.c 2014-0 6-01 00:43:14.104147062 +000043295 +++ vim74/src/diff.c 2014-07-21 23:33:39.123468602 +0000 37736 43296 @@ -622,6 +622,7 @@ 37737 43297 wp->w_topfill = (n < 0 ? 0 : n); … … 37751 43311 /* Set 'diff', 'scrollbind' off and 'wrap' on. If option values 37752 43312 * were saved in diff_win_options() restore them. */ 43313 diff -Naur vim74.orig/src/digraph.c vim74/src/digraph.c 43314 --- vim74.orig/src/digraph.c 2012-01-10 20:57:16.000000000 +0000 43315 +++ vim74/src/digraph.c 2014-07-21 23:33:39.150135200 +0000 43316 @@ -1425,6 +1425,8 @@ 43317 {'W', '=', 0x20a9}, 43318 {'=', 'e', 0x20ac}, /* euro */ 43319 {'E', 'u', 0x20ac}, /* euro */ 43320 + {'=', 'R', 0x20bd}, /* rouble */ 43321 + {'=', 'P', 0x20bd}, /* rouble */ 43322 {'o', 'C', 0x2103}, 43323 {'c', 'o', 0x2105}, 43324 {'o', 'F', 0x2109}, 37753 43325 diff -Naur vim74.orig/src/dosinst.c vim74/src/dosinst.c 37754 43326 --- vim74.orig/src/dosinst.c 2013-05-06 02:06:04.000000000 +0000 37755 +++ vim74/src/dosinst.c 2014-0 6-01 00:43:14.177480209+000043327 +++ vim74/src/dosinst.c 2014-07-21 23:33:39.196801744 +0000 37756 43328 @@ -1192,23 +1192,29 @@ 37757 43329 fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n"); … … 37806 43378 diff -Naur vim74.orig/src/edit.c vim74/src/edit.c 37807 43379 --- vim74.orig/src/edit.c 2013-07-04 18:22:25.000000000 +0000 37808 +++ vim74/src/edit.c 2014-0 6-01 00:43:14.210813457+000043380 +++ vim74/src/edit.c 2014-07-21 23:33:39.273468211 +0000 37809 43381 @@ -199,7 +199,7 @@ 37810 43382 static void spell_back_to_badword __ARGS((void)); … … 38019 43591 38020 43592 /* 43593 @@ -1951,7 +1956,7 @@ 43594 else 43595 #endif 43596 ++new_cursor_col; 43597 - vcol += lbr_chartabsize(ptr + new_cursor_col, (colnr_T)vcol); 43598 + vcol += lbr_chartabsize(ptr, ptr + new_cursor_col, (colnr_T)vcol); 43599 } 43600 vcol = last_vcol; 43601 38021 43602 @@ -3467,7 +3472,6 @@ 38022 43603 } … … 38088 43669 else if (first_match_pos.lnum == last_match_pos.lnum 38089 43670 && first_match_pos.col == last_match_pos.col) 38090 @@ -5184,9 +5196,21 @@ 43671 @@ -4580,7 +4592,10 @@ 43672 */ 43673 i = compl_col + (compl_cont_status & CONT_ADDING ? compl_length : 0); 43674 backspace_until_column(i); 43675 + 43676 + /* Not sure what is still valid, better redraw everything. */ 43677 changed_cline_bef_curs(); 43678 + redraw_curbuf_later(NOT_VALID); 43679 } 43680 43681 /* Insert the new text being completed. */ 43682 @@ -5184,9 +5199,21 @@ 38091 43683 } 38092 43684 else if (ctrl_x_mode == CTRL_X_FILES) … … 38113 43705 compl_pattern = addstar(line + compl_col, compl_length, 38114 43706 EXPAND_FILES); 38115 @@ -5262,7 +528 6,8 @@43707 @@ -5262,7 +5289,8 @@ 38116 43708 { 38117 43709 ctrl_x_mode = 0; … … 38123 43715 } 38124 43716 38125 @@ -5521,15 +554 6,18 @@43717 @@ -5521,15 +5549,18 @@ 38126 43718 38127 43719 /* Show a message about what (completion) mode we're in. */ … … 38149 43741 /* Show the popup menu, unless we got interrupted. */ 38150 43742 if (!compl_interrupted) 38151 @@ -6687,7 +671 5,7 @@43743 @@ -6687,7 +6718,7 @@ 38152 43744 if (!arrow_used) /* something has been inserted */ 38153 43745 { … … 38158 43750 } 38159 43751 #ifdef FEAT_SPELL 38160 @@ -6776,9 +680 4,10 @@43752 @@ -6776,9 +6807,10 @@ 38161 43753 * to another window/buffer. 38162 43754 */ … … 38170 43762 int cc; 38171 43763 char_u *ptr; 38172 @@ -6849,7 +68 78,7 @@43764 @@ -6849,7 +6881,7 @@ 38173 43765 * Do this when ESC was used or moving the cursor up/down. 38174 43766 * Check for the old position still being valid, just in case the text … … 38179 43771 && end_insert_pos->lnum <= curbuf->b_ml.ml_line_count) 38180 43772 { 38181 @@ -6872,7 +690 1,6 @@43773 @@ -6872,7 +6904,6 @@ 38182 43774 else if (cc != NUL) 38183 43775 ++curwin->w_cursor.col; /* put cursor back on the NUL */ … … 38187 43779 * deleted characters. */ 38188 43780 if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) 38189 @@ -6882,12 +691 0,11 @@43781 @@ -6882,12 +6913,11 @@ 38190 43782 if (VIsual.col > len) 38191 43783 { … … 38202 43794 } 38203 43795 did_ai = FALSE; 38204 @@ -6902,6 +69 29,7 @@43796 @@ -6902,6 +6932,7 @@ 38205 43797 if (end_insert_pos != NULL) 38206 43798 { … … 38210 43802 } 38211 43803 } 38212 @@ -7845,8 +7873,7 @@ 43804 @@ -7098,9 +7129,10 @@ 43805 for (;;) 43806 { 43807 coladvance(v - width); 43808 - /* getviscol() is slow, skip it when 'showbreak' is empty and 43809 - * there are no multi-byte characters */ 43810 - if ((*p_sbr == NUL 43811 + /* getviscol() is slow, skip it when 'showbreak' is empty, 43812 + * 'breakindent' is not set and there are no multi-byte 43813 + * characters */ 43814 + if ((*p_sbr == NUL && !curwin->w_p_bri 43815 # ifdef FEAT_MBYTE 43816 && !has_mbyte 43817 # endif 43818 @@ -7845,8 +7877,7 @@ 38213 43819 if (try_match && keytyped == ':') 38214 43820 { … … 38220 43826 /* Need to get the line again after cin_islabel(). */ 38221 43827 p = ml_get_curline(); 38222 @@ -7856,7 +788 3,7 @@43828 @@ -7856,7 +7887,7 @@ 38223 43829 { 38224 43830 p[curwin->w_cursor.col - 1] = ' '; … … 38229 43835 p[curwin->w_cursor.col - 1] = ':'; 38230 43836 if (i) 38231 @@ -8084,9 +811 1,7 @@43837 @@ -8084,9 +8115,7 @@ 38232 43838 int need_redraw = FALSE; 38233 43839 int regname; … … 38239 43845 /* 38240 43846 * If we are going to wait for a character, show a '"'. 38241 @@ -8190,11 +821 5,9 @@43847 @@ -8190,11 +8219,9 @@ 38242 43848 if (need_redraw || stuff_empty()) 38243 43849 edit_unputchar(); … … 38251 43857 38252 43858 /* 38253 @@ -8237,6 +826 0,7 @@43859 @@ -8237,6 +8264,7 @@ 38254 43860 38255 43861 /* Need to reset Insstart, esp. because a BS that joins … … 38259 43865 break; 38260 43866 38261 @@ -8366,7 +839 0,7 @@43867 @@ -8366,7 +8394,7 @@ 38262 43868 disabled_redraw = TRUE; 38263 43869 return FALSE; /* repeat the insert */ … … 38268 43874 } 38269 43875 38270 @@ -8390,11 +841 4,7 @@43876 @@ -8390,11 +8418,7 @@ 38271 43877 #endif 38272 43878 ) … … 38281 43887 && !revins_on 38282 43888 #endif 38283 @@ -8496,7 +85 16,6 @@43889 @@ -8496,7 +8520,6 @@ 38284 43890 } 38285 43891 #endif … … 38289 43895 * If 'keymodel' contains "startsel", may start selection. 38290 43896 * Returns TRUE when a CTRL-O and other keys stuffed. 38291 @@ -8552,7 +857 1,6 @@43897 @@ -8552,7 +8575,6 @@ 38292 43898 } 38293 43899 return FALSE; … … 38297 43903 /* 38298 43904 * <Insert> key in Insert mode: toggle insert/replace mode. 38299 @@ -8672,7 +869 0,7 @@43905 @@ -8672,7 +8694,7 @@ 38300 43906 { 38301 43907 temp = curwin->w_cursor.col; … … 38306 43912 else 38307 43913 curwin->w_cursor.col = temp; 38308 @@ -8747,8 +876 5,8 @@43914 @@ -8747,8 +8769,8 @@ 38309 43915 ((curwin->w_cursor.lnum == 1 && curwin->w_cursor.col == 0) 38310 43916 || (!can_bs(BS_START) … … 38317 43923 && curwin->w_cursor.col <= ai_col) 38318 43924 || (!can_bs(BS_EOL) && curwin->w_cursor.col == 0)))) 38319 @@ -8799,8 +88 17,8 @@43925 @@ -8799,8 +8821,8 @@ 38320 43926 */ 38321 43927 if (curwin->w_cursor.col == 0) … … 38328 43934 || revins_on 38329 43935 #endif 38330 @@ -8809,8 +88 27,8 @@43936 @@ -8809,8 +8831,8 @@ 38331 43937 if (u_save((linenr_T)(curwin->w_cursor.lnum - 2), 38332 43938 (linenr_T)(curwin->w_cursor.lnum + 1)) == FAIL) … … 38339 43945 /* 38340 43946 * In replace mode: 38341 @@ -8853,7 +887 1,7 @@43947 @@ -8853,7 +8875,7 @@ 38342 43948 ptr[len - 1] = NUL; 38343 43949 } … … 38348 43954 inc_cursor(); 38349 43955 } 38350 @@ -8946,7 +896 4,7 @@43956 @@ -8946,7 +8968,7 @@ 38351 43957 38352 43958 *inserted_space_p = FALSE; … … 38357 43963 ts = (int)get_sts_value(); 38358 43964 /* Compute the virtual column where we want to be. Since 38359 @@ -8968,9 +89 86,9 @@43965 @@ -8968,9 +8990,9 @@ 38360 43966 while (vcol < want_vcol) 38361 43967 { … … 38370 43976 #ifdef FEAT_VREPLACE 38371 43977 if (State & VREPLACE_FLAG) 38372 @@ -9058,8 +90 76,8 @@43978 @@ -9058,8 +9080,8 @@ 38373 43979 revins_on || 38374 43980 #endif … … 38381 43987 } 38382 43988 #ifdef FEAT_SMARTINDENT 38383 @@ -9077,9 +909 5,9 @@43989 @@ -9077,9 +9099,9 @@ 38384 43990 AppendCharToRedobuff(c); 38385 43991 … … 38394 44000 /* vi behaviour: the cursor moves backward but the character that 38395 44001 * was there remains visible 38396 @@ -9635,7 +965 3,7 @@44002 @@ -9635,7 +9657,7 @@ 38397 44003 * When nothing special, insert TAB like a normal character 38398 44004 */ … … 38403 44009 return TRUE; 38404 44010 38405 @@ -9651,7 +96 69,7 @@44011 @@ -9651,7 +9673,7 @@ 38406 44012 AppendToRedobuff((char_u *)"\t"); 38407 44013 … … 38412 44018 temp = (int)get_sts_value(); 38413 44019 else /* otherwise use 'tabstop' */ 44020 @@ -9740,11 +9762,11 @@ 44021 getvcol(curwin, &fpos, &vcol, NULL, NULL); 44022 getvcol(curwin, cursor, &want_vcol, NULL, NULL); 44023 44024 - /* Use as many TABs as possible. Beware of 'showbreak' and 44025 - * 'linebreak' adding extra virtual columns. */ 44026 + /* Use as many TABs as possible. Beware of 'breakindent', 'showbreak' 44027 + * and 'linebreak' adding extra virtual columns. */ 44028 while (vim_iswhite(*ptr)) 44029 { 44030 - i = lbr_chartabsize((char_u *)"\t", vcol); 44031 + i = lbr_chartabsize(NULL, (char_u *)"\t", vcol); 44032 if (vcol + i > want_vcol) 44033 break; 44034 if (*ptr != TAB) 44035 @@ -9766,11 +9788,12 @@ 44036 if (change_col >= 0) 44037 { 44038 int repl_off = 0; 44039 + char_u *line = ptr; 44040 44041 /* Skip over the spaces we need. */ 44042 while (vcol < want_vcol && *ptr == ' ') 44043 { 44044 - vcol += lbr_chartabsize(ptr, vcol); 44045 + vcol += lbr_chartabsize(line, ptr, vcol); 44046 ++ptr; 44047 ++repl_off; 44048 } 44049 @@ -10011,6 +10034,7 @@ 44050 int c; 44051 int temp; 44052 char_u *ptr, *prev_ptr; 44053 + char_u *line; 44054 44055 if (lnum < 1 || lnum > curbuf->b_ml.ml_line_count) 44056 { 44057 @@ -10020,13 +10044,13 @@ 44058 44059 /* try to advance to the cursor column */ 44060 temp = 0; 44061 - ptr = ml_get(lnum); 44062 + line = ptr = ml_get(lnum); 44063 prev_ptr = ptr; 44064 validate_virtcol(); 44065 while ((colnr_T)temp < curwin->w_virtcol && *ptr != NUL) 44066 { 44067 prev_ptr = ptr; 44068 - temp += lbr_chartabsize_adv(&ptr, (colnr_T)temp); 44069 + temp += lbr_chartabsize_adv(line, &ptr, (colnr_T)temp); 44070 } 44071 if ((colnr_T)temp > curwin->w_virtcol) 44072 ptr = prev_ptr; 38414 44073 diff -Naur vim74.orig/src/eval.c vim74/src/eval.c 38415 44074 --- vim74.orig/src/eval.c 2013-07-05 16:23:42.000000000 +0000 38416 +++ vim74/src/eval.c 2014-0 6-01 00:43:14.237480056+000044075 +++ vim74/src/eval.c 2014-07-21 23:33:39.406801197 +0000 38417 44076 @@ -125,9 +125,6 @@ 38418 44077 */ … … 38425 44084 * When recursively copying lists and dicts we need to remember which ones we 38426 44085 * have done to avoid endless recursiveness. This unique ID is used for that. 38427 @@ -156,6 +153,11 @@ 44086 @@ -137,6 +134,9 @@ 44087 #define COPYID_INC 2 44088 #define COPYID_MASK (~0x1) 44089 44090 +/* Abort conversion to string after a recursion error. */ 44091 +static int did_echo_string_emsg = FALSE; 44092 + 44093 /* 44094 * Array to hold the hashtab with variables local to each sourced script. 44095 * Each item holds a variable (nameless) that points to the dict_T. 44096 @@ -156,6 +156,11 @@ 38428 44097 /* Values for trans_function_name() argument: */ 38429 44098 #define TFN_INT 1 /* internal function name OK */ … … 38437 44106 /* 38438 44107 * Structure to hold info for a user function. 38439 @@ -356,8 +3 58,10 @@44108 @@ -356,8 +361,10 @@ 38440 44109 {VV_NAME("mouse_col", VAR_NUMBER), 0}, 38441 44110 {VV_NAME("operator", VAR_STRING), VV_RO}, … … 38448 44117 38449 44118 /* shorthand */ 38450 @@ -389,7 +39 3,7 @@44119 @@ -389,7 +396,7 @@ 38451 44120 static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first)); 38452 44121 static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op)); … … 38457 44126 static void set_var_lval __ARGS((lval_T *lp, char_u *endp, typval_T *rettv, int copy, char_u *op)); 38458 44127 static int tv_op __ARGS((typval_T *tv1, typval_T *tv2, char_u *op)); 38459 @@ -444,7 +4 48,7 @@44128 @@ -444,7 +451,7 @@ 38460 44129 #endif 38461 44130 static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate)); … … 38466 44135 static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict)); 38467 44136 static void emsg_funcname __ARGS((char *ermsg, char_u *name)); 38468 @@ -459,6 +46 3,7 @@44137 @@ -459,6 +466,7 @@ 38469 44138 static void f_append __ARGS((typval_T *argvars, typval_T *rettv)); 38470 44139 static void f_argc __ARGS((typval_T *argvars, typval_T *rettv)); … … 38474 44143 #ifdef FEAT_FLOAT 38475 44144 static void f_asin __ARGS((typval_T *argvars, typval_T *rettv)); 38476 @@ -474,7 +4 79,9 @@44145 @@ -474,7 +482,9 @@ 38477 44146 static void f_bufnr __ARGS((typval_T *argvars, typval_T *rettv)); 38478 44147 static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv)); … … 38484 44153 #ifdef FEAT_FLOAT 38485 44154 static void f_ceil __ARGS((typval_T *argvars, typval_T *rettv)); 38486 @@ -508,6 +51 5,7 @@44155 @@ -508,6 +518,7 @@ 38487 44156 static void f_eval __ARGS((typval_T *argvars, typval_T *rettv)); 38488 44157 static void f_eventhandler __ARGS((typval_T *argvars, typval_T *rettv)); … … 38492 44161 #ifdef FEAT_FLOAT 38493 44162 static void f_exp __ARGS((typval_T *argvars, typval_T *rettv)); 38494 @@ -552,6 +56 0,7 @@44163 @@ -552,6 +563,7 @@ 38495 44164 static void f_getline __ARGS((typval_T *argvars, typval_T *rettv)); 38496 44165 static void f_getmatches __ARGS((typval_T *argvars, typval_T *rettv)); … … 38500 44169 static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv)); 38501 44170 static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv)); 38502 @@ -719,6 +728,7 @@ 44171 @@ -610,6 +622,7 @@ 44172 static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv)); 44173 static void f_match __ARGS((typval_T *argvars, typval_T *rettv)); 44174 static void f_matchadd __ARGS((typval_T *argvars, typval_T *rettv)); 44175 +static void f_matchaddpos __ARGS((typval_T *argvars, typval_T *rettv)); 44176 static void f_matcharg __ARGS((typval_T *argvars, typval_T *rettv)); 44177 static void f_matchdelete __ARGS((typval_T *argvars, typval_T *rettv)); 44178 static void f_matchend __ARGS((typval_T *argvars, typval_T *rettv)); 44179 @@ -719,6 +732,7 @@ 38503 44180 static void f_synstack __ARGS((typval_T *argvars, typval_T *rettv)); 38504 44181 static void f_synconcealed __ARGS((typval_T *argvars, typval_T *rettv)); … … 38508 44185 static void f_tabpagenr __ARGS((typval_T *argvars, typval_T *rettv)); 38509 44186 static void f_tabpagewinnr __ARGS((typval_T *argvars, typval_T *rettv)); 38510 @@ -739,6 +7 49,7 @@44187 @@ -739,6 +753,7 @@ 38511 44188 static void f_type __ARGS((typval_T *argvars, typval_T *rettv)); 38512 44189 static void f_undofile __ARGS((typval_T *argvars, typval_T *rettv)); … … 38516 44193 static void f_virtcol __ARGS((typval_T *argvars, typval_T *rettv)); 38517 44194 static void f_visualmode __ARGS((typval_T *argvars, typval_T *rettv)); 38518 @@ -755,7 +7 66,7 @@44195 @@ -755,7 +770,7 @@ 38519 44196 static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv)); 38520 44197 static void f_xor __ARGS((typval_T *argvars, typval_T *rettv)); … … 38525 44202 static int get_env_len __ARGS((char_u **arg)); 38526 44203 static int get_id_len __ARGS((char_u **arg)); 38527 @@ -767,7 +7 78,7 @@44204 @@ -767,7 +782,7 @@ 38528 44205 static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end)); 38529 44206 static int eval_isnamec __ARGS((int c)); … … 38534 44211 static typval_T *alloc_tv __ARGS((void)); 38535 44212 static typval_T *alloc_string_tv __ARGS((char_u *string)); 38536 @@ -778,8 +7 89,8 @@44213 @@ -778,8 +793,8 @@ 38537 44214 static char_u *get_tv_string __ARGS((typval_T *varp)); 38538 44215 static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf)); … … 38545 44222 static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val)); 38546 44223 static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi)); 38547 @@ -799,7 +81 0,7 @@44224 @@ -799,7 +814,7 @@ 38548 44225 static void list_func_head __ARGS((ufunc_T *fp, int indent)); 38549 44226 static ufunc_T *find_func __ARGS((char_u *name)); … … 38554 44231 static void func_do_profile __ARGS((ufunc_T *fp)); 38555 44232 static void prof_sort_list __ARGS((FILE *fd, ufunc_T **sorttab, int st_len, char *title, int prefer_self)); 38556 @@ -828,6 +8 39,8 @@44233 @@ -828,6 +843,8 @@ 38557 44234 static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos)); 38558 44235 static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp)); … … 38563 44240 38564 44241 #ifdef EBCDIC 38565 @@ -869,6 +88 2,7 @@44242 @@ -869,6 +886,7 @@ 38566 44243 hash_add(&compat_hashtab, p->vv_di.di_key); 38567 44244 } … … 38571 44248 38572 44249 #ifdef EBCDIC 38573 @@ -915,12 +9 29,13 @@44250 @@ -915,12 +933,13 @@ 38574 44251 /* autoloaded script names */ 38575 44252 ga_clear_strings(&ga_loaded); … … 38588 44265 38589 44266 /* unreferenced lists and dicts */ 38590 @@ -1054,7 +10 69,7 @@44267 @@ -1054,7 +1073,7 @@ 38591 44268 ga_init2(&redir_ga, (int)sizeof(char), 500); 38592 44269 … … 38597 44274 if (redir_endp == NULL || redir_lval->ll_name == NULL || *redir_endp != NUL) 38598 44275 { 38599 @@ -1145,7 +116 0,7 @@44276 @@ -1145,7 +1164,7 @@ 38600 44277 /* Call get_lval() again, if it's inside a Dict or List it may 38601 44278 * have changed. */ … … 38606 44283 set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); 38607 44284 clear_lval(redir_lval); 38608 @@ -1848,8 +186 3,9 @@44285 @@ -1848,8 +1867,9 @@ 38609 44286 return; 38610 44287 if (argend > arg && argend[-1] == '.') /* for var.='str' */ … … 38618 44295 /* 38619 44296 * ":let" without "=": list variables 38620 @@ -1878,12 +189 4,14 @@44297 @@ -1878,12 +1898,14 @@ 38621 44298 { 38622 44299 op[0] = '='; … … 38637 44314 if (eap->skip) 38638 44315 ++emsg_skip; 38639 @@ -2234,7 +225 2,7 @@44316 @@ -2234,7 +2256,7 @@ 38640 44317 { 38641 44318 if (tofree != NULL) … … 38646 44323 else 38647 44324 { 38648 @@ -2445,7 +246 3,7 @@44325 @@ -2445,7 +2467,7 @@ 38649 44326 p = get_tv_string_chk(tv); 38650 44327 if (p != NULL && op != NULL && *op == '.') … … 38655 44332 { 38656 44333 p = ptofree = concat_str(s, p); 38657 @@ -2469,7 +24 87,7 @@44334 @@ -2469,7 +2491,7 @@ 38658 44335 { 38659 44336 lval_T lv; … … 38664 44341 { 38665 44342 if (endchars != NULL && vim_strchr(endchars, *skipwhite(p)) == NULL) 38666 @@ -2514,18 +253 2,22 @@44343 @@ -2514,18 +2536,22 @@ 38667 44344 * "unlet" is TRUE for ":unlet": slightly different behavior when something is 38668 44345 * wrong; must end in space or cmd separator. … … 38689 44366 { 38690 44367 char_u *p; 38691 @@ -2539,6 +256 1,7 @@44368 @@ -2539,6 +2565,7 @@ 38692 44369 char_u *key = NULL; 38693 44370 int len; … … 38697 44374 /* Clear everything in "lp". */ 38698 44375 vim_memset(lp, 0, sizeof(lval_T)); 38699 @@ -2586,7 +26 09,7 @@44376 @@ -2586,7 +2613,7 @@ 38700 44377 38701 44378 cc = *p; … … 38706 44383 EMSG2(_(e_undefvar), lp->ll_name); 38707 44384 *p = cc; 38708 @@ -2899,7 +292 2,7 @@44385 @@ -2899,7 +2926,7 @@ 38709 44386 38710 44387 /* handle +=, -= and .= */ … … 38715 44392 if (tv_op(&tv, rettv, op) == OK) 38716 44393 set_var(lp->ll_name, &tv, FALSE); 38717 @@ -3420,7 +344 3,7 @@44394 @@ -3420,7 +3447,7 @@ 38718 44395 38719 44396 /* If it is the name of a variable of type VAR_FUNC use its contents. */ … … 38724 44401 /* Skip white space to allow ":call func ()". Not good, but required for 38725 44402 * backward compatibility. */ 38726 @@ -3551,7 +357 4,7 @@44403 @@ -3551,7 +3578,7 @@ 38727 44404 do 38728 44405 { … … 38733 44410 if (lv.ll_name == NULL) 38734 44411 error = TRUE; /* error but continue parsing */ 38735 @@ -3704,7 +37 27,7 @@44412 @@ -3704,7 +3731,7 @@ 38736 44413 ret = FAIL; 38737 44414 else … … 38742 44419 ret = FAIL; 38743 44420 else 38744 @@ -4410,7 +443 3,7 @@44421 @@ -4410,7 +4437,7 @@ 38745 44422 if (rettv->v_type != var2.v_type) 38746 44423 EMSG(_("E691: Can only compare List with List")); … … 38751 44428 clear_tv(&var2); 38752 44429 return FAIL; 38753 @@ -5103,7 +51 26,8 @@44430 @@ -5103,7 +5130,8 @@ 38754 44431 if (evaluate) 38755 44432 { … … 38761 44438 if (**arg != NUL) 38762 44439 ++*arg; 38763 @@ -5147,7 +517 1,7 @@44440 @@ -5147,7 +5175,7 @@ 38764 44441 { 38765 44442 /* If "s" is the name of a variable of type VAR_FUNC … … 38770 44447 /* Invoke the function. */ 38771 44448 ret = get_func_tv(s, len, rettv, arg, 38772 @@ -5174,7 +5 198,7 @@44449 @@ -5174,7 +5202,7 @@ 38773 44450 } 38774 44451 } … … 38779 44456 ret = OK; 38780 44457 } 38781 @@ -5976,7 +600 0,7 @@44458 @@ -5976,7 +6004,7 @@ 38782 44459 list_T *l; 38783 44460 listitem_T *item; … … 38788 44465 } 38789 44466 38790 @@ -6413,6 +64 37,16 @@44467 @@ -6413,6 +6441,16 @@ 38791 44468 if (ni == NULL) 38792 44469 return FAIL; … … 38805 44482 /* Append new item at end of list. */ 38806 44483 list_append(l, ni); 38807 @@ -6434,7 +64 68,6 @@44484 @@ -6434,7 +6472,6 @@ 38808 44485 item->li_prev = ni; 38809 44486 ++l->lv_len; … … 38813 44490 38814 44491 /* 38815 @@ -6546,9 +65 79,11 @@44492 @@ -6546,9 +6583,11 @@ 38816 44493 /* 38817 44494 * Remove items "item" to "item2" from list "l". … … 38826 44503 listitem_T *item; 38827 44504 listitem_T *item2; 38828 @@ -7767,7 +7802,7 @@ 44505 @@ -6651,6 +6690,8 @@ 44506 } 44507 44508 line_breakcheck(); 44509 + if (did_echo_string_emsg) /* recursion error, bail out */ 44510 + break; 44511 } 44512 44513 /* Allocate result buffer with its total size, avoid re-allocation and 44514 @@ -7425,8 +7466,10 @@ 44515 if (s != NULL) 44516 ga_concat(&ga, s); 44517 vim_free(tofree); 44518 - if (s == NULL) 44519 + if (s == NULL || did_echo_string_emsg) 44520 break; 44521 + line_breakcheck(); 44522 + 44523 } 44524 } 44525 if (todo > 0) 44526 @@ -7584,9 +7627,16 @@ 44527 44528 if (recurse >= DICT_MAXNEST) 44529 { 44530 - EMSG(_("E724: variable nested too deep for displaying")); 44531 + if (!did_echo_string_emsg) 44532 + { 44533 + /* Only give this message once for a recursive call to avoid 44534 + * flooding the user with errors. And stop iterating over lists 44535 + * and dicts. */ 44536 + did_echo_string_emsg = TRUE; 44537 + EMSG(_("E724: variable nested too deep for displaying")); 44538 + } 44539 *tofree = NULL; 44540 - return NULL; 44541 + return (char_u *)"{E724}"; 44542 } 44543 ++recurse; 44544 44545 @@ -7654,7 +7704,8 @@ 44546 *tofree = NULL; 44547 } 44548 44549 - --recurse; 44550 + if (--recurse == 0) 44551 + did_echo_string_emsg = FALSE; 44552 return r; 44553 } 44554 44555 @@ -7767,7 +7818,7 @@ 38829 44556 * Get the value of an environment variable. 38830 44557 * "arg" is pointing to the '$'. It is advanced to after the name. … … 38835 44562 static int 38836 44563 get_env_tv(arg, rettv, evaluate) 38837 @@ -7786,32 +78 21,33 @@44564 @@ -7786,32 +7837,33 @@ 38838 44565 len = get_env_len(arg); 38839 44566 if (evaluate) … … 38891 44618 rettv->vval.v_string = string; 38892 44619 } 38893 @@ -7841,6 +78 77,7 @@44620 @@ -7841,6 +7893,7 @@ 38894 44621 {"append", 2, 2, f_append}, 38895 44622 {"argc", 0, 0, f_argc}, … … 38899 44626 #ifdef FEAT_FLOAT 38900 44627 {"asin", 1, 1, f_asin}, /* WJMc */ 38901 @@ -7860,6 +7 897,7 @@44628 @@ -7860,6 +7913,7 @@ 38902 44629 {"bufwinnr", 1, 1, f_bufwinnr}, 38903 44630 {"byte2line", 1, 1, f_byte2line}, … … 38907 44634 #ifdef FEAT_FLOAT 38908 44635 {"ceil", 1, 1, f_ceil}, 38909 @@ -7893,6 +79 31,7 @@44636 @@ -7893,6 +7947,7 @@ 38910 44637 {"eval", 1, 1, f_eval}, 38911 44638 {"eventhandler", 0, 0, f_eventhandler}, … … 38915 44642 #ifdef FEAT_FLOAT 38916 44643 {"exp", 1, 1, f_exp}, 38917 @@ -7929,6 +79 68,7 @@44644 @@ -7929,6 +7984,7 @@ 38918 44645 {"getcmdline", 0, 0, f_getcmdline}, 38919 44646 {"getcmdpos", 0, 0, f_getcmdpos}, … … 38923 44650 {"getfontname", 0, 1, f_getfontname}, 38924 44651 {"getfperm", 1, 1, f_getfperm}, 38925 @@ -7941,7 +79 81,7 @@44652 @@ -7941,7 +7997,7 @@ 38926 44653 {"getpid", 0, 0, f_getpid}, 38927 44654 {"getpos", 1, 1, f_getpos}, … … 38932 44659 {"gettabvar", 2, 3, f_gettabvar}, 38933 44660 {"gettabwinvar", 3, 4, f_gettabwinvar}, 38934 @@ -7949,7 + 7989,7 @@44661 @@ -7949,7 +8005,7 @@ 38935 44662 {"getwinposy", 0, 0, f_getwinposy}, 38936 44663 {"getwinvar", 2, 3, f_getwinvar}, … … 38941 44668 {"has_key", 2, 2, f_has_key}, 38942 44669 {"haslocaldir", 0, 0, f_haslocaldir}, 38943 @@ -7992, 7 +8032,7@@44670 @@ -7992,13 +8048,14 @@ 38944 44671 {"log10", 1, 1, f_log10}, 38945 44672 #endif … … 38950 44677 {"map", 2, 2, f_map}, 38951 44678 {"maparg", 1, 4, f_maparg}, 38952 @@ -8100,7 +8140,7 @@ 44679 {"mapcheck", 1, 3, f_mapcheck}, 44680 {"match", 2, 4, f_match}, 44681 {"matchadd", 2, 4, f_matchadd}, 44682 + {"matchaddpos", 2, 4, f_matchaddpos}, 44683 {"matcharg", 1, 1, f_matcharg}, 44684 {"matchdelete", 1, 1, f_matchdelete}, 44685 {"matchend", 2, 4, f_matchend}, 44686 @@ -8100,7 +8157,7 @@ 38953 44687 {"strridx", 2, 3, f_strridx}, 38954 44688 {"strtrans", 1, 1, f_strtrans}, … … 38959 44693 {"synID", 3, 3, f_synID}, 38960 44694 {"synIDattr", 2, 3, f_synIDattr}, 38961 @@ -8108,6 +81 48,7 @@44695 @@ -8108,6 +8165,7 @@ 38962 44696 {"synconcealed", 2, 2, f_synconcealed}, 38963 44697 {"synstack", 2, 2, f_synstack}, … … 38967 44701 {"tabpagenr", 0, 1, f_tabpagenr}, 38968 44702 {"tabpagewinnr", 1, 2, f_tabpagewinnr}, 38969 @@ -8128,6 +81 69,7 @@44703 @@ -8128,6 +8186,7 @@ 38970 44704 {"type", 1, 1, f_type}, 38971 44705 {"undofile", 1, 1, f_undofile}, … … 38975 44709 {"virtcol", 1, 1, f_virtcol}, 38976 44710 {"visualmode", 0, 1, f_visualmode}, 38977 @@ -8269,16 +83 11,17 @@44711 @@ -8269,16 +8328,17 @@ 38978 44712 * name it contains, otherwise return "name". 38979 44713 */ … … 38995 44729 if (v != NULL && v->di_tv.v_type == VAR_FUNC) 38996 44730 { 38997 @@ -8449,33 +8 492,39 @@44731 @@ -8449,33 +8509,39 @@ 38998 44732 /* execute the function if no errors detected and executing */ 38999 44733 if (evaluate && error == ERROR_NONE) … … 39041 44775 39042 44776 if (fp != NULL) 39043 @@ -8814,6 +88 63,41 @@44777 @@ -8814,6 +8880,41 @@ 39044 44778 } 39045 44779 … … 39083 44817 */ 39084 44818 static void 39085 @@ -9176,13 +92 60,11 @@44819 @@ -9176,13 +9277,11 @@ 39086 44820 #endif 39087 44821 } … … 39099 44833 #ifdef FEAT_MBYTE 39100 44834 char_u *t; 39101 @@ -9202,7 +9 284,10 @@44835 @@ -9202,7 +9301,10 @@ 39102 44836 { 39103 44837 if (*t == NUL) /* EOL reached */ … … 39111 44845 rettv->vval.v_number = (varnumber_T)(t - str); 39112 44846 #else 39113 @@ -9211,6 +9 296,28 @@44847 @@ -9211,6 +9313,28 @@ 39114 44848 #endif 39115 44849 } … … 39140 44874 func_call(name, args, selfdict, rettv) 39141 44875 char_u *name; 39142 @@ -9731,14 +98 38,17 @@44876 @@ -9731,14 +9855,17 @@ 39143 44877 if (argvars[1].v_type == VAR_UNKNOWN) 39144 44878 { … … 39159 44893 else 39160 44894 { 39161 @@ -9994,7 +101 04,22 @@44895 @@ -9994,7 +10121,22 @@ 39162 44896 typval_T *argvars; 39163 44897 typval_T *rettv; … … 39183 44917 39184 44918 /* 39185 @@ -10010,8 +101 35,6 @@44919 @@ -10010,8 +10152,6 @@ 39186 44920 int n = FALSE; 39187 44921 int len = 0; … … 39192 44926 if (*p == '$') /* environment variable */ 39193 44927 { 39194 @@ -10062,7 +10 185,7 @@44928 @@ -10062,7 +10202,7 @@ 39195 44929 { 39196 44930 if (tofree != NULL) … … 39201 44935 { 39202 44936 /* handle d.key, l[idx], f(expr) */ 39203 @@ -10078,8 +102 01,6 @@44937 @@ -10078,8 +10218,6 @@ 39204 44938 } 39205 44939 … … 39210 44944 39211 44945 #ifdef FEAT_FLOAT 39212 @@ -11090,6 +112 11,8 @@44946 @@ -11090,6 +11228,8 @@ 39213 44947 { 39214 44948 char_u *p; … … 39219 44953 return; 39220 44954 39221 @@ -11102,8 +112 25,6 @@44955 @@ -11102,8 +11242,6 @@ 39222 44956 p = ml_get_buf(buf, start, FALSE); 39223 44957 else … … 39228 44962 } 39229 44963 else 39230 @@ -11234,13 +113 55,14 @@44964 @@ -11234,13 +11372,14 @@ 39231 44965 n = safe_vgetc(); 39232 44966 else if (get_tv_number_chk(&argvars[0], &error) == 1) … … 39245 44979 continue; 39246 44980 break; 39247 @@ -11660,6 +11782,19 @@ 44981 @@ -11630,6 +11769,7 @@ 44982 #ifdef FEAT_SEARCH_EXTRA 44983 dict_T *dict; 44984 matchitem_T *cur = curwin->w_match_head; 44985 + int i; 44986 44987 if (rettv_list_alloc(rettv) == OK) 44988 { 44989 @@ -11638,8 +11778,36 @@ 44990 dict = dict_alloc(); 44991 if (dict == NULL) 44992 return; 44993 + if (cur->match.regprog == NULL) 44994 + { 44995 + /* match added with matchaddpos() */ 44996 + for (i = 0; i < MAXPOSMATCH; ++i) 44997 + { 44998 + llpos_T *llpos; 44999 + char buf[6]; 45000 + list_T *l; 45001 + 45002 + llpos = &cur->pos.pos[i]; 45003 + if (llpos->lnum == 0) 45004 + break; 45005 + l = list_alloc(); 45006 + if (l == NULL) 45007 + break; 45008 + list_append_number(l, (varnumber_T)llpos->lnum); 45009 + if (llpos->col > 0) 45010 + { 45011 + list_append_number(l, (varnumber_T)llpos->col); 45012 + list_append_number(l, (varnumber_T)llpos->len); 45013 + } 45014 + sprintf(buf, "pos%d", i + 1); 45015 + dict_add_list(dict, buf, l); 45016 + } 45017 + } 45018 + else 45019 + { 45020 + dict_add_nr_str(dict, "pattern", 0L, cur->pattern); 45021 + } 45022 dict_add_nr_str(dict, "group", 0L, syn_id2name(cur->hlg_id)); 45023 - dict_add_nr_str(dict, "pattern", 0L, cur->pattern); 45024 dict_add_nr_str(dict, "priority", (long)cur->priority, NULL); 45025 dict_add_nr_str(dict, "id", (long)cur->id, NULL); 45026 list_append_dict(rettv->vval.v_list, dict); 45027 @@ -11660,6 +11828,19 @@ 39248 45028 rettv->vval.v_number = mch_get_pid(); 39249 45029 } … … 39265 45045 * "getpos(string)" function 39266 45046 */ 39267 @@ -11668,6 +118 03,15 @@45047 @@ -11668,6 +11849,15 @@ 39268 45048 typval_T *argvars; 39269 45049 typval_T *rettv; … … 39281 45061 list_T *l; 39282 45062 int fnum = -1; 39283 @@ -11675,7 +118 19,10 @@45063 @@ -11675,7 +11865,10 @@ 39284 45064 if (rettv_list_alloc(rettv) == OK) 39285 45065 { … … 39293 45073 list_append_number(l, (varnumber_T)fnum); 39294 45074 else 39295 @@ -11690,6 +118 37,8 @@45075 @@ -11690,6 +11883,8 @@ 39296 45076 (fp != NULL) ? (varnumber_T)fp->coladd : 39297 45077 #endif … … 39302 45082 else 39303 45083 rettv->vval.v_number = FALSE; 39304 @@ -11734,6 +11 883,7 @@45084 @@ -11734,6 +11929,7 @@ 39305 45085 char_u *strregname; 39306 45086 int regname; … … 39310 45090 39311 45091 if (argvars[0].v_type != VAR_UNKNOWN) 39312 @@ -11741,17 +11 891,34 @@45092 @@ -11741,17 +11937,34 @@ 39313 45093 strregname = get_tv_string_chk(&argvars[0]); 39314 45094 error = strregname == NULL; … … 39348 45128 39349 45129 /* 39350 @@ -11791,12 +1 1958,10 @@45130 @@ -11791,12 +12004,10 @@ 39351 45131 { 39352 45132 case MLINE: buf[0] = 'V'; break; … … 39361 45141 rettv->v_type = VAR_STRING; 39362 45142 rettv->vval.v_string = vim_strsave(buf); 39363 @@ -12056,18 +122 21,37 @@45143 @@ -12056,18 +12267,37 @@ 39364 45144 char_u buf1[NUMBUFLEN]; 39365 45145 char_u *file = get_tv_string_buf_chk(&argvars[1], buf1); … … 39406 45186 39407 45187 /* 39408 @@ -12135,6 +123 19,9 @@45188 @@ -12135,6 +12365,9 @@ 39409 45189 #ifndef CASE_INSENSITIVE_FILENAME 39410 45190 "fname_case", … … 39416 45196 "arabic", 39417 45197 #endif 39418 @@ -12507,9 +12 694,7 @@45198 @@ -12507,9 +12740,7 @@ 39419 45199 #ifdef FEAT_VIRTUALEDIT 39420 45200 "virtualedit", … … 39426 45206 "visualextra", 39427 45207 #endif 39428 @@ -12538,7 +127 23,12 @@45208 @@ -12538,7 +12769,12 @@ 39429 45209 "xfontset", 39430 45210 #endif … … 39440 45220 #ifdef USE_XSMP 39441 45221 "xsmp", 39442 @@ -12569,7 +12 759,26 @@45222 @@ -12569,7 +12805,26 @@ 39443 45223 if (n == FALSE) 39444 45224 { … … 39468 45248 n = (starting != 0); 39469 45249 #ifdef FEAT_MBYTE 39470 @@ -13045,9 +13 254,18 @@45250 @@ -13045,9 +13300,18 @@ 39471 45251 } 39472 45252 … … 39487 45267 && argvars[1].v_type != VAR_UNKNOWN 39488 45268 && argvars[2].v_type != VAR_UNKNOWN) 39489 @@ -13298,8 +135 16,8 @@45269 @@ -13298,8 +13562,8 @@ 39490 45270 dictitem_T *di; 39491 45271 … … 39498 45278 { 39499 45279 if (*end != NUL) 39500 @@ -13312,7 +135 30,7 @@45280 @@ -13312,7 +13576,7 @@ 39501 45281 rettv->vval.v_number = 1; /* always locked */ 39502 45282 else … … 39507 45287 { 39508 45288 /* Consider a variable locked when: 39509 @@ -13846,6 +14 064,7 @@45289 @@ -13846,6 +14110,7 @@ 39510 45290 int type; 39511 45291 { … … 39515 45295 char_u *pat; 39516 45296 regmatch_T regmatch; 39517 @@ -13885,7 +141 04,10 @@45297 @@ -13885,7 +14150,10 @@ 39518 45298 li = l->lv_first; 39519 45299 } … … 39526 45306 pat = get_tv_string_buf_chk(&argvars[1], patbuf); 39527 45307 if (pat == NULL) 39528 @@ -13909,7 +141 31,7 @@45308 @@ -13909,7 +14177,7 @@ 39529 45309 { 39530 45310 if (start < 0) … … 39535 45315 /* When "count" argument is there ignore matches before "start", 39536 45316 * otherwise skip part of the string. Differs when pattern is "^" 39537 @@ -13917,7 +141 39,10 @@45317 @@ -13917,7 +14185,10 @@ 39538 45318 if (argvars[3].v_type != VAR_UNKNOWN) 39539 45319 startcol = start; … … 39546 45326 39547 45327 if (argvars[3].v_type != VAR_UNKNOWN) 39548 @@ -13967,6 +14 192,12 @@45328 @@ -13967,6 +14238,12 @@ 39549 45329 #else 39550 45330 startcol = (colnr_T)(regmatch.startp[0] + 1 - str); … … 39559 45339 } 39560 45340 39561 @@ -14095,8 +14326,8 @@ 45341 @@ -14067,7 +14344,58 @@ 45342 return; 45343 } 45344 45345 - rettv->vval.v_number = match_add(curwin, grp, pat, prio, id); 45346 + rettv->vval.v_number = match_add(curwin, grp, pat, prio, id, NULL); 45347 +#endif 45348 +} 45349 + 45350 +/* 45351 + * "matchaddpos()" function 45352 + */ 45353 + static void 45354 +f_matchaddpos(argvars, rettv) 45355 + typval_T *argvars UNUSED; 45356 + typval_T *rettv UNUSED; 45357 +{ 45358 +#ifdef FEAT_SEARCH_EXTRA 45359 + char_u buf[NUMBUFLEN]; 45360 + char_u *group; 45361 + int prio = 10; 45362 + int id = -1; 45363 + int error = FALSE; 45364 + list_T *l; 45365 + 45366 + rettv->vval.v_number = -1; 45367 + 45368 + group = get_tv_string_buf_chk(&argvars[0], buf); 45369 + if (group == NULL) 45370 + return; 45371 + 45372 + if (argvars[1].v_type != VAR_LIST) 45373 + { 45374 + EMSG2(_(e_listarg), "matchaddpos()"); 45375 + return; 45376 + } 45377 + l = argvars[1].vval.v_list; 45378 + if (l == NULL) 45379 + return; 45380 + 45381 + if (argvars[2].v_type != VAR_UNKNOWN) 45382 + { 45383 + prio = get_tv_number_chk(&argvars[2], &error); 45384 + if (argvars[3].v_type != VAR_UNKNOWN) 45385 + id = get_tv_number_chk(&argvars[3], &error); 45386 + } 45387 + if (error == TRUE) 45388 + return; 45389 + 45390 + /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */ 45391 + if (id == 1 || id == 2) 45392 + { 45393 + EMSGN("E798: ID is reserved for \":match\": %ld", id); 45394 + return; 45395 + } 45396 + 45397 + rettv->vval.v_number = match_add(curwin, group, NULL, prio, id, l); 45398 #endif 45399 } 45400 45401 @@ -14095,8 +14423,8 @@ 39562 45402 } 39563 45403 else … … 39570 45410 } 39571 45411 #endif 39572 @@ -14292,14 +14 523,23 @@45412 @@ -14292,14 +14620,23 @@ 39573 45413 return; 39574 45414 … … 39600 45440 #endif 39601 45441 39602 @@ -14316,7 +14 556,6 @@45442 @@ -14316,7 +14653,6 @@ 39603 45443 buf[1] = NUL; 39604 45444 buf[2] = NUL; … … 39608 45448 { 39609 45449 if (VIsual_select) 39610 @@ -14324,9 +14 563,7 @@45450 @@ -14324,9 +14660,7 @@ 39611 45451 else 39612 45452 buf[0] = VIsual_mode; … … 39619 45459 { 39620 45460 buf[0] = 'r'; 39621 @@ -15289,7 +15 526,7 @@45461 @@ -15289,7 +15623,7 @@ 39622 45462 if (argvars[2].v_type == VAR_UNKNOWN) 39623 45463 { … … 39628 45468 vim_free(item); 39629 45469 } 39630 @@ -15315,7 +15 552,7 @@45470 @@ -15315,7 +15649,7 @@ 39631 45471 EMSG(_(e_invrange)); 39632 45472 else … … 39637 45477 { 39638 45478 l = rettv->vval.v_list; 39639 @@ -16583,12 +16820,13 @@ 45479 @@ -16564,7 +16898,7 @@ 45480 match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE), 45481 get_dict_string(d, (char_u *)"pattern", FALSE), 45482 (int)get_dict_number(d, (char_u *)"priority"), 45483 - (int)get_dict_number(d, (char_u *)"id")); 45484 + (int)get_dict_number(d, (char_u *)"id"), NULL); 45485 li = li->li_next; 45486 } 45487 rettv->vval.v_number = 0; 45488 @@ -16583,12 +16917,13 @@ 39640 45489 pos_T pos; 39641 45490 int fnum; … … 39652 45501 if (--pos.col < 0) 39653 45502 pos.col = 0; 39654 @@ -16598,6 +16 836,8 @@45503 @@ -16598,6 +16933,8 @@ 39655 45504 if (fnum == curbuf->b_fnum) 39656 45505 { … … 39661 45510 rettv->vval.v_number = 0; 39662 45511 } 39663 @@ -16655,8 +16 895,6 @@45512 @@ -16655,8 +16992,6 @@ 39664 45513 regname = *strregname; 39665 45514 if (regname == 0 || regname == '@') … … 39670 45519 if (argvars[2].v_type != VAR_UNKNOWN) 39671 45520 { 39672 @@ -16675,7 +1 6913,6 @@45521 @@ -16675,7 +17010,6 @@ 39673 45522 case 'V': case 'l': /* line-wise selection */ 39674 45523 yank_type = MLINE; … … 39678 45527 yank_type = MBLOCK; 39679 45528 if (VIM_ISDIGIT(stropt[1])) 39680 @@ -16685, 14 +16922,62@@45529 @@ -16685,20 +17019,68 @@ 39681 45530 --stropt; 39682 45531 } … … 39688 45537 - strval = get_tv_string_chk(&argvars[1]); 39689 45538 - if (strval != NULL) 45539 - write_reg_contents_ex(regname, strval, -1, 45540 - append, yank_type, block_len); 45541 - rettv->vval.v_number = 0; 45542 -} 39690 45543 + if (argvars[1].v_type == VAR_LIST) 39691 45544 + { … … 39697 45550 + int len = argvars[1].vval.v_list->lv_len; 39698 45551 + listitem_T *li; 39699 + 45552 45553 -/* 45554 - * "settabvar()" function 45555 - */ 39700 45556 + /* First half: use for pointers to result lines; second half: use for 39701 45557 + * pointers to allocated copies. */ … … 39738 45594 + if (strval == NULL) 39739 45595 + return; 39740 39741 45596 + write_reg_contents_ex(regname, strval, -1, 45597 + append, yank_type, block_len); 39742 45598 + } 39743 rettv->vval.v_number = 0; 39744 } 39745 39746 @@ -16869,7 +17154,7 @@ 45599 + rettv->vval.v_number = 0; 45600 +} 45601 + 45602 +/* 45603 + * "settabvar()" function 45604 + */ 45605 static void 45606 f_settabvar(argvars, rettv) 45607 typval_T *argvars; 45608 @@ -16869,7 +17251,7 @@ 39747 45609 typval_T *rettv; 39748 45610 { … … 39753 45615 } 39754 45616 39755 @@ -16881,7 +17 166,7 @@45617 @@ -16881,7 +17263,7 @@ 39756 45618 typval_T *argvars UNUSED; 39757 45619 typval_T *rettv; … … 39762 45624 39763 45625 /* 39764 @@ -16951,10 +17236,11 @@ 45626 @@ -16947,14 +17329,24 @@ 45627 #endif 45628 item_compare2 __ARGS((const void *s1, const void *s2)); 45629 45630 +/* struct used in the array that's given to qsort() */ 45631 +typedef struct 45632 +{ 45633 + listitem_T *item; 45634 + int idx; 45635 +} sortItem_T; 45636 + 45637 static int item_compare_ic; 45638 +static int item_compare_numeric; 39765 45639 static char_u *item_compare_func; 39766 45640 static dict_T *item_compare_selfdict; 39767 45641 static int item_compare_func_err; 45642 +static int item_compare_keep_zero; 39768 45643 +static void do_sort_uniq __ARGS((typval_T *argvars, typval_T *rettv, int sort)); 39769 45644 #define ITEM_COMPARE_FAIL 999 … … 39775 45650 static int 39776 45651 #ifdef __BORLANDC__ 39777 @@ -17028,9 +17314,10 @@ 45652 @@ -16964,22 +17356,41 @@ 45653 const void *s1; 45654 const void *s2; 45655 { 45656 + sortItem_T *si1, *si2; 45657 char_u *p1, *p2; 45658 char_u *tofree1, *tofree2; 45659 int res; 45660 char_u numbuf1[NUMBUFLEN]; 45661 char_u numbuf2[NUMBUFLEN]; 45662 45663 - p1 = tv2string(&(*(listitem_T **)s1)->li_tv, &tofree1, numbuf1, 0); 45664 - p2 = tv2string(&(*(listitem_T **)s2)->li_tv, &tofree2, numbuf2, 0); 45665 + si1 = (sortItem_T *)s1; 45666 + si2 = (sortItem_T *)s2; 45667 + p1 = tv2string(&si1->item->li_tv, &tofree1, numbuf1, 0); 45668 + p2 = tv2string(&si2->item->li_tv, &tofree2, numbuf2, 0); 45669 if (p1 == NULL) 45670 p1 = (char_u *)""; 45671 if (p2 == NULL) 45672 p2 = (char_u *)""; 45673 - if (item_compare_ic) 45674 - res = STRICMP(p1, p2); 45675 + if (!item_compare_numeric) 45676 + { 45677 + if (item_compare_ic) 45678 + res = STRICMP(p1, p2); 45679 + else 45680 + res = STRCMP(p1, p2); 45681 + } 45682 else 45683 - res = STRCMP(p1, p2); 45684 + { 45685 + double n1, n2; 45686 + n1 = strtod((char *)p1, (char **)&p1); 45687 + n2 = strtod((char *)p2, (char **)&p2); 45688 + res = n1 == n2 ? 0 : n1 > n2 ? 1 : -1; 45689 + } 45690 + 45691 + /* When the result would be zero, compare the pointers themselves. Makes 45692 + * the sort stable. */ 45693 + if (res == 0 && !item_compare_keep_zero) 45694 + res = si1->idx > si2->idx ? 1 : -1; 45695 + 45696 vim_free(tofree1); 45697 vim_free(tofree2); 45698 return res; 45699 @@ -16993,6 +17404,7 @@ 45700 const void *s1; 45701 const void *s2; 45702 { 45703 + sortItem_T *si1, *si2; 45704 int res; 45705 typval_T rettv; 45706 typval_T argv[3]; 45707 @@ -17002,10 +17414,13 @@ 45708 if (item_compare_func_err) 45709 return 0; 45710 45711 - /* copy the values. This is needed to be able to set v_lock to VAR_FIXED 45712 + si1 = (sortItem_T *)s1; 45713 + si2 = (sortItem_T *)s2; 45714 + 45715 + /* Copy the values. This is needed to be able to set v_lock to VAR_FIXED 45716 * in the copy without changing the original list items. */ 45717 - copy_tv(&(*(listitem_T **)s1)->li_tv, &argv[0]); 45718 - copy_tv(&(*(listitem_T **)s2)->li_tv, &argv[1]); 45719 + copy_tv(&si1->item->li_tv, &argv[0]); 45720 + copy_tv(&si2->item->li_tv, &argv[1]); 45721 45722 rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ 45723 res = call_func(item_compare_func, (int)STRLEN(item_compare_func), 45724 @@ -17021,6 +17436,12 @@ 45725 if (item_compare_func_err) 45726 res = ITEM_COMPARE_FAIL; /* return value has wrong type */ 45727 clear_tv(&rettv); 45728 + 45729 + /* When the result would be zero, compare the pointers themselves. Makes 45730 + * the sort stable. */ 45731 + if (res == 0 && !item_compare_keep_zero) 45732 + res = si1->idx > si2->idx ? 1 : -1; 45733 + 45734 return res; 45735 } 45736 45737 @@ -17028,23 +17449,24 @@ 39778 45738 * "sort({list})" function 39779 45739 */ … … 39787 45747 list_T *l; 39788 45748 listitem_T *li; 39789 @@ -17039,12 +17326,12 @@ 45749 - listitem_T **ptrs; 45750 + sortItem_T *ptrs; 45751 long len; 39790 45752 long i; 39791 45753 … … 39802 45764 rettv->vval.v_list = l; 39803 45765 rettv->v_type = VAR_LIST; 39804 @@ -17091,29 +17378,72 @@ 39805 ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *))); 45766 @@ -17055,6 +17477,7 @@ 45767 return; /* short list sorts pretty quickly */ 45768 45769 item_compare_ic = FALSE; 45770 + item_compare_numeric = FALSE; 45771 item_compare_func = NULL; 45772 item_compare_selfdict = NULL; 45773 if (argvars[1].v_type != VAR_UNKNOWN) 45774 @@ -17073,6 +17496,19 @@ 45775 item_compare_ic = TRUE; 45776 else 45777 item_compare_func = get_tv_string(&argvars[1]); 45778 + if (item_compare_func != NULL) 45779 + { 45780 + if (STRCMP(item_compare_func, "n") == 0) 45781 + { 45782 + item_compare_func = NULL; 45783 + item_compare_numeric = TRUE; 45784 + } 45785 + else if (STRCMP(item_compare_func, "i") == 0) 45786 + { 45787 + item_compare_func = NULL; 45788 + item_compare_ic = TRUE; 45789 + } 45790 + } 45791 } 45792 45793 if (argvars[2].v_type != VAR_UNKNOWN) 45794 @@ -17088,32 +17524,81 @@ 45795 } 45796 45797 /* Make an array with each entry pointing to an item in the List. */ 45798 - ptrs = (listitem_T **)alloc((int)(len * sizeof(listitem_T *))); 45799 + ptrs = (sortItem_T *)alloc((int)(len * sizeof(sortItem_T))); 39806 45800 if (ptrs == NULL) 39807 45801 return; 39808 - i = 0; 45802 + 45803 i = 0; 39809 45804 - for (li = l->lv_first; li != NULL; li = li->li_next) 39810 45805 - ptrs[i++] = li; 45806 + if (sort) 45807 + { 45808 + /* sort(): ptrs will be the list to sort */ 45809 + for (li = l->lv_first; li != NULL; li = li->li_next) 45810 + { 45811 + ptrs[i].item = li; 45812 + ptrs[i].idx = i; 45813 + ++i; 45814 + } 39811 45815 39812 45816 - item_compare_func_err = FALSE; … … 39814 45818 - if (item_compare_func != NULL 39815 45819 - && item_compare2((void *)&ptrs[0], (void *)&ptrs[1]) 39816 + i = 0;39817 + if (sort)39818 + {39819 + /* sort(): ptrs will be the list to sort */39820 + for (li = l->lv_first; li != NULL; li = li->li_next)39821 + ptrs[i++] = li;39822 +39823 45820 + item_compare_func_err = FALSE; 45821 + item_compare_keep_zero = FALSE; 39824 45822 + /* test the compare function */ 39825 45823 + if (item_compare_func != NULL … … 39831 45829 + { 39832 45830 + /* Sort the array with item pointers. */ 39833 + qsort((void *)ptrs, (size_t)len, sizeof( listitem_T *),45831 + qsort((void *)ptrs, (size_t)len, sizeof(sortItem_T), 39834 45832 + item_compare_func == NULL ? item_compare : item_compare2); 39835 45833 + … … 39840 45838 + l->lv_len = 0; 39841 45839 + for (i = 0; i < len; ++i) 39842 + list_append(l, ptrs[i] );45840 + list_append(l, ptrs[i].item); 39843 45841 + } 39844 45842 + } … … 39853 45851 + /* f_uniq(): ptrs will be a stack of items to remove */ 39854 45852 + item_compare_func_err = FALSE; 45853 + item_compare_keep_zero = TRUE; 39855 45854 + item_compare_func_ptr = item_compare_func 39856 45855 + ? item_compare2 : item_compare; … … 39861 45860 + if (item_compare_func_ptr((void *)&li, (void *)&li->li_next) 39862 45861 + == 0) 39863 + ptrs[i++] = li;45862 + ptrs[i++].item = li; 39864 45863 + if (item_compare_func_err) 39865 45864 + { … … 39878 45877 + while (--i >= 0) 39879 45878 + { 39880 + li = ptrs[i] ->li_next;39881 + ptrs[i] ->li_next = li->li_next;45879 + li = ptrs[i].item->li_next; 45880 + ptrs[i].item->li_next = li->li_next; 39882 45881 + if (li->li_next != NULL) 39883 + li->li_next->li_prev = ptrs[i] ;45882 + li->li_next->li_prev = ptrs[i].item; 39884 45883 + else 39885 + l->lv_last = ptrs[i] ;45884 + l->lv_last = ptrs[i].item; 39886 45885 + list_fix_watch(l, li); 39887 45886 + listitem_free(li); … … 39891 45890 } 39892 45891 39893 @@ -17122,6 +17 452,28 @@45892 @@ -17122,6 +17607,28 @@ 39894 45893 } 39895 45894 … … 39920 45919 */ 39921 45920 static void 39922 @@ -17709,9 +18 061,29 @@45921 @@ -17709,9 +18216,29 @@ 39923 45922 typval_T *argvars; 39924 45923 typval_T *rettv; … … 39953 45952 39954 45953 /* 39955 @@ -17979,13 +18 351,11 @@45954 @@ -17979,13 +18506,11 @@ 39956 45955 #endif 39957 45956 } … … 39969 45968 char_u *res = NULL; 39970 45969 char_u *p; 39971 @@ -17993,9 +18 363,12 @@45970 @@ -17993,9 +18518,12 @@ 39972 45971 char_u buf[NUMBUFLEN]; 39973 45972 int err = FALSE; … … 39983 45982 if (argvars[1].v_type != VAR_UNKNOWN) 39984 45983 { 39985 @@ -18006,74 +18 379,159 @@45984 @@ -18006,74 +18534,159 @@ 39986 45985 if ((infile = vim_tempname('i')) == NULL) 39987 45986 { … … 40050 46049 + if (res == NULL) 40051 46050 + goto errret; 40052 + 46051 46052 - for (s = res; *s; ++s) 40053 46053 + list = list_alloc(); 40054 46054 + if (list == NULL) 40055 46055 + goto errret; 40056 40057 - for (s = res; *s; ++s) 46056 + 40058 46057 + for (i = 0; i < len; ++i) 40059 46058 { … … 40177 46176 40178 46177 /* 40179 @@ -18688,7 +19 146,6 @@46178 @@ -18688,7 +19301,6 @@ 40180 46179 typval_T *argvars UNUSED; 40181 46180 typval_T *rettv UNUSED; … … 40185 46184 40186 46185 rettv->v_type = VAR_STRING; 40187 @@ -18699,7 +19 156,6 @@46186 @@ -18699,7 +19311,6 @@ 40188 46187 /* A non-zero number or non-empty string argument: reset mode. */ 40189 46188 if (non_zero_arg(&argvars[0])) … … 40193 46192 40194 46193 /* 40195 @@ -18839,20 +19 295,30 @@46194 @@ -18839,20 +19450,30 @@ 40196 46195 EMSG(_(e_invarg)); 40197 46196 else … … 40233 46232 check_cursor(); 40234 46233 win_new_height(curwin, curwin->w_height); 40235 @@ -18923,6 +19 389,49 @@46234 @@ -18923,6 +19544,49 @@ 40236 46235 } 40237 46236 … … 40283 46282 */ 40284 46283 static void 40285 @@ -18933,10 +19 442,7 @@46284 @@ -18933,10 +19597,7 @@ 40286 46285 int binary = FALSE; 40287 46286 char_u *fname; … … 40294 46293 if (check_restricted() || check_secure()) 40295 46294 return; 40296 @@ -18963,33 +19 469,8 @@46295 @@ -18963,33 +19624,8 @@ 40297 46296 } 40298 46297 else … … 40330 46329 } 40331 46330 40332 @@ -19073,14 +19 554,12 @@46331 @@ -19073,14 +19709,12 @@ 40333 46332 return NULL; 40334 46333 if (name[0] == '.') /* cursor */ … … 40345 46344 { 40346 46345 pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum); 40347 @@ -19135,21 +19 614,22 @@46346 @@ -19135,21 +19769,22 @@ 40348 46347 * validity. 40349 46348 */ … … 40372 46371 40373 46372 if (fnump != NULL) 40374 @@ -19173,13 +19 653,16 @@46373 @@ -19173,13 +19808,16 @@ 40375 46374 posp->col = n; 40376 46375 … … 40390 46389 } 40391 46390 40392 @@ -19719,11 +20 202,12 @@46391 @@ -19719,11 +20357,12 @@ 40393 46392 * Return OK or FAIL. 40394 46393 */ … … 40404 46403 int ret = OK; 40405 46404 typval_T *tv = NULL; 40406 @@ -19750,7 +20 234,7 @@46405 @@ -19750,7 +20389,7 @@ 40407 46406 */ 40408 46407 else … … 40413 46412 tv = &v->di_tv; 40414 46413 } 40415 @@ -19790,24 +20 274,30 @@46414 @@ -19790,24 +20429,30 @@ 40416 46415 while (ret == OK 40417 46416 && (**arg == '[' … … 40450 46449 /* Stop the expression evaluation when immediately aborting on 40451 46450 * error, or when an interrupt occurred or an exception was thrown 40452 @@ -20094,6 +20 584,9 @@46451 @@ -20094,6 +20739,9 @@ 40453 46452 return res != NULL ? res : (char_u *)""; 40454 46453 } … … 40460 46459 get_tv_string_chk(varp) 40461 46460 typval_T *varp; 40462 @@ -20146,9 +20 639,10 @@46461 @@ -20146,9 +20794,10 @@ 40463 46462 * hashtab_T used. 40464 46463 */ … … 40472 46471 char_u *varname; 40473 46472 hashtab_T *ht; 40474 @@ -20158,7 +20 652,7 @@46473 @@ -20158,7 +20807,7 @@ 40475 46474 *htp = ht; 40476 46475 if (ht == NULL) … … 40481 46480 40482 46481 /* 40483 @@ -20166,11 +20 660,11 @@46482 @@ -20166,11 +20815,11 @@ 40484 46483 * Returns NULL if not found. 40485 46484 */ … … 40495 46494 hashitem_T *hi; 40496 46495 40497 @@ -20202,7 +20 696,7 @@46496 @@ -20202,7 +20851,7 @@ 40498 46497 * worked find the variable again. Don't auto-load a script if it was 40499 46498 * loaded already, otherwise it would be loaded every time when … … 40504 46503 /* Note: script_autoload() may make "hi" invalid. It must either 40505 46504 * be obtained again or not used. */ 40506 @@ -20282,7 +20 776,7 @@46505 @@ -20282,7 +20931,7 @@ 40507 46506 { 40508 46507 dictitem_T *v; … … 40513 46512 return NULL; 40514 46513 return get_tv_string(&v->di_tv); 40515 @@ -20560,6 +21 054,13 @@46514 @@ -20560,6 +21209,13 @@ 40516 46515 v->di_tv.vval.v_number = get_tv_number(tv); 40517 46516 if (STRCMP(varname, "searchforward") == 0) … … 40527 46526 return; 40528 46527 } 40529 @@ -20650,7 +21 151,8 @@46528 @@ -20650,7 +21306,8 @@ 40530 46529 char_u *name; /* points to start of variable name */ 40531 46530 int new_var; /* TRUE when creating the variable */ … … 40537 46536 ? name[2] : name[0])) 40538 46537 { 40539 @@ -21206,6 +21 708,8 @@46538 @@ -21206,6 +21863,8 @@ 40540 46539 * dict.func existing dict entry that's not a Funcref 40541 46540 * "name" == NULL, "fudi.fd_dict" set, … … 40546 46545 p = eap->arg; 40547 46546 name = trans_function_name(&p, eap->skip, 0, &fudi); 40548 @@ -21361,6 +2 1865,7 @@46547 @@ -21361,6 +22020,7 @@ 40549 46548 if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0) 40550 46549 { … … 40554 46553 } 40555 46554 40556 @@ -21604,7 +22 109,7 @@46555 @@ -21604,7 +22264,7 @@ 40557 46556 */ 40558 46557 if (fudi.fd_dict == NULL) … … 40563 46562 { 40564 46563 emsg_funcname(N_("E707: Function name conflicts with variable: %s"), 40565 @@ -21762,8 +22 267,9 @@46564 @@ -21762,8 +22422,9 @@ 40566 46565 * Also handles a Funcref in a List or Dictionary. 40567 46566 * Returns the function name in allocated memory, or NULL for failure. … … 40575 46574 */ 40576 46575 static char_u * 40577 @@ -21801,7 +22 307,8 @@46576 @@ -21801,7 +22462,8 @@ 40578 46577 if (lead > 2) 40579 46578 start += lead; … … 40585 46584 if (end == start) 40586 46585 { 40587 @@ -21863,14 +22 370,14 @@46586 @@ -21863,14 +22525,14 @@ 40588 46587 if (lv.ll_exp_name != NULL) 40589 46588 { … … 40602 46601 name = NULL; 40603 46602 } 40604 @@ -21878,6 +22 385,14 @@46603 @@ -21878,6 +22540,14 @@ 40605 46604 { 40606 46605 name = vim_strsave(name); … … 40617 46616 } 40618 46617 40619 @@ -21896,7 +22 411,8 @@46618 @@ -21896,7 +22566,8 @@ 40620 46619 } 40621 46620 else … … 40627 46626 len = (int)(end - lv.ll_name); 40628 46627 } 40629 @@ -21924,11 +22 440,23 @@46628 @@ -21924,11 +22595,23 @@ 40630 46629 lead += (int)STRLEN(sid_buf); 40631 46630 } … … 40653 46652 if (name != NULL) 40654 46653 { 40655 @@ -21941,7 +22 469,7 @@46654 @@ -21941,7 +22624,7 @@ 40656 46655 STRCPY(name + 3, sid_buf); 40657 46656 } … … 40662 46661 *pp = end; 40663 46662 40664 @@ -22062,7 +22 590,7 @@46663 @@ -22062,7 +22745,7 @@ 40665 46664 translated_function_exists(name) 40666 46665 char_u *name; … … 40671 46670 return find_func(name) != NULL; 40672 46671 } 40673 @@ -22078,7 +22 606,8 @@46672 @@ -22078,7 +22761,8 @@ 40674 46673 char_u *p; 40675 46674 int n = FALSE; … … 40681 46680 40682 46681 /* Only accept "funcname", "funcname ", "funcname (..." and 40683 @@ -22109,14 +22 638,20 @@46682 @@ -22109,14 +22793,20 @@ 40684 46683 40685 46684 /* … … 40706 46705 40707 46706 #if defined(FEAT_PROFILE) || defined(PROTO) 40708 @@ -22325,10 +2 2860,6 @@46707 @@ -22325,10 +23015,6 @@ 40709 46708 int ret = FALSE; 40710 46709 int i; … … 40717 46716 p = vim_strchr(name, AUTOLOAD_CHAR); 40718 46717 if (p == NULL || p == name) 40719 @@ -24260,6 +24791,17 @@ 46718 @@ -22772,7 +23458,10 @@ 46719 msg_outnum((long)argvars[i].vval.v_number); 46720 else 46721 { 46722 + /* Do not want errors such as E724 here. */ 46723 + ++emsg_off; 46724 s = tv2string(&argvars[i], &tofree, numbuf2, 0); 46725 + --emsg_off; 46726 if (s != NULL) 46727 { 46728 if (vim_strsize(s) > MSG_BUF_CLEN) 46729 @@ -22864,8 +23553,10 @@ 46730 46731 /* The value may be very long. Skip the middle part, so that we 46732 * have some idea how it starts and ends. smsg() would always 46733 - * truncate it at the end. */ 46734 + * truncate it at the end. Don't want errors such as E724 here. */ 46735 + ++emsg_off; 46736 s = tv2string(fc->rettv, &tofree, numbuf2, 0); 46737 + --emsg_off; 46738 if (s != NULL) 46739 { 46740 if (vim_strsize(s) > MSG_BUF_CLEN) 46741 @@ -24260,6 +24951,17 @@ 40720 46742 } 40721 46743 } … … 40735 46757 } 40736 46758 40737 @@ -24283,6 +24 825,7 @@46759 @@ -24283,6 +24985,7 @@ 40738 46760 garray_T ga; 40739 46761 char_u *ret; … … 40743 46765 /* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */ 40744 46766 save_cpo = p_cpo; 40745 @@ -24299,6 +2 4842,19@@46767 @@ -24299,6 +25002,22 @@ 40746 46768 tail = str; 40747 46769 while (vim_regexec_nl(®match, str, (colnr_T)(tail - str))) … … 40753 46775 + { 40754 46776 + /* avoid getting stuck on a match with an empty string */ 40755 + *((char_u *)ga.ga_data + ga.ga_len) = *tail++; 40756 + ++ga.ga_len; 46777 + i = MB_PTR2LEN(tail); 46778 + mch_memmove((char_u *)ga.ga_data + ga.ga_len, tail, 46779 + (size_t)i); 46780 + ga.ga_len += i; 46781 + tail += i; 40757 46782 + continue; 40758 46783 + } … … 40763 46788 * Get some space for a temporary buffer to do the substitution 40764 46789 * into. It will contain: 40765 @@ -24321,20 +2 4877,9 @@46790 @@ -24321,20 +25040,9 @@ 40766 46791 (void)vim_regsub(®match, sub, (char_u *)ga.ga_data 40767 46792 + ga.ga_len + i, TRUE, TRUE, FALSE); … … 40789 46814 diff -Naur vim74.orig/src/ex_cmds.c vim74/src/ex_cmds.c 40790 46815 --- vim74.orig/src/ex_cmds.c 2013-08-07 13:15:51.000000000 +0000 40791 +++ vim74/src/ex_cmds.c 2014-0 6-01 00:43:14.247480031+000046816 +++ vim74/src/ex_cmds.c 2014-07-21 23:33:39.466801040 +0000 40792 46817 @@ -1012,7 +1012,18 @@ 40793 46818 … … 40853 46878 */ 40854 46879 STRCPY(buf, cmd); 40855 @@ -3253,21 +3280,21 @@ 46880 @@ -1977,11 +2004,14 @@ 46881 { 46882 fclose(fp_in); 46883 46884 - /* 46885 - * In case of an error keep the original viminfo file. 46886 - * Otherwise rename the newly written file. 46887 - */ 46888 - if (viminfo_errcnt || vim_rename(tempname, fname) == -1) 46889 + /* In case of an error keep the original viminfo file. Otherwise 46890 + * rename the newly written file. Give an error if that fails. */ 46891 + if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1) 46892 + { 46893 + ++viminfo_errcnt; 46894 + EMSG2(_("E886: Can't rename viminfo file to %s!"), fname); 46895 + } 46896 + if (viminfo_errcnt > 0) 46897 mch_remove(tempname); 46898 46899 #ifdef WIN3264 46900 @@ -3253,21 +3283,21 @@ 40856 46901 if ( ((!other_file && !(flags & ECMD_OLDBUF)) 40857 46902 || (curbuf->b_nwindows == 1 … … 40879 46924 #ifdef FEAT_AUTOCMD 40880 46925 if ((command != NULL || newlnum > (linenr_T)0) 40881 @@ -3332,6 +33 59,12 @@46926 @@ -3332,6 +3362,12 @@ 40882 46927 #endif 40883 46928 buf = buflist_new(ffname, sfname, 0L, … … 40892 46937 if (buf == NULL) 40893 46938 goto theend; 40894 @@ -4097,12 +413 0,12 @@46939 @@ -4097,12 +4133,12 @@ 40895 46940 * 'scroll' */ 40896 46941 if (eap->forceit) … … 40908 46953 bigness = 1; 40909 46954 40910 @@ -4298,7 +433 1,7 @@46955 @@ -4298,7 +4334,7 @@ 40911 46956 pos_T old_cursor = curwin->w_cursor; 40912 46957 int start_nsubs; … … 40917 46962 40918 46963 cmd = eap->arg; 40919 @@ -4409,6 +444 2,31 @@46964 @@ -4409,6 +4445,31 @@ 40920 46965 endcolumn = (curwin->w_curswant == MAXCOL); 40921 46966 } … … 40949 46994 * Find trailing options. When '&' is used, keep old options. 40950 46995 */ 40951 @@ -4740,11 +4 798,17 @@46996 @@ -4740,11 +4801,17 @@ 40952 46997 char_u *resp; 40953 46998 colnr_T sc, ec; … … 40968 47013 for (i = 0; i < (long)sc; ++i) 40969 47014 msg_putchar(' '); 40970 @@ -5928,14 +599 2,18 @@47015 @@ -5928,14 +5995,18 @@ 40971 47016 "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", 40972 47017 "/\\?", "/\\z(\\)", "\\=", ":s\\=", … … 40989 47034 40990 47035 d = IObuff; /* assume IObuff is long enough! */ 40991 @@ -5974,7 +604 2,7 @@47036 @@ -5974,7 +6045,7 @@ 40992 47037 /* Replace: 40993 47038 * "[:...:]" with "\[:...:]" … … 40998 47043 if ((arg[0] == '[' && (arg[1] == ':' 40999 47044 || (arg[1] == '+' && arg[2] == '+'))) 41000 @@ -7223,7 +729 1,10 @@47045 @@ -7223,7 +7294,10 @@ 41001 47046 else 41002 47047 /* ":sign place {id} file={fname}": change sign type */ … … 41010 47055 else 41011 47056 EMSG(_(e_invarg)); 41012 @@ -7658,7 +77 29,7 @@47057 @@ -7658,7 +7732,7 @@ 41013 47058 # ifdef FEAT_WINDOWS 41014 47059 ++emsg_off; … … 41021 47066 diff -Naur vim74.orig/src/ex_cmds.h vim74/src/ex_cmds.h 41022 47067 --- vim74.orig/src/ex_cmds.h 2013-06-08 13:08:20.000000000 +0000 41023 +++ vim74/src/ex_cmds.h 2014-0 6-01 00:43:14.250813355+000047068 +++ vim74/src/ex_cmds.h 2014-07-21 23:33:39.473467689 +0000 41024 47069 @@ -477,6 +477,8 @@ 41025 47070 NEEDARG|EXTRA|NOTRLCOM), … … 41059 47104 diff -Naur vim74.orig/src/ex_cmds2.c vim74/src/ex_cmds2.c 41060 47105 --- vim74.orig/src/ex_cmds2.c 2013-06-28 18:14:53.000000000 +0000 41061 +++ vim74/src/ex_cmds2.c 2014-0 6-01 00:43:14.284146604+000047106 +++ vim74/src/ex_cmds2.c 2014-07-21 23:33:39.490134312 +0000 41062 47107 @@ -1436,20 +1436,20 @@ 41063 47108 } … … 41166 47211 diff -Naur vim74.orig/src/ex_docmd.c vim74/src/ex_docmd.c 41167 47212 --- vim74.orig/src/ex_docmd.c 2013-07-24 13:09:37.000000000 +0000 41168 +++ vim74/src/ex_docmd.c 2014-0 6-01 00:43:14.294146578+000047213 +++ vim74/src/ex_docmd.c 2014-07-21 23:33:39.516800909 +0000 41169 47214 @@ -316,7 +316,6 @@ 41170 47215 static void ex_operators __ARGS((exarg_T *eap)); … … 41561 47606 } 41562 47607 47608 @@ -11453,7 +11489,7 @@ 47609 47610 c = *end; 47611 *end = NUL; 47612 - match_add(curwin, g, p + 1, 10, id); 47613 + match_add(curwin, g, p + 1, 10, id, NULL); 47614 vim_free(g); 47615 *end = c; 47616 } 41563 47617 diff -Naur vim74.orig/src/ex_eval.c vim74/src/ex_eval.c 41564 47618 --- vim74.orig/src/ex_eval.c 2013-06-08 13:50:28.000000000 +0000 41565 +++ vim74/src/ex_eval.c 2014-0 6-01 00:43:14.320813177 +000047619 +++ vim74/src/ex_eval.c 2014-07-21 23:33:39.536800857 +0000 41566 47620 @@ -321,6 +321,17 @@ 41567 47621 } … … 41749 47803 diff -Naur vim74.orig/src/ex_getln.c vim74/src/ex_getln.c 41750 47804 --- vim74.orig/src/ex_getln.c 2013-07-05 17:44:21.000000000 +0000 41751 +++ vim74/src/ex_getln.c 2014-06-01 00:43:14.327479827 +0000 41752 @@ -2280,7 +2280,7 @@ 47805 +++ vim74/src/ex_getln.c 2014-07-21 23:33:39.570134104 +0000 47806 @@ -342,6 +342,13 @@ 47807 do_digraph(-1); /* init digraph typeahead */ 47808 #endif 47809 47810 + /* If something above caused an error, reset the flags, we do want to type 47811 + * and execute commands. Display may be messed up a bit. */ 47812 + if (did_emsg) 47813 + redrawcmd(); 47814 + did_emsg = FALSE; 47815 + got_int = FALSE; 47816 + 47817 /* 47818 * Collect the command string, handling editing keys. 47819 */ 47820 @@ -2188,6 +2195,7 @@ 47821 int vcol = 0; 47822 char_u *p; 47823 int prev_char; 47824 + int len; 47825 47826 /* Switch cursor on now. This avoids that it happens after the "\n", which 47827 * confuses the system function that computes tabstops. */ 47828 @@ -2264,7 +2272,17 @@ 47829 { 47830 if (line_ga.ga_len > 0) 47831 { 47832 - --line_ga.ga_len; 47833 +#ifdef FEAT_MBYTE 47834 + if (has_mbyte) 47835 + { 47836 + p = (char_u *)line_ga.ga_data; 47837 + p[line_ga.ga_len] = NUL; 47838 + len = (*mb_head_off)(p, p + line_ga.ga_len - 1) + 1; 47839 + line_ga.ga_len -= len; 47840 + } 47841 + else 47842 +#endif 47843 + --line_ga.ga_len; 47844 goto redraw; 47845 } 47846 continue; 47847 @@ -2280,14 +2298,14 @@ 41753 47848 41754 47849 if (c1 == Ctrl_T) 41755 47850 { 41756 47851 - long sw = get_sw_value(); 41757 + long 47852 + long sw = get_sw_value(curbuf); 41758 47853 41759 47854 p = (char_u *)line_ga.ga_data; 41760 47855 p[line_ga.ga_len] = NUL; 41761 @@ -2337,7 +2337,7 @@ 47856 - indent = get_indent_str(p, 8); 47857 + indent = get_indent_str(p, 8, FALSE); 47858 indent += sw - indent % sw; 47859 add_indent: 47860 - while (get_indent_str(p, 8) < indent) 47861 + while (get_indent_str(p, 8, FALSE) < indent) 47862 { 47863 char_u *s = skipwhite(p); 47864 47865 @@ -2300,8 +2318,9 @@ 47866 /* redraw the line */ 47867 msg_col = startcol; 47868 vcol = 0; 47869 - for (p = (char_u *)line_ga.ga_data; 47870 - p < (char_u *)line_ga.ga_data + line_ga.ga_len; ++p) 47871 + p = (char_u *)line_ga.ga_data; 47872 + p[line_ga.ga_len] = NUL; 47873 + while (p < (char_u *)line_ga.ga_data + line_ga.ga_len) 47874 { 47875 if (*p == TAB) 47876 { 47877 @@ -2309,11 +2328,14 @@ 47878 { 47879 msg_putchar(' '); 47880 } while (++vcol % 8); 47881 + ++p; 47882 } 47883 else 47884 { 47885 - msg_outtrans_len(p, 1); 47886 - vcol += char2cells(*p); 47887 + len = MB_PTR2LEN(p); 47888 + msg_outtrans_len(p, len); 47889 + vcol += ptr2cells(p); 47890 + p += len; 47891 } 47892 } 47893 msg_clr_eos(); 47894 @@ -2335,11 +2357,11 @@ 47895 else 47896 { 41762 47897 p[line_ga.ga_len] = NUL; 41763 indent = get_indent_str(p, 8); 47898 - indent = get_indent_str(p, 8); 47899 + indent = get_indent_str(p, 8, FALSE); 41764 47900 --indent; 41765 47901 - indent -= indent % get_sw_value(); 41766 47902 + indent -= indent % get_sw_value(curbuf); 41767 47903 } 41768 while (get_indent_str(p, 8) > indent) 47904 - while (get_indent_str(p, 8) > indent) 47905 + while (get_indent_str(p, 8, FALSE) > indent) 41769 47906 { 41770 @@ -3852,9 +3852,9 @@ 47907 char_u *s = skipwhite(p); 47908 47909 @@ -2362,7 +2384,16 @@ 47910 47911 if (IS_SPECIAL(c1)) 47912 c1 = '?'; 47913 - ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1; 47914 +#ifdef FEAT_MBYTE 47915 + if (has_mbyte) 47916 + len = (*mb_char2bytes)(c1, 47917 + (char_u *)line_ga.ga_data + line_ga.ga_len); 47918 + else 47919 +#endif 47920 + { 47921 + len = 1; 47922 + ((char_u *)line_ga.ga_data)[line_ga.ga_len] = c1; 47923 + } 47924 if (c1 == '\n') 47925 msg_putchar('\n'); 47926 else if (c1 == TAB) 47927 @@ -2376,10 +2407,10 @@ 47928 else 47929 { 47930 msg_outtrans_len( 47931 - ((char_u *)line_ga.ga_data) + line_ga.ga_len, 1); 47932 + ((char_u *)line_ga.ga_data) + line_ga.ga_len, len); 47933 vcol += char2cells(c1); 47934 } 47935 - ++line_ga.ga_len; 47936 + line_ga.ga_len += len; 47937 escaped = FALSE; 47938 47939 windgoto(msg_row, msg_col); 47940 @@ -3852,9 +3883,9 @@ 41771 47941 char_u buf[20]; 41772 47942 int j = 0; … … 41780 47950 buf[j] = NUL; 41781 47951 p = vim_strsave_escaped(fname, buf); 41782 @@ -4178,7 +4 178,7 @@47952 @@ -4178,7 +4209,7 @@ 41783 47953 /* 41784 47954 * Prepare a string for expansion. … … 41789 47959 * the name into allocated memory and prepend "^". 41790 47960 */ 41791 @@ -5095,9 +5 095,9 @@47961 @@ -5095,9 +5126,9 @@ 41792 47962 char_u ***file; 41793 47963 char *dirnames[]; … … 41800 47970 int i; 41801 47971 int pat_len; 41802 @@ -5116,33 +51 16,27 @@47972 @@ -5116,33 +5147,27 @@ 41803 47973 return FAIL; 41804 47974 } … … 41851 48021 return FAIL; 41852 48022 41853 @@ -5160,33 +51 54,28 @@48023 @@ -5160,33 +5185,28 @@ 41854 48024 #if defined(FEAT_CMDL_COMPL) || defined(FEAT_EVAL) || defined(PROTO) 41855 48025 /* … … 41890 48060 while (*path != NUL) 41891 48061 { 41892 @@ -5207,30 +5 196,23 @@48062 @@ -5207,30 +5227,23 @@ 41893 48063 WILD_SILENT|expand_options) != FAIL && num_p > 0) 41894 48064 { … … 41926 48096 41927 48097 #endif 41928 @@ -5498,6 +5 480,9 @@48098 @@ -5498,6 +5511,9 @@ 41929 48099 if (hislen == 0) /* no history */ 41930 48100 return; … … 41938 48108 diff -Naur vim74.orig/src/feature.h vim74/src/feature.h 41939 48109 --- vim74.orig/src/feature.h 2013-05-18 18:18:20.000000000 +0000 41940 +++ vim74/src/feature.h 2014-0 6-01 00:43:14.384146349+000048110 +++ vim74/src/feature.h 2014-07-21 23:33:39.613467324 +0000 41941 48111 @@ -211,18 +211,11 @@ 41942 48112 #endif … … 42005 48175 diff -Naur vim74.orig/src/fileio.c vim74/src/fileio.c 42006 48176 --- vim74.orig/src/fileio.c 2013-08-05 19:58:03.000000000 +0000 42007 +++ vim74/src/fileio.c 2014-0 6-01 00:43:14.407479623+000048177 +++ vim74/src/fileio.c 2014-07-21 23:33:39.653467220 +0000 42008 48178 @@ -428,13 +428,13 @@ 42009 48179 } … … 42217 48387 fname = vim_strsave(fname); 42218 48388 else 42219 @@ -9536,13 +9549, 19@@48389 @@ -9536,13 +9549,26 @@ 42220 48390 42221 48391 /* 42222 48392 * When stopping to execute autocommands, restore the search patterns and 42223 48393 - * the redo buffer. 42224 + * the redo buffer. Free buffers in the au_pending_free_buf list. 48394 + * the redo buffer. Free any buffers in the au_pending_free_buf list and 48395 + * free any windows in the au_pending_free_win list. 42225 48396 */ 42226 48397 if (!autocmd_busy) … … 42235 48406 + au_pending_free_buf = b; 42236 48407 + } 48408 + while (au_pending_free_win != NULL) 48409 + { 48410 + win_T *w = au_pending_free_win->w_next; 48411 + vim_free(au_pending_free_win); 48412 + au_pending_free_win = w; 48413 + } 42237 48414 } 42238 48415 … … 42240 48417 diff -Naur vim74.orig/src/fold.c vim74/src/fold.c 42241 48418 --- vim74.orig/src/fold.c 2013-06-15 14:57:24.000000000 +0000 42242 +++ vim74/src/fold.c 2014-0 6-01 00:43:14.437479547+000048419 +++ vim74/src/fold.c 2014-07-21 23:33:39.676800492 +0000 42243 48420 @@ -430,11 +430,9 @@ 42244 48421 } … … 42292 48469 diff -Naur vim74.orig/src/getchar.c vim74/src/getchar.c 42293 48470 --- vim74.orig/src/getchar.c 2013-06-29 11:43:27.000000000 +0000 42294 +++ vim74/src/getchar.c 2014-0 6-01 00:43:14.447479521+000048471 +++ vim74/src/getchar.c 2014-07-21 23:33:39.713467063 +0000 42295 48472 @@ -40,13 +40,13 @@ 42296 48473 … … 42776 48953 #ifdef FEAT_EVAL 42777 48954 /* Copy the values from *mp that are used, because 48955 @@ -2632,7 +2675,7 @@ 48956 { 48957 if (!vim_iswhite(ptr[col])) 48958 curwin->w_wcol = vcol; 48959 - vcol += lbr_chartabsize(ptr + col, 48960 + vcol += lbr_chartabsize(ptr, ptr + col, 48961 (colnr_T)vcol); 48962 #ifdef FEAT_MBYTE 48963 if (has_mbyte) 42778 48964 diff -Naur vim74.orig/src/globals.h vim74/src/globals.h 42779 48965 --- vim74.orig/src/globals.h 2013-07-04 17:53:44.000000000 +0000 42780 +++ vim74/src/globals.h 2014-0 6-01 00:43:14.474146120+000042781 @@ -386,6 +386,1 1@@48966 +++ vim74/src/globals.h 2014-07-21 23:33:39.756800283 +0000 48967 @@ -386,6 +386,13 @@ 42782 48968 /* When deleting the current buffer, another one must be loaded. If we know 42783 48969 * which one is preferred, au_new_curbuf is set to it */ 42784 48970 EXTERN buf_T *au_new_curbuf INIT(= NULL); 42785 48971 + 42786 +/* When deleting the buffer and autocmd_busy is TRUE, do not free the buffer 42787 + * but link it in the list starting with au_pending_free_buf, using b_next. 42788 + * Free the buffer when autocmd_busy is set to FALSE. */ 48972 +/* When deleting a buffer/window and autocmd_busy is TRUE, do not free the 48973 + * buffer/window. but link it in the list starting with 48974 + * au_pending_free_buf/ap_pending_free_win, using b_next/w_next. 48975 + * Free the buffer/window when autocmd_busy is being set to FALSE. */ 42789 48976 +EXTERN buf_T *au_pending_free_buf INIT(= NULL); 48977 +EXTERN win_T *au_pending_free_win INIT(= NULL); 42790 48978 #endif 42791 48979 42792 48980 #ifdef FEAT_MOUSE 42793 @@ -596,6 +60 1,7 @@48981 @@ -596,6 +603,7 @@ 42794 48982 * to this when the window is using the global argument list. 42795 48983 */ … … 42799 48987 global_alist */ 42800 48988 42801 @@ -662,7 +6 68,6 @@48989 @@ -662,7 +670,6 @@ 42802 48990 /* set to TRUE when "-s" commandline argument 42803 48991 * used for ex */ … … 42807 48995 EXTERN int VIsual_active INIT(= FALSE); 42808 48996 /* whether Visual mode is active */ 42809 @@ -677,7 +68 2,6 @@48997 @@ -677,7 +684,6 @@ 42810 48998 42811 48999 EXTERN int redo_VIsual_busy INIT(= FALSE); … … 42815 49003 #ifdef FEAT_MOUSE 42816 49004 /* 42817 @@ -752,6 +75 6,12 @@49005 @@ -752,6 +758,12 @@ 42818 49006 */ 42819 49007 EXTERN pos_T Insstart; /* This is where the latest … … 42828 49016 /* 42829 49017 * Stuff for VREPLACE mode. 42830 @@ -979,11 +9 89,6 @@49018 @@ -979,11 +991,6 @@ 42831 49019 EXTERN int readonlymode INIT(= FALSE); /* Set to TRUE for "view" */ 42832 49020 EXTERN int recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */ … … 42840 49028 #ifdef DO_INIT 42841 49029 = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0} 42842 @@ -1177,11 +118 2,9 @@49030 @@ -1177,11 +1184,9 @@ 42843 49031 EXTERN int fill_diff INIT(= '-'); 42844 49032 #endif … … 42852 49040 #ifdef FEAT_CMDWIN 42853 49041 EXTERN int cedit_key INIT(= -1); /* key value of 'cedit' option */ 42854 @@ -1331,6 +133 4,9 @@49042 @@ -1331,6 +1336,9 @@ 42855 49043 #if defined(UNIX) || defined(VMS) 42856 49044 EXTERN int term_is_xterm INIT(= FALSE); /* xterm-like 'term' */ … … 42862 49050 #ifdef BACKSLASH_IN_FILENAME 42863 49051 EXTERN char psepc INIT(= '\\'); /* normal path separator character */ 42864 @@ -1490,6 +149 6,7 @@49052 @@ -1490,6 +1498,7 @@ 42865 49053 EXTERN char_u e_notopen[] INIT(= N_("E484: Can't open file %s")); 42866 49054 EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s")); … … 42872 49060 diff -Naur vim74.orig/src/gui.c vim74/src/gui.c 42873 49061 --- vim74.orig/src/gui.c 2013-06-30 15:41:48.000000000 +0000 42874 +++ vim74/src/gui.c 2014-0 6-01 00:43:14.494146069 +000049062 +++ vim74/src/gui.c 2014-07-21 23:33:39.796800179 +0000 42875 49063 @@ -3132,11 +3132,9 @@ 42876 49064 */ … … 42885 49073 /* 42886 49074 * When 'mousemodel' is "popup", shift-left is translated to right. 49075 diff -Naur vim74.orig/src/gui_beval.c vim74/src/gui_beval.c 49076 --- vim74.orig/src/gui_beval.c 2013-05-06 02:06:04.000000000 +0000 49077 +++ vim74/src/gui_beval.c 2014-07-21 23:33:39.853466698 +0000 49078 @@ -1193,11 +1193,13 @@ 49079 XmFontList fl; 49080 49081 fl = gui_motif_fontset2fontlist(&gui.tooltip_fontset); 49082 - if (fl != NULL) 49083 + if (fl == NULL) 49084 { 49085 - XmStringExtent(fl, s, &w, &h); 49086 - XmFontListFree(fl); 49087 + XmStringFree(s); 49088 + return; 49089 } 49090 + XmStringExtent(fl, s, &w, &h); 49091 + XmFontListFree(fl); 49092 } 49093 w += gui.border_offset << 1; 49094 h += gui.border_offset << 1; 42887 49095 diff -Naur vim74.orig/src/gui_gtk_x11.c vim74/src/gui_gtk_x11.c 42888 49096 --- vim74.orig/src/gui_gtk_x11.c 2013-06-30 15:42:13.000000000 +0000 42889 +++ vim74/src/gui_gtk_x11.c 2014-0 6-01 00:43:14.634145713+000049097 +++ vim74/src/gui_gtk_x11.c 2014-07-21 23:33:39.930133164 +0000 42890 49098 @@ -732,7 +732,10 @@ 42891 49099 gui_mch_start_blink(void) … … 42926 49134 } 42927 49135 #endif 49136 @@ -5957,27 +5965,48 @@ 49137 * Decide whether we need to scale. Allow one pixel of border 49138 * width to be cut off, in order to avoid excessive scaling for 49139 * tiny differences in font size. 49140 + * Do scale to fit the height to avoid gaps because of linespacing. 49141 */ 49142 need_scale = (width > SIGN_WIDTH + 2 49143 - || height > SIGN_HEIGHT + 2 49144 + || height != SIGN_HEIGHT 49145 || (width < 3 * SIGN_WIDTH / 4 49146 && height < 3 * SIGN_HEIGHT / 4)); 49147 if (need_scale) 49148 { 49149 - double aspect; 49150 + double aspect; 49151 + int w = width; 49152 + int h = height; 49153 49154 /* Keep the original aspect ratio */ 49155 aspect = (double)height / (double)width; 49156 width = (double)SIGN_WIDTH * SIGN_ASPECT / aspect; 49157 width = MIN(width, SIGN_WIDTH); 49158 - height = (double)width * aspect; 49159 + if (((double)(MAX(height, SIGN_HEIGHT)) / 49160 + (double)(MIN(height, SIGN_HEIGHT))) < 1.15) 49161 + { 49162 + /* Change the aspect ratio by at most 15% to fill the 49163 + * available space completly. */ 49164 + height = (double)SIGN_HEIGHT * SIGN_ASPECT / aspect; 49165 + height = MIN(height, SIGN_HEIGHT); 49166 + } 49167 + else 49168 + height = (double)width * aspect; 49169 49170 - /* This doesn't seem to be worth caching, and doing so 49171 - * would complicate the code quite a bit. */ 49172 - sign = gdk_pixbuf_scale_simple(sign, width, height, 49173 - GDK_INTERP_BILINEAR); 49174 - if (sign == NULL) 49175 - return; /* out of memory */ 49176 + if (w == width && h == height) 49177 + { 49178 + /* no change in dimensions; don't decrease reference counter 49179 + * (below) */ 49180 + need_scale = FALSE; 49181 + } 49182 + else 49183 + { 49184 + /* This doesn't seem to be worth caching, and doing so would 49185 + * complicate the code quite a bit. */ 49186 + sign = gdk_pixbuf_scale_simple(sign, width, height, 49187 + GDK_INTERP_BILINEAR); 49188 + if (sign == NULL) 49189 + return; /* out of memory */ 49190 + } 49191 } 49192 49193 /* The origin is the upper-left corner of the pixmap. Therefore 42928 49194 diff -Naur vim74.orig/src/gui_mac.c vim74/src/gui_mac.c 42929 49195 --- vim74.orig/src/gui_mac.c 2013-05-06 02:06:04.000000000 +0000 42930 +++ vim74/src/gui_mac.c 2014-0 6-01 00:43:14.654145662+000049196 +++ vim74/src/gui_mac.c 2014-07-21 23:33:39.973466385 +0000 42931 49197 @@ -1068,11 +1068,7 @@ 42932 49198 } … … 42961 49227 diff -Naur vim74.orig/src/gui_w48.c vim74/src/gui_w48.c 42962 49228 --- vim74.orig/src/gui_w48.c 2013-08-10 11:36:45.000000000 +0000 42963 +++ vim74/src/gui_w48.c 2014-0 6-01 00:43:14.767478706+000049229 +++ vim74/src/gui_w48.c 2014-07-21 23:33:40.123465993 +0000 42964 49230 @@ -1008,7 +1008,7 @@ 42965 49231 static LPARAM last_lParam = 0L; … … 43023 49289 diff -Naur vim74.orig/src/if_lua.c vim74/src/if_lua.c 43024 49290 --- vim74.orig/src/if_lua.c 2013-06-23 10:55:02.000000000 +0000 43025 +++ vim74/src/if_lua.c 2014-0 6-01 00:43:14.997478121+000049291 +++ vim74/src/if_lua.c 2014-07-21 23:33:40.400131938 +0000 43026 49292 @@ -734,7 +734,7 @@ 43027 49293 if (li == NULL) return 0; … … 43035 49301 diff -Naur vim74.orig/src/if_perl.xs vim74/src/if_perl.xs 43036 49302 --- vim74.orig/src/if_perl.xs 2013-08-02 17:28:50.000000000 +0000 43037 +++ vim74/src/if_perl.xs 2014-0 6-01 00:43:15.084144567+000049303 +++ vim74/src/if_perl.xs 2014-07-21 23:33:40.470131755 +0000 43038 49304 @@ -14,7 +14,8 @@ 43039 49305 #define IN_PERL_FILE /* don't include if_perl.pro from proto.h */ … … 43110 49376 # define Perl_croak_nocontext dll_Perl_croak_nocontext 43111 49377 # define Perl_call_argv dll_Perl_call_argv 43112 @@ -246,7 +266,9 @@ 49378 @@ -171,6 +191,9 @@ 49379 # define Perl_pop_scope dll_Perl_pop_scope 49380 # define Perl_push_scope dll_Perl_push_scope 49381 # define Perl_save_int dll_Perl_save_int 49382 +# if (PERL_REVISION == 5) && (PERL_VERSION >= 20) 49383 +# define Perl_save_strlen dll_Perl_save_strlen 49384 +# endif 49385 # define Perl_stack_grow dll_Perl_stack_grow 49386 # define Perl_set_context dll_Perl_set_context 49387 # if (PERL_REVISION == 5) && (PERL_VERSION >= 14) 49388 @@ -246,7 +269,9 @@ 43113 49389 # define Perl_Iscopestack_ix_ptr dll_Perl_Iscopestack_ix_ptr 43114 49390 # define Perl_Iunitcheckav_ptr dll_Perl_Iunitcheckav_ptr … … 43121 49397 43122 49398 /* 43123 @@ -262,10 +28 4,13 @@49399 @@ -262,10 +287,13 @@ 43124 49400 static int (*perl_parse)(PerlInterpreter*, XSINIT_t, int, char**, char**); 43125 49401 static void* (*Perl_get_context)(void); … … 43137 49413 static void (*Perl_croak_nocontext)(const char*, ...); 43138 49414 static I32 (*Perl_dowantarray)(pTHX); 43139 @@ -337,7 +362,12 @@ 49415 @@ -286,6 +314,9 @@ 49416 static void (*Perl_pop_scope)(pTHX); 49417 static void (*Perl_push_scope)(pTHX); 49418 static void (*Perl_save_int)(pTHX_ int*); 49419 +#if (PERL_REVISION == 5) && (PERL_VERSION >= 20) 49420 +static void (*Perl_save_strlen)(pTHX_ STRLEN* ptr); 49421 +#endif 49422 static SV** (*Perl_stack_grow)(pTHX_ SV**, SV**p, int); 49423 static SV** (*Perl_set_context)(void*); 49424 #if (PERL_REVISION == 5) && (PERL_VERSION >= 14) 49425 @@ -337,7 +368,12 @@ 43140 49426 static XPV** (*Perl_TXpv_ptr)(register PerlInterpreter*); 43141 49427 static STRLEN* (*Perl_Tna_ptr)(register PerlInterpreter*); … … 43150 49436 static void (*Perl_sys_term)(void); 43151 49437 static void (*Perl_call_list)(pTHX_ I32, AV*); 43152 @@ -360,7 +39 0,9 @@49438 @@ -360,7 +396,9 @@ 43153 49439 #endif 43154 49440 … … 43160 49446 static GV** (*Perl_Idefgv_ptr)(register PerlInterpreter*); 43161 49447 static GV** (*Perl_Ierrgv_ptr)(register PerlInterpreter*); 43162 @@ -384,12 +4 16,12 @@49448 @@ -384,12 +422,12 @@ 43163 49449 {"perl_parse", (PERL_PROC*)&perl_parse}, 43164 49450 {"Perl_get_context", (PERL_PROC*)&Perl_get_context}, … … 43175 49461 {"Perl_free_tmps", (PERL_PROC*)&Perl_free_tmps}, 43176 49462 {"Perl_gv_stashpv", (PERL_PROC*)&Perl_gv_stashpv}, 43177 @@ -481,7 +513,9 @@ 49463 @@ -408,6 +446,9 @@ 49464 {"Perl_pop_scope", (PERL_PROC*)&Perl_pop_scope}, 49465 {"Perl_push_scope", (PERL_PROC*)&Perl_push_scope}, 49466 {"Perl_save_int", (PERL_PROC*)&Perl_save_int}, 49467 +#if (PERL_REVISION == 5) && (PERL_VERSION >= 20) 49468 + {"Perl_save_strlen", (PERL_PROC*)&Perl_save_strlen}, 49469 +#endif 49470 {"Perl_stack_grow", (PERL_PROC*)&Perl_stack_grow}, 49471 {"Perl_set_context", (PERL_PROC*)&Perl_set_context}, 49472 #if (PERL_REVISION == 5) && (PERL_VERSION >= 14) 49473 @@ -481,7 +522,9 @@ 43178 49474 # endif 43179 49475 #endif … … 43185 49481 {"Perl_Idefgv_ptr", (PERL_PROC*)&Perl_Idefgv_ptr}, 43186 49482 {"Perl_Ierrgv_ptr", (PERL_PROC*)&Perl_Ierrgv_ptr}, 43187 @@ -492,6 +5 26,14 @@49483 @@ -492,6 +535,14 @@ 43188 49484 {"", NULL}, 43189 49485 }; … … 43202 49498 diff -Naur vim74.orig/src/if_py_both.h vim74/src/if_py_both.h 43203 49499 --- vim74.orig/src/if_py_both.h 2013-07-24 15:09:19.000000000 +0000 43204 +++ vim74/src/if_py_both.h 2014-0 6-01 00:43:15.114144490+000049500 +++ vim74/src/if_py_both.h 2014-07-21 23:33:40.640131312 +0000 43205 49501 @@ -13,6 +13,11 @@ 43206 49502 * Common code for if_python.c and if_python3.c. … … 44038 50334 diff -Naur vim74.orig/src/if_python.c vim74/src/if_python.c 44039 50335 --- vim74.orig/src/if_python.c 2013-07-09 19:40:11.000000000 +0000 44040 +++ vim74/src/if_python.c 2014-0 6-01 00:43:15.180810987+000050336 +++ vim74/src/if_python.c 2014-07-21 23:33:40.713464454 +0000 44041 50337 @@ -196,6 +196,7 @@ 44042 50338 # define PyTuple_Size dll_PyTuple_Size … … 44140 50436 diff -Naur vim74.orig/src/if_python3.c vim74/src/if_python3.c 44141 50437 --- vim74.orig/src/if_python3.c 2013-07-09 19:53:21.000000000 +0000 44142 +++ vim74/src/if_python3.c 2014-0 6-01 00:43:15.214144236+000050438 +++ vim74/src/if_python3.c 2014-07-21 23:33:40.770130973 +0000 44143 50439 @@ -97,6 +97,19 @@ 44144 50440 #define Py_ssize_t_fmt "n" … … 44297 50593 diff -Naur vim74.orig/src/if_ruby.c vim74/src/if_ruby.c 44298 50594 --- vim74.orig/src/if_ruby.c 2013-05-20 10:47:48.000000000 +0000 44299 +++ vim74/src/if_ruby.c 2014-0 6-01 00:43:15.230810860+000050595 +++ vim74/src/if_ruby.c 2014-07-21 23:33:40.823464167 +0000 44300 50596 @@ -88,14 +88,20 @@ 44301 50597 # define rb_int2big rb_int2big_stub … … 44404 50700 diff -Naur vim74.orig/src/if_tcl.c vim74/src/if_tcl.c 44405 50701 --- vim74.orig/src/if_tcl.c 2013-08-02 17:31:15.000000000 +0000 44406 +++ vim74/src/if_tcl.c 2014-0 6-01 00:43:15.274144083+000050702 +++ vim74/src/if_tcl.c 2014-07-21 23:33:40.893463984 +0000 44407 50703 @@ -165,6 +165,7 @@ 44408 50704 */ … … 44435 50731 stubs_initialized = TRUE; 44436 50732 } 50733 diff -Naur vim74.orig/src/installman.sh vim74/src/installman.sh 50734 --- vim74.orig/src/installman.sh 2010-05-15 11:04:07.000000000 +0000 50735 +++ vim74/src/installman.sh 2014-07-21 23:33:40.926797230 +0000 50736 @@ -43,10 +43,13 @@ 50737 fi 50738 fi 50739 50740 +# Note: setting LC_ALL to C is required to avoid illegal byte errors from sed 50741 +# on some systems. 50742 + 50743 if test $what = "install"; then 50744 # vim.1 50745 echo installing $destdir/$exename.1 50746 - sed -e s+/usr/local/lib/vim+$vimloc+ \ 50747 + LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ 50748 -e s+$vimloc/doc+$helpsubloc+ \ 50749 -e s+$vimloc/print+$printsubloc+ \ 50750 -e s+$vimloc/syntax+$synsubloc+ \ 50751 @@ -64,7 +67,7 @@ 50752 50753 # vimtutor.1 50754 echo installing $destdir/$exename""tutor.1 50755 - sed -e s+/usr/local/lib/vim+$vimloc+ \ 50756 + LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ 50757 -e s+$vimloc/tutor+$tutorsubloc+ \ 50758 $helpsource/vimtutor$langadd.1 > $destdir/$exename""tutor.1 50759 chmod $manmod $destdir/$exename""tutor.1 50760 @@ -76,7 +79,7 @@ 50761 50762 # evim.1 50763 echo installing $destdir/$evimname.1 50764 - sed -e s+/usr/local/lib/vim+$vimloc+ \ 50765 + LC_ALL=C sed -e s+/usr/local/lib/vim+$vimloc+ \ 50766 -e s+$vimloc/evim.vim+$scriptloc/evim.vim+ \ 50767 $helpsource/evim$langadd.1 > $destdir/$evimname.1 50768 chmod $manmod $destdir/$evimname.1 44437 50769 diff -Naur vim74.orig/src/macros.h vim74/src/macros.h 44438 50770 --- vim74.orig/src/macros.h 2013-06-12 15:07:32.000000000 +0000 44439 +++ vim74/src/macros.h 2014-0 6-01 00:43:15.400810427+000050771 +++ vim74/src/macros.h 2014-07-21 23:33:41.010130346 +0000 44440 50772 @@ -264,7 +264,7 @@ 44441 50773 # define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1 … … 44449 50781 diff -Naur vim74.orig/src/main.c vim74/src/main.c 44450 50782 --- vim74.orig/src/main.c 2013-07-03 10:36:49.000000000 +0000 44451 +++ vim74/src/main.c 2014-0 6-01 00:43:15.424143701+000050783 +++ vim74/src/main.c 2014-07-21 23:33:41.050130242 +0000 44452 50784 @@ -322,6 +322,7 @@ 44453 50785 init_yank(); /* init yank buffers */ … … 44585 50917 diff -Naur vim74.orig/src/mark.c vim74/src/mark.c 44586 50918 --- vim74.orig/src/mark.c 2013-08-02 15:22:10.000000000 +0000 44587 +++ vim74/src/mark.c 2014-0 6-01 00:43:15.447476975+000050919 +++ vim74/src/mark.c 2014-07-21 23:33:41.063463541 +0000 44588 50920 @@ -98,7 +98,6 @@ 44589 50921 return OK; … … 44701 51033 diff -Naur vim74.orig/src/mbyte.c vim74/src/mbyte.c 44702 51034 --- vim74.orig/src/mbyte.c 2013-07-05 18:07:21.000000000 +0000 44703 +++ vim74/src/mbyte.c 2014-0 6-01 00:43:15.490810198+000051035 +++ vim74/src/mbyte.c 2014-07-21 23:33:41.080130164 +0000 44704 51036 @@ -83,10 +83,18 @@ 44705 51037 # ifndef WIN32_LEAN_AND_MEAN … … 44783 51115 diff -Naur vim74.orig/src/memfile.c vim74/src/memfile.c 44784 51116 --- vim74.orig/src/memfile.c 2013-05-23 20:22:22.000000000 +0000 44785 +++ vim74/src/memfile.c 2014-0 6-01 00:43:15.514143472+000051117 +++ vim74/src/memfile.c 2014-07-21 23:33:41.096796787 +0000 44786 51118 @@ -1358,7 +1358,7 @@ 44787 51119 if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) … … 44795 51127 diff -Naur vim74.orig/src/memline.c vim74/src/memline.c 44796 51128 --- vim74.orig/src/memline.c 2013-05-06 02:01:02.000000000 +0000 44797 +++ vim74/src/memline.c 2014-0 6-01 00:43:15.537476746+000051129 +++ vim74/src/memline.c 2014-07-21 23:33:41.143463332 +0000 44798 51130 @@ -289,6 +289,9 @@ 44799 51131 buf->b_ml.ml_chunksize = NULL; … … 44993 51325 diff -Naur vim74.orig/src/menu.c vim74/src/menu.c 44994 51326 --- vim74.orig/src/menu.c 2011-04-11 13:17:21.000000000 +0000 44995 +++ vim74/src/menu.c 2014-0 6-01 00:43:15.557476695+000051327 +++ vim74/src/menu.c 2014-07-21 23:33:41.163463280 +0000 44996 51328 @@ -1640,7 +1640,6 @@ 44997 51329 idx = MENU_INDEX_INSERT; … … 45027 51359 diff -Naur vim74.orig/src/message.c vim74/src/message.c 45028 51360 --- vim74.orig/src/message.c 2013-08-09 18:30:45.000000000 +0000 45029 +++ vim74/src/message.c 2014-0 6-01 00:43:15.597476593+000051361 +++ vim74/src/message.c 2014-07-21 23:33:41.193463201 +0000 45030 51362 @@ -887,6 +887,8 @@ 45031 51363 int oldState; … … 45070 51402 diff -Naur vim74.orig/src/misc1.c vim74/src/misc1.c 45071 51403 --- vim74.orig/src/misc1.c 2013-08-03 15:29:33.000000000 +0000 45072 +++ vim74/src/misc1.c 2014-06-01 00:43:15.620809867 +0000 45073 @@ -303,10 +303,18 @@ 51404 +++ vim74/src/misc1.c 2014-07-21 23:33:41.260129694 +0000 51405 @@ -32,7 +32,7 @@ 51406 int 51407 get_indent() 51408 { 51409 - return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts); 51410 + return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts, FALSE); 51411 } 51412 51413 /* 51414 @@ -42,7 +42,7 @@ 51415 get_indent_lnum(lnum) 51416 linenr_T lnum; 51417 { 51418 - return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts); 51419 + return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts, FALSE); 51420 } 51421 51422 #if defined(FEAT_FOLDING) || defined(PROTO) 51423 @@ -55,7 +55,7 @@ 51424 buf_T *buf; 51425 linenr_T lnum; 51426 { 51427 - return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts); 51428 + return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts, FALSE); 51429 } 51430 #endif 51431 51432 @@ -64,16 +64,23 @@ 51433 * 'tabstop' at "ts" 51434 */ 51435 int 51436 -get_indent_str(ptr, ts) 51437 +get_indent_str(ptr, ts, list) 51438 char_u *ptr; 51439 int ts; 51440 + int list; /* if TRUE, count only screen size for tabs */ 51441 { 51442 int count = 0; 51443 51444 for ( ; *ptr; ++ptr) 51445 { 51446 - if (*ptr == TAB) /* count a tab for what it is worth */ 51447 - count += ts - (count % ts); 51448 + if (*ptr == TAB) 51449 + { 51450 + if (!list || lcs_tab1) /* count a tab for what it is worth */ 51451 + count += ts - (count % ts); 51452 + else 51453 + /* in list mode, when tab is not set, count screen char width for Tab: ^I */ 51454 + count += ptr2cells(ptr); 51455 + } 51456 else if (*ptr == ' ') 51457 ++count; /* count a space for one */ 51458 else 51459 @@ -303,10 +310,18 @@ 45074 51460 ml_replace(curwin->w_cursor.lnum, newline, FALSE); 45075 51461 if (flags & SIN_CHANGED) … … 45094 51480 } 45095 51481 else 45096 @@ -1397,7 +1405,7 @@ 51482 @@ -468,6 +483,61 @@ 51483 return (int)col; 51484 } 51485 51486 +#if defined(FEAT_LINEBREAK) || defined(PROTO) 51487 +/* 51488 + * Return appropriate space number for breakindent, taking influencing 51489 + * parameters into account. Window must be specified, since it is not 51490 + * necessarily always the current one. 51491 + */ 51492 + int 51493 +get_breakindent_win(wp, line) 51494 + win_T *wp; 51495 + char_u *line; /* start of the line */ 51496 +{ 51497 + static int prev_indent = 0; /* cached indent value */ 51498 + static long prev_ts = 0L; /* cached tabstop value */ 51499 + static char_u *prev_line = NULL; /* cached pointer to line */ 51500 + static int prev_tick = 0; /* changedtick of cached value */ 51501 + int bri = 0; 51502 + /* window width minus window margin space, i.e. what rests for text */ 51503 + const int eff_wwidth = W_WIDTH(wp) 51504 + - ((wp->w_p_nu || wp->w_p_rnu) 51505 + && (vim_strchr(p_cpo, CPO_NUMCOL) == NULL) 51506 + ? number_width(wp) + 1 : 0); 51507 + 51508 + /* used cached indent, unless pointer or 'tabstop' changed */ 51509 + if (prev_line != line || prev_ts != wp->w_buffer->b_p_ts 51510 + || prev_tick != wp->w_buffer->b_changedtick) 51511 + { 51512 + prev_line = line; 51513 + prev_ts = wp->w_buffer->b_p_ts; 51514 + prev_tick = wp->w_buffer->b_changedtick; 51515 + prev_indent = get_indent_str(line, 51516 + (int)wp->w_buffer->b_p_ts, wp->w_p_list); 51517 + } 51518 + bri = prev_indent + wp->w_p_brishift; 51519 + 51520 + /* indent minus the length of the showbreak string */ 51521 + if (wp->w_p_brisbr) 51522 + bri -= vim_strsize(p_sbr); 51523 + 51524 + /* Add offset for number column, if 'n' is in 'cpoptions' */ 51525 + bri += win_col_off2(wp); 51526 + 51527 + /* never indent past left window margin */ 51528 + if (bri < 0) 51529 + bri = 0; 51530 + /* always leave at least bri_min characters on the left, 51531 + * if text width is sufficient */ 51532 + else if (bri > eff_wwidth - wp->w_p_brimin) 51533 + bri = (eff_wwidth - wp->w_p_brimin < 0) 51534 + ? 0 : eff_wwidth - wp->w_p_brimin; 51535 + 51536 + return bri; 51537 +} 51538 +#endif 51539 + 51540 + 51541 #if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT) 51542 51543 static int cin_is_cinword __ARGS((char_u *line)); 51544 @@ -670,7 +740,7 @@ 51545 /* 51546 * count white space on current line 51547 */ 51548 - newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts); 51549 + newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts, FALSE); 51550 if (newindent == 0 && !(flags & OPENLINE_COM_LIST)) 51551 newindent = second_line_indent; /* for ^^D command in insert mode */ 51552 51553 @@ -1193,7 +1263,7 @@ 51554 || do_si 51555 #endif 51556 ) 51557 - newindent = get_indent_str(leader, (int)curbuf->b_p_ts); 51558 + newindent = get_indent_str(leader, (int)curbuf->b_p_ts, FALSE); 51559 51560 /* Add the indent offset */ 51561 if (newindent + off < 0) 51562 @@ -1397,7 +1467,7 @@ 45097 51563 #ifdef FEAT_SMARTINDENT 45098 51564 if (did_si) … … 45103 51569 if (p_sr) 45104 51570 newindent -= newindent % sw; 45105 @@ -1581,9 +1 589,9 @@51571 @@ -1581,9 +1651,9 @@ 45106 51572 45107 51573 #if defined(FEAT_COMMENTS) || defined(PROTO) … … 45116 51582 * comment leader. 45117 51583 * "backward" must be true for the "O" command. 45118 @@ -3117,6 +3125,9 @@ 51584 @@ -1986,6 +2056,7 @@ 51585 char_u *s; 51586 int lines = 0; 51587 int width; 51588 + char_u *line; 51589 51590 #ifdef FEAT_DIFF 51591 /* Check for filler lines above this buffer line. When folded the result 51592 @@ -2001,12 +2072,12 @@ 51593 return lines + 1; 51594 #endif 51595 51596 - s = ml_get_buf(wp->w_buffer, lnum, FALSE); 51597 + line = s = ml_get_buf(wp->w_buffer, lnum, FALSE); 51598 51599 col = 0; 51600 while (*s != NUL && --column >= 0) 51601 { 51602 - col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL); 51603 + col += win_lbr_chartabsize(wp, line, s, (colnr_T)col, NULL); 51604 mb_ptr_adv(s); 51605 } 51606 51607 @@ -2018,7 +2089,7 @@ 51608 * 'ts') -- webb. 51609 */ 51610 if (*s == TAB && (State & NORMAL) && (!wp->w_p_list || lcs_tab1)) 51611 - col += win_lbr_chartabsize(wp, s, (colnr_T)col, NULL) - 1; 51612 + col += win_lbr_chartabsize(wp, line, s, (colnr_T)col, NULL) - 1; 51613 51614 /* 51615 * Add column offset for 'number', 'relativenumber', 'foldcolumn', etc. 51616 @@ -3117,6 +3188,9 @@ 45119 51617 if (hasAnyFolding(wp)) 45120 51618 set_topline(wp, wp->w_topline); … … 45126 51624 } 45127 51625 45128 @@ -4800,9 +48 11,9 @@51626 @@ -4800,9 +4874,9 @@ 45129 51627 45130 51628 if (fname == NULL) … … 45138 51636 mb_ptr_adv(p2); 45139 51637 } 45140 @@ -4921,7 +49 32,8 @@51638 @@ -4921,7 +4995,8 @@ 45141 51639 } 45142 51640 … … 45148 51646 int 45149 51647 vim_ispathsep(c) 45150 @@ -4944,6 + 4956,20 @@51648 @@ -4944,6 +5019,20 @@ 45151 51649 #endif 45152 51650 } … … 45169 51667 /* 45170 51668 * return TRUE if 'c' is a path list separator. 45171 @@ -5168,11 +5 194,18 @@51669 @@ -5168,11 +5257,18 @@ 45172 51670 #if defined(FEAT_CINDENT) || defined(FEAT_SYN_HL) 45173 51671 … … 45188 51686 find_start_comment(ind_maxcomment) /* XXX */ 45189 51687 int ind_maxcomment; 45190 @@ -5290,7 +5323,7 @@ 51688 @@ -5286,11 +5382,12 @@ 51689 static char_u *cin_skipcomment __ARGS((char_u *)); 51690 static int cin_nocode __ARGS((char_u *)); 51691 static pos_T *find_line_comment __ARGS((void)); 51692 +static int cin_has_js_key __ARGS((char_u *text)); 51693 static int cin_islabel_skip __ARGS((char_u **)); 45191 51694 static int cin_isdefault __ARGS((char_u *)); 45192 51695 static char_u *after_label __ARGS((char_u *l)); … … 45197 51700 static int cin_get_equal_amount __ARGS((linenr_T lnum)); 45198 51701 static int cin_ispreproc __ARGS((char_u *)); 45199 @@ -5299,28 +53 32,26@@51702 @@ -5299,28 +5396,27 @@ 45200 51703 static int cin_islinecomment __ARGS((char_u *)); 45201 51704 static int cin_isterminated __ARGS((char_u *, int, int)); … … 45223 51726 +static pos_T *find_start_brace __ARGS((void)); 45224 51727 +static pos_T *find_match_paren __ARGS((int)); 51728 +static pos_T *find_match_char __ARGS((int c, int ind_maxparen)); 45225 51729 +static int corr_ind_maxparen __ARGS((pos_T *startpos)); 45226 51730 static int find_last_paren __ARGS((char_u *l, int start, int end)); … … 45234 51738 * Skip over white space and C comments within the line. 45235 51739 * Also skip over Perl/shell comments if desired. 45236 @@ -5337,7 +5 368,7 @@51740 @@ -5337,7 +5433,7 @@ 45237 51741 45238 51742 /* Perl/shell # comment comment continues until eol. Require a space … … 45243 51747 s += STRLEN(s); 45244 51748 break; 45245 @@ -5423,8 +5454,7 @@ 51749 @@ -5400,7 +5496,38 @@ 51750 } 51751 51752 /* 51753 + * Return TRUE if "text" starts with "key:". 51754 + */ 51755 + static int 51756 +cin_has_js_key(text) 51757 + char_u *text; 51758 +{ 51759 + char_u *s = skipwhite(text); 51760 + int quote = 0; 51761 + 51762 + if (*s == '\'' || *s == '"') 51763 + { 51764 + /* can be 'key': or "key": */ 51765 + quote = *s; 51766 + ++s; 51767 + } 51768 + if (!vim_isIDc(*s)) /* need at least one ID character */ 51769 + return FALSE; 51770 + 51771 + while (vim_isIDc(*s)) 51772 + ++s; 51773 + if (*s == quote) 51774 + ++s; 51775 + 51776 + s = cin_skipcomment(s); 51777 + 51778 + /* "::" is not a label, it's C++ */ 51779 + return (*s == ':' && s[1] != ':'); 51780 +} 51781 + 51782 +/* 51783 * Check if string matches "label:"; move to character after ':' if true. 51784 + * "*s" must point to the start of the label, if there is one. 51785 */ 51786 static int 51787 cin_islabel_skip(s) 51788 @@ -5423,8 +5550,7 @@ 45246 51789 * Note: curwin->w_cursor must be where we are looking for the label. 45247 51790 */ … … 45253 51796 char_u *s; 45254 51797 45255 @@ -5458,7 +5 488,7 @@51798 @@ -5458,7 +5584,7 @@ 45256 51799 * If we're in a comment now, skip to the start of the comment. 45257 51800 */ … … 45262 51805 45263 51806 line = ml_get_curline(); 45264 @@ -5704,10 +5 734,9 @@51807 @@ -5704,10 +5830,9 @@ 45265 51808 * ^ 45266 51809 */ … … 45274 51817 char_u *l; 45275 51818 int amount; 45276 @@ -5717,8 +5 746,7 @@51819 @@ -5717,8 +5842,7 @@ 45277 51820 curwin->w_cursor.lnum = lnum; 45278 51821 l = ml_get_curline(); … … 45284 51827 amount = get_indent_nolabel(lnum); 45285 51828 l = after_label(ml_get_curline()); 45286 @@ -5962,12 + 5990,10 @@51829 @@ -5962,12 +6086,10 @@ 45287 51830 * "min_lnum" is the line before which we will not be looking. 45288 51831 */ … … 45298 51841 char_u *s; 45299 51842 linenr_T lnum = first_lnum; 45300 @@ -5981,7 +6 007,7 @@51843 @@ -5981,7 +6103,7 @@ 45301 51844 s = *sp; 45302 51845 … … 45307 51850 lnum = trypos->lnum; 45308 51851 if (lnum < min_lnum) 45309 @@ -6089,10 +6 115,9 @@51852 @@ -6089,10 +6211,9 @@ 45310 51853 * ')' and ';'. The condition may be spread over several lines. 45311 51854 */ … … 45319 51862 pos_T cursor_save; 45320 51863 pos_T *trypos; 45321 @@ -6112,7 +6 137,8 @@51864 @@ -6112,7 +6233,8 @@ 45322 51865 ++p; 45323 51866 ++curwin->w_cursor.col; … … 45329 51872 retval = TRUE; 45330 51873 curwin->w_cursor = cursor_save; 45331 @@ -6175,10 +62 01,8 @@51874 @@ -6175,10 +6297,8 @@ 45332 51875 * Adjust the cursor to the line with "while". 45333 51876 */ … … 45341 51884 char_u *line; 45342 51885 char_u *p; 45343 @@ -6202,7 +6 226,7 @@51886 @@ -6202,7 +6322,7 @@ 45344 51887 * before the matching '('. XXX */ 45345 51888 i = (int)(p - line); … … 45350 51893 { 45351 51894 s = cin_skipcomment(ml_get(trypos->lnum)); 45352 @@ -6394,11 +6 418,8 @@51895 @@ -6394,11 +6514,8 @@ 45353 51896 } 45354 51897 … … 45363 51906 int amount; 45364 51907 colnr_T vcol; 45365 @@ -6408,11 +6 429,10 @@51908 @@ -6408,11 +6525,10 @@ 45366 51909 { 45367 51910 amount = get_indent(); … … 45377 51920 else 45378 51921 { 45379 @@ -6420,8 +6 440,8 @@51922 @@ -6420,8 +6536,8 @@ 45380 51923 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); 45381 51924 amount = (int)vcol; … … 45388 51931 } 45389 51932 45390 @@ -6505,8 +6 525,7 @@51933 @@ -6505,8 +6621,7 @@ 45391 51934 /* } */ 45392 51935 … … 45398 51941 pos_T cursor_save; 45399 51942 pos_T *trypos; 45400 @@ -6522,7 +6 541,7 @@51943 @@ -6522,7 +6637,7 @@ 45401 51944 pos = NULL; 45402 51945 /* ignore the { if it's in a // or / * * / comment */ … … 45407 51950 if (pos != NULL) 45408 51951 curwin->w_cursor.lnum = pos->lnum; 45409 @@ -6536,9 +6555,8 @@ 51952 @@ -6532,20 +6647,27 @@ 51953 } 51954 51955 /* 51956 - * Find the matching '(', failing if it is in a comment. 51957 + * Find the matching '(', ignoring it if it is in a comment. 45410 51958 * Return NULL if no match found. 45411 51959 */ … … 45413 51961 -find_match_paren(ind_maxparen, ind_maxcomment) /* XXX */ 45414 51962 +find_match_paren(ind_maxparen) /* XXX */ 51963 + int ind_maxparen; 51964 +{ 51965 + return find_match_char('(', ind_maxparen); 51966 +} 51967 + 51968 + static pos_T * 51969 +find_match_char(c, ind_maxparen) /* XXX */ 51970 + int c; 45415 51971 int ind_maxparen; 45416 51972 - int ind_maxcomment; … … 45418 51974 pos_T cursor_save; 45419 51975 pos_T *trypos; 45420 @@ -6555,7 +6573,7 @@ 51976 static pos_T pos_copy; 51977 51978 cursor_save = curwin->w_cursor; 51979 - if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL) 51980 + if ((trypos = findmatchlimit(NULL, c, 0, ind_maxparen)) != NULL) 51981 { 51982 /* check if the ( is in a // comment */ 51983 if ((colnr_T)cin_skip2pos(trypos) > trypos->col) 51984 @@ -6555,7 +6677,7 @@ 45421 51985 pos_copy = *trypos; /* copy trypos, findmatch will change it */ 45422 51986 trypos = &pos_copy; … … 45427 51991 } 45428 51992 } 45429 @@ -6570,15 +6588,14 @@ 51993 @@ -6564,21 +6686,46 @@ 51994 } 51995 51996 /* 51997 + * Find the matching '(', ignoring it if it is in a comment or before an 51998 + * unmatched {. 51999 + * Return NULL if no match found. 52000 + */ 52001 + static pos_T * 52002 +find_match_paren_after_brace(ind_maxparen) /* XXX */ 52003 + int ind_maxparen; 52004 +{ 52005 + pos_T *trypos = find_match_paren(ind_maxparen); 52006 + 52007 + if (trypos != NULL) 52008 + { 52009 + pos_T *tryposBrace = find_start_brace(); 52010 + 52011 + /* If both an unmatched '(' and '{' is found. Ignore the '(' 52012 + * position if the '{' is further down. */ 52013 + if (tryposBrace != NULL 52014 + && (trypos->lnum != tryposBrace->lnum 52015 + ? trypos->lnum < tryposBrace->lnum 52016 + : trypos->col < tryposBrace->col)) 52017 + trypos = NULL; 52018 + } 52019 + return trypos; 52020 +} 52021 + 52022 +/* 52023 * Return ind_maxparen corrected for the difference in line number between the 52024 * cursor position and "startpos". This makes sure that searching for a 52025 * matching paren above the cursor line doesn't find a match because of 45430 52026 * looking a few lines further. 45431 52027 */ … … 45447 52043 45448 52044 /* 45449 @@ -6616,201 +6 633,229 @@52045 @@ -6616,201 +6763,229 @@ 45450 52046 return retval; 45451 52047 } … … 45480 52076 45481 52077 - int ind_level = sw; 45482 - 52078 + /* Spaces from the edge of the line an open brace that's at the end of a 52079 + * line is imagined to be. */ 52080 + buf->b_ind_open_imag = 0; 52081 45483 52082 - /* 45484 52083 - * spaces from the edge of the line an open brace that's at the end of a … … 45486 52085 - */ 45487 52086 - int ind_open_imag = 0; 45488 + /* Spaces from the edge of the line an open brace that's at the end of a45489 + * line is imagined to be. */45490 + buf->b_ind_ open_imag= 0;52087 + /* Spaces from the prevailing indent for a line that is not preceded by 52088 + * an opening brace. */ 52089 + buf->b_ind_no_brace = 0; 45491 52090 45492 52091 - /* … … 45495 52094 - */ 45496 52095 - int ind_no_brace = 0; 45497 + /* Spaces from the prevailing indent for a line that is not preceded by 45498 + * an opening brace. */ 45499 + buf->b_ind_no_brace = 0; 52096 + /* Column where the first { of a function should be located }. */ 52097 + buf->b_ind_first_open = 0; 45500 52098 45501 52099 - /* … … 45503 52101 - */ 45504 52102 - int ind_first_open = 0; 45505 + /* Column where the first { of a function should be located }. */ 45506 + buf->b_ind_first_open = 0; 52103 + /* Spaces from the prevailing indent a leftmost open brace should be 52104 + * located. */ 52105 + buf->b_ind_open_extra = 0; 45507 52106 45508 52107 - /* … … 45511 52110 - */ 45512 52111 - int ind_open_extra = 0; 45513 + /* Spaces from the prevailing indent a leftmost open brace should be 45514 + * located. */ 45515 + buf->b_ind_open_extra = 0; 45516 52112 - 45517 52113 - /* 45518 52114 - * spaces from the matching open brace (real location for one at the left … … 45746 52342 + * while(). */ 45747 52343 + buf->b_ind_if_for_while = 0; 45748 + 52344 45749 52345 + for (p = buf->b_p_cino; *p; ) 45750 52346 + { … … 45781 52377 + if (l[1] == '-') 45782 52378 + n = -n; 45783 52379 + 45784 52380 + /* When adding an entry here, also update the default 'cinoptions' in 45785 52381 + * doc/indent.txt, and add explanation for it! */ … … 45833 52429 int amount; 45834 52430 int scope_amount; 45835 @@ -6845,10 +6890,6 @@ 52431 @@ -6842,13 +7017,11 @@ 52432 #define LOOKFOR_NOBREAK 8 52433 #define LOOKFOR_CPP_BASECLASS 9 52434 #define LOOKFOR_ENUM_OR_INIT 10 52435 +#define LOOKFOR_JS_KEY 11 52436 +#define LOOKFOR_NO_COMMA 12 45836 52437 45837 52438 int whilelevel; … … 45844 52445 int iscase; 45845 52446 int lookfor_break; 45846 @@ -6857,83 +6898,8 @@ 52447 @@ -6856,84 +7029,10 @@ 52448 int cont_amount = 0; /* amount for continuation line */ 45847 52449 int original_line_islabel; 45848 52450 int added_to_amount = 0; 52451 + int js_cur_has_key = 0; 45849 52452 45850 52453 - for (options = curbuf->b_p_cino; *options; ) … … 45930 52533 /* remember where the cursor was when we started */ 45931 52534 cur_curpos = curwin->w_cursor; 45932 @@ -6967,22 + 6933,21 @@52535 @@ -6967,22 +7066,21 @@ 45933 52536 45934 52537 curwin->w_cursor.col = 0; … … 45957 52560 amount = 0; 45958 52561 } 45959 @@ -7004,7 + 6969,8 @@52562 @@ -7004,7 +7102,8 @@ 45960 52563 * comment, try using the 'comments' option. 45961 52564 */ … … 45967 52570 int lead_start_len = 2; 45968 52571 int lead_middle_len = 1; 45969 @@ -7138,7 +7 104,7 @@52572 @@ -7138,7 +7237,7 @@ 45970 52573 } 45971 52574 if (amount == -1) /* use the comment opener */ … … 45976 52579 start = ml_get(trypos->lnum); 45977 52580 look = start + trypos->col + 2; /* skip / and * */ 45978 @@ -7147, 8 +7113,8 @@52581 @@ -7147,18 +7246,28 @@ 45979 52582 } 45980 52583 getvcol(curwin, trypos, &col, NULL, NULL); … … 45987 52590 } 45988 52591 } 45989 @@ -7156,9 +7122,9 @@ 52592 45990 52593 /* 52594 + * Are we looking at a ']' that has a match? 52595 + */ 52596 + else if (*skipwhite(theline) == ']' 52597 + && (trypos = find_match_char('[', curbuf->b_ind_maxparen)) != NULL) 52598 + { 52599 + /* align with the line containing the '['. */ 52600 + amount = get_indent_lnum(trypos->lnum); 52601 + } 52602 + 52603 + /* 45991 52604 * Are we inside parentheses or braces? 45992 52605 */ /* XXX */ … … 46000 52613 { 46001 52614 if (trypos != NULL && tryposBrace != NULL) 46002 @@ -7179,7 +7 145,7 @@52615 @@ -7179,7 +7288,7 @@ 46003 52616 * If the matching paren is more than one line away, use the indent of 46004 52617 * a previous non-empty line that matches the same paren. … … 46009 52622 /* Line up with the start of the matching paren line. */ 46010 52623 amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */ 46011 @@ -7198,7 +7 164,7 @@52624 @@ -7198,7 +7307,7 @@ 46012 52625 curwin->w_cursor.lnum = lnum; 46013 52626 … … 46018 52631 lnum = trypos->lnum + 1; 46019 52632 continue; 46020 @@ -7206,8 +7 172,7 @@52633 @@ -7206,8 +7315,7 @@ 46021 52634 46022 52635 /* XXX */ … … 46028 52641 && trypos->col == our_paren_pos.col) 46029 52642 { 46030 @@ -7235,7 +7 200,7 @@52643 @@ -7235,7 +7343,7 @@ 46031 52644 int ignore_paren_col = 0; 46032 52645 int is_if_for_while = 0; … … 46037 52650 /* Look for the outermost opening parenthesis on this line 46038 52651 * and check whether it belongs to an "if", "for" or "while". */ 46039 @@ -7250,7 +7 215,7 @@52652 @@ -7250,7 +7358,7 @@ 46040 52653 curwin->w_cursor.lnum = outermost.lnum; 46041 52654 curwin->w_cursor.col = outermost.col; … … 46046 52659 46047 52660 curwin->w_cursor = cursor_save; 46048 @@ -7261,7 +7 226,7 @@52661 @@ -7261,7 +7369,7 @@ 46049 52662 cin_is_if_for_while_before_offset(line, &outermost.col); 46050 52663 } … … 46055 52668 if (*look == '(') 46056 52669 { 46057 @@ -7275,7 +7 240,8 @@52670 @@ -7275,7 +7383,8 @@ 46058 52671 line = ml_get_curline(); 46059 52672 look_col = (int)(look - line); … … 46065 52678 && trypos->lnum == our_paren_pos.lnum 46066 52679 && trypos->col < our_paren_pos.col) 46067 @@ -7284,24 +7 250,25 @@52680 @@ -7284,24 +7393,25 @@ 46068 52681 curwin->w_cursor.lnum = save_lnum; 46069 52682 look = ml_get(our_paren_pos.lnum) + look_col; … … 46096 52709 { 46097 52710 /* look for opening unmatched paren, indent one level 46098 @@ -7323,9 +7 290,9 @@52711 @@ -7323,9 +7433,9 @@ 46099 52712 } 46100 52713 … … 46108 52721 else 46109 52722 { 46110 @@ -7351,12 +7 318,12 @@52723 @@ -7351,12 +7461,12 @@ 46111 52724 } 46112 52725 } … … 46124 52737 { 46125 52738 if (cur_amount != MAXCOL) 46126 @@ -7364,39 +7 331,39@@52739 @@ -7364,39 +7474,40 @@ 46127 52740 } 46128 52741 else … … 46161 52774 - if (find_match_paren(ind_maxparen, ind_maxcomment) != NULL) 46162 52775 - amount += ind_unclosed2; 46163 + if (find_match_paren(curbuf->b_ind_maxparen) != NULL) 52776 + if (find_match_paren_after_brace(curbuf->b_ind_maxparen) 52777 + != NULL) 46164 52778 + amount += curbuf->b_ind_unclosed2; 46165 52779 else … … 46174 52788 } 46175 52789 /* 46176 @@ -7414, 7 +7381,7@@52790 @@ -7414,16 +7525,15 @@ 46177 52791 46178 52792 /* add extra indent for a comment */ … … 46181 52795 + amount += curbuf->b_ind_comment; 46182 52796 } 46183 46184 /* 46185 @@ -7457,8 +7424,8 @@ 46186 */ 52797 - 52798 - /* 52799 - * Are we at least inside braces, then? 52800 - */ 52801 else 52802 { 52803 + /* 52804 + * We are inside braces, there is a { before this line at the position 52805 + * stored in tryposBrace. 52806 + */ 52807 trypos = tryposBrace; 52808 - 52809 ourscope = trypos->lnum; 52810 start = ml_get(ourscope); 52811 52812 @@ -7445,39 +7555,40 @@ 52813 } 52814 else 52815 { 52816 - /* 52817 - * that opening brace might have been on a continuation 52818 - * line. if so, find the start of the line. 52819 - */ 52820 + /* That opening brace might have been on a continuation 52821 + * line. if so, find the start of the line. */ 52822 curwin->w_cursor.lnum = ourscope; 52823 52824 - /* 52825 - * position the cursor over the rightmost paren, so that 52826 - * matching it will take us back to the start of the line. 52827 - */ 52828 + /* Position the cursor over the rightmost paren, so that 52829 + * matching it will take us back to the start of the line. */ 46187 52830 lnum = ourscope; 46188 52831 if (find_last_paren(start, '(', ')') … … 46193 52836 lnum = trypos->lnum; 46194 52837 46195 /* 46196 @@ -7467,11 +7434,11 @@ 52838 - /* 52839 - * It could have been something like 52840 + /* It could have been something like 52841 * case 1: if (asdf && 46197 52842 * ldfd) { 46198 52843 * } 46199 52844 */ 46200 52845 - if (ind_js || (ind_keep_case_label 46201 + if (curbuf->b_ind_js || (curbuf->b_ind_keep_case_label 46202 && cin_iscase(skipwhite(ml_get_curline()), FALSE))) 52846 - && cin_iscase(skipwhite(ml_get_curline()), FALSE))) 52847 + if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label) 52848 + && cin_iscase(skipwhite(ml_get_curline()), FALSE)) 46203 52849 amount = get_indent(); 52850 + else if (curbuf->b_ind_js) 52851 + amount = get_indent_lnum(lnum); 46204 52852 else 46205 52853 - amount = skip_label(lnum, &l, ind_maxcomment); … … 46208 52856 start_brace = BRACE_AT_END; 46209 52857 } 46210 @@ -7487,7 +7454,7 @@ 52858 52859 + /* For Javascript check if the line starts with "key:". */ 52860 + if (curbuf->b_ind_js) 52861 + js_cur_has_key = cin_has_js_key(theline); 52862 + 52863 /* 52864 - * if we're looking at a closing brace, that's where 52865 + * If we're looking at a closing brace, that's where 52866 * we want to be. otherwise, add the amount of room 52867 * that an indent is supposed to be. 52868 */ 52869 @@ -7487,7 +7598,7 @@ 46211 52870 * they may want closing braces to line up with something 46212 52871 * other than the open brace. indulge them, if so. … … 46217 52876 else 46218 52877 { 46219 @@ -7500,14 +7 467,12 @@52878 @@ -7500,14 +7611,12 @@ 46220 52879 lookfor = LOOKFOR_INITIAL; 46221 52880 if (cin_iselse(theline)) … … 46234 52893 amount = get_indent(); /* XXX */ 46235 52894 goto theend; 46236 @@ -7524,12 +7 489,12 @@52895 @@ -7524,12 +7633,12 @@ 46237 52896 /* 46238 52897 * if the '{' is _really_ at the left margin, use the imaginary … … 46249 52908 } 46250 52909 else if (start_brace == BRACE_AT_START && 46251 @@ -7542,16 +7 507,16 @@52910 @@ -7542,16 +7651,16 @@ 46252 52911 { 46253 52912 if (start_brace == BRACE_AT_END) /* '{' is at end of line */ … … 46270 52929 amount = 0; 46271 52930 } 46272 @@ -7562,20 +7 527,22 @@52931 @@ -7562,20 +7671,22 @@ 46273 52932 if (cin_iscase(theline, FALSE)) /* it's a switch() label */ 46274 52933 { … … 46297 52956 scope_amount = amount; 46298 52957 whilelevel = 0; 46299 @@ -7613,14 +7580,14 @@ 52958 @@ -7584,7 +7695,7 @@ 52959 * Search backwards. If we find something we recognize, line up 52960 * with that. 52961 * 52962 - * if we're looking at an open brace, indent 52963 + * If we're looking at an open brace, indent 52964 * the usual amount relative to the conditional 52965 * that opens the block. 52966 */ 52967 @@ -7613,14 +7724,14 @@ 46300 52968 { 46301 52969 if (curwin->w_cursor.lnum == 0 … … 46316 52984 break; 46317 52985 } 46318 @@ -7631,7 +7 598,7 @@52986 @@ -7631,7 +7742,7 @@ 46319 52987 * If we're in a comment now, skip to the start of the 46320 52988 * comment. … … 46325 52993 { 46326 52994 curwin->w_cursor.lnum = trypos->lnum + 1; 46327 @@ -7656,8 +7 623,7 @@52995 @@ -7656,8 +7767,7 @@ 46328 52996 * (it's a variable declaration). 46329 52997 */ … … 46335 53003 /* if the line is terminated with another ',' 46336 53004 * it is a continued variable initialization. 46337 @@ -7688,11 +7 654,11 @@53005 @@ -7688,11 +7798,11 @@ 46338 53006 */ /* XXX */ 46339 53007 trypos = NULL; … … 46350 53018 if (trypos != NULL) 46351 53019 { 46352 @@ -7727,8 +7 693,8 @@53020 @@ -7727,8 +7837,8 @@ 46353 53021 amount = scope_amount; 46354 53022 if (theline[0] == '{') … … 46361 53029 } 46362 53030 46363 @@ -7750,7 +7 716,7 @@53031 @@ -7750,7 +7860,7 @@ 46364 53032 46365 53033 /* If we're in a comment now, skip to the start of … … 46370 53038 { 46371 53039 curwin->w_cursor.lnum = trypos->lnum + 1; 46372 @@ -7765,7 +7 731,8 @@53040 @@ -7765,7 +7875,8 @@ 46373 53041 /* Finally the actual check for "namespace". */ 46374 53042 if (cin_is_cpp_namespace(l)) … … 46380 53048 } 46381 53049 46382 @@ -7779,7 +7 746,7 @@53050 @@ -7779,7 +7890,7 @@ 46383 53051 /* 46384 53052 * If we're in a comment now, skip to the start of the comment. … … 46389 53057 curwin->w_cursor.lnum = trypos->lnum + 1; 46390 53058 curwin->w_cursor.col = 0; 46391 @@ -7833,8 +7 800,8 @@53059 @@ -7833,8 +7944,8 @@ 46392 53060 * Check that this case label is not for another 46393 53061 * switch() … … 46400 53068 amount = get_indent(); /* XXX */ 46401 53069 break; 46402 @@ -7877,9 +7 844,10 @@53070 @@ -7877,9 +7988,10 @@ 46403 53071 if (l != NULL && cin_is_cinword(l)) 46404 53072 { … … 46413 53081 break; 46414 53082 } 46415 @@ -7893,8 + 7861,10 @@53083 @@ -7893,8 +8005,10 @@ 46416 53084 * -> y = 1; 46417 53085 */ … … 46426 53094 } 46427 53095 46428 @@ -7904,8 + 7874,8 @@53096 @@ -7904,8 +8018,8 @@ 46429 53097 */ 46430 53098 if (lookfor == LOOKFOR_CASE || lookfor == LOOKFOR_SCOPEDECL) … … 46437 53105 curwin->w_cursor.lnum = trypos->lnum + 1; 46438 53106 curwin->w_cursor.col = 0; 46439 @@ -7916,7 + 7886,7 @@53107 @@ -7916,7 +8030,7 @@ 46440 53108 /* 46441 53109 * Ignore jump labels with nothing after them. … … 46446 53114 l = after_label(ml_get_curline()); 46447 53115 if (l == NULL || cin_nocode(l)) 46448 @@ -7939,7 + 7909,7 @@53116 @@ -7939,7 +8053,7 @@ 46449 53117 * constructor initialization? 46450 53118 */ /* XXX */ … … 46455 53123 n = cin_is_cpp_baseclass(&col); 46456 53124 l = ml_get_curline(); 46457 @@ -7962,8 + 7932,7 @@53125 @@ -7962,8 +8076,7 @@ 46458 53126 } 46459 53127 else … … 46465 53133 } 46466 53134 else if (lookfor == LOOKFOR_CPP_BASECLASS) 46467 @@ -8005,9 +7974,7 @@ 53135 @@ -7990,6 +8103,41 @@ 53136 */ 53137 terminated = cin_isterminated(l, FALSE, TRUE); 53138 53139 + if (js_cur_has_key) 53140 + { 53141 + js_cur_has_key = 0; /* only check the first line */ 53142 + if (curbuf->b_ind_js && terminated == ',') 53143 + { 53144 + /* For Javascript we might be inside an object: 53145 + * key: something, <- align with this 53146 + * key: something 53147 + * or: 53148 + * key: something + <- align with this 53149 + * something, 53150 + * key: something 53151 + */ 53152 + lookfor = LOOKFOR_JS_KEY; 53153 + } 53154 + } 53155 + if (lookfor == LOOKFOR_JS_KEY && cin_has_js_key(l)) 53156 + { 53157 + amount = get_indent(); 53158 + break; 53159 + } 53160 + if (lookfor == LOOKFOR_NO_COMMA) 53161 + { 53162 + if (terminated != ',') 53163 + /* line below current line is the one that starts a 53164 + * (possibly broken) line ending in a comma. */ 53165 + break; 53166 + amount = get_indent(); 53167 + if (curwin->w_cursor.lnum - 1 == ourscope) 53168 + /* line above is start of the scope, thus current line 53169 + * is the one that stars a (possibly broken) line 53170 + * ending in a comma. */ 53171 + break; 53172 + } 53173 + 53174 if (terminated == 0 || (lookfor != LOOKFOR_UNTERM 53175 && terminated == ',')) 53176 { 53177 @@ -8001,13 +8149,16 @@ 53178 * bar ) 53179 */ 53180 /* 53181 - * position the cursor over the rightmost paren, so that 53182 + * Position the cursor over the rightmost paren, so that 46468 53183 * matching it will take us back to the start of the line. 53184 + * Ignore a match before the start of the block. 46469 53185 */ 46470 53186 (void)find_last_paren(l, '(', ')'); … … 46473 53189 - ind_maxcomment); 46474 53190 + trypos = find_match_paren(corr_ind_maxparen(&cur_curpos)); 53191 + if (trypos != NULL && (trypos->lnum < tryposBrace->lnum 53192 + || (trypos->lnum == tryposBrace->lnum 53193 + && trypos->col < tryposBrace->col))) 53194 + trypos = NULL; 46475 53195 46476 53196 /* 46477 53197 * If we are looking for ',', we also look for matching 46478 @@ -8015,7 + 7982,7 @@53198 @@ -8015,7 +8166,7 @@ 46479 53199 */ 46480 53200 if (trypos == NULL && terminated == ',' … … 46485 53205 if (trypos != NULL) 46486 53206 { 46487 @@ -8058, 9 +8025,8@@53207 @@ -8058,11 +8209,10 @@ 46488 53208 * Get indent and pointer to text for current line, 46489 53209 * ignoring any jump label. XXX … … 46492 53212 - cur_amount = skip_label(curwin->w_cursor.lnum, 46493 53213 - &l, ind_maxcomment); 46494 + if (!curbuf->b_ind_js) 53214 - else 53215 + if (curbuf->b_ind_js) 53216 cur_amount = get_indent(); 53217 + else 46495 53218 + cur_amount = skip_label(curwin->w_cursor.lnum, &l); 46496 else46497 cur_amount = get_indent();46498 53219 /* 46499 @@ -8075,16 +8041,16 @@ 53220 * If this is just above the line we are indenting, and it 53221 * starts with a '{', line it up with this line. 53222 @@ -8075,16 +8225,16 @@ 46500 53223 { 46501 53224 amount = cur_amount; … … 46513 53236 46514 53237 - if (ind_cpp_baseclass) 46515 + if (curbuf->b_ind_cpp_baseclass )53238 + if (curbuf->b_ind_cpp_baseclass && !curbuf->b_ind_js) 46516 53239 { 46517 53240 /* have to look back, whether it is a cpp base 46518 53241 * class declaration or initialization */ 46519 @@ -8132,10 +8 098,11 @@53242 @@ -8132,10 +8282,11 @@ 46520 53243 */ 46521 53244 amount = cur_amount; … … 46531 53254 } 46532 53255 46533 @@ -8169,10 +8 136,9 @@53256 @@ -8169,10 +8320,9 @@ 46534 53257 curwin->w_cursor.col = 46535 53258 (colnr_T)(l - ml_get_curline()) + 1; … … 46545 53268 } 46546 53269 } 46547 @@ -8209,7 +8 175,7 @@53270 @@ -8209,7 +8359,7 @@ 46548 53271 * enumerations/initializations. */ 46549 53272 if (terminated == ',') … … 46554 53277 46555 53278 lookfor = LOOKFOR_CPP_BASECLASS; 46556 @@ -8267,8 +8233,7 @@ 53279 @@ -8244,8 +8394,41 @@ 53280 */ 53281 if (lookfor == LOOKFOR_INITIAL && terminated == ',') 53282 { 53283 - lookfor = LOOKFOR_ENUM_OR_INIT; 53284 - cont_amount = cin_first_id_amount(); 53285 + if (curbuf->b_ind_js) 53286 + { 53287 + /* Search for a line ending in a comma 53288 + * and line up with the line below it 53289 + * (could be the current line). 53290 + * some = [ 53291 + * 1, <- line up here 53292 + * 2, 53293 + * some = [ 53294 + * 3 + <- line up here 53295 + * 4 * 53296 + * 5, 53297 + * 6, 53298 + */ 53299 + lookfor = LOOKFOR_NO_COMMA; 53300 + amount = get_indent(); /* XXX */ 53301 + trypos = find_match_char('[', 53302 + curbuf->b_ind_maxparen); 53303 + if (trypos != NULL) 53304 + { 53305 + if (trypos->lnum 53306 + == curwin->w_cursor.lnum - 1) 53307 + { 53308 + /* Current line is first inside 53309 + * [], line up with it. */ 53310 + break; 53311 + } 53312 + ourscope = trypos->lnum; 53313 + } 53314 + } 53315 + else 53316 + { 53317 + lookfor = LOOKFOR_ENUM_OR_INIT; 53318 + cont_amount = cin_first_id_amount(); 53319 + } 53320 } 53321 else 53322 { 53323 @@ -8255,7 +8438,8 @@ 53324 /* XXX */ 53325 cont_amount = cin_get_equal_amount( 53326 curwin->w_cursor.lnum); 53327 - if (lookfor != LOOKFOR_TERM) 53328 + if (lookfor != LOOKFOR_TERM 53329 + && lookfor != LOOKFOR_JS_KEY) 53330 lookfor = LOOKFOR_UNTERM; 53331 } 53332 } 53333 @@ -8266,9 +8450,7 @@ 53334 * Check if we are after a while (cond); 46557 53335 * If so: Ignore until the matching "do". 46558 53336 */ 46559 53337 - /* XXX */ 46560 53338 - else if (cin_iswhileofdo_end(terminated, ind_maxparen, 46561 53339 - ind_maxcomment)) 46562 + else if (cin_iswhileofdo_end(terminated)) 53340 + else if (cin_iswhileofdo_end(terminated)) /* XXX */ 46563 53341 { 46564 53342 /* 46565 53343 * Found an unterminated line after a while ();, line up 46566 @@ -8292,7 +8 257,7 @@53344 @@ -8292,7 +8474,7 @@ 46567 53345 lookfor = LOOKFOR_TERM; 46568 53346 amount = get_indent(); /* XXX */ … … 46573 53351 ++whilelevel; 46574 53352 } 46575 @@ -8385,8 +8 350,8 @@53353 @@ -8385,8 +8567,8 @@ 46576 53354 term_again: 46577 53355 l = ml_get_curline(); … … 46584 53362 /* 46585 53363 * Check if we are on a case label now. This is 46586 @@ -8413,21 +8 378,21 @@53364 @@ -8413,21 +8595,21 @@ 46587 53365 * stat; 46588 53366 * } … … 46612 53390 46613 53391 /* 46614 @@ -8443,10 +8 408,9 @@53392 @@ -8443,10 +8625,9 @@ 46615 53393 && cin_iselse(l) 46616 53394 && whilelevel == 0) … … 46626 53404 continue; 46627 53405 } 46628 @@ -8456,9 +8 420,8 @@53406 @@ -8456,9 +8637,8 @@ 46629 53407 * that block. 46630 53408 */ … … 46638 53416 curwin->w_cursor = *trypos; 46639 53417 /* if not "else {" check for terminated again */ 46640 @@ -8477, 11 +8440,11@@53418 @@ -8477,24 +8657,22 @@ 46641 53419 46642 53420 /* add extra indent for a comment */ … … 46651 53429 + amount -= curbuf->b_ind_jump_label; 46652 53430 } 46653 46654 /* 46655 @@ -8502,7 +8465,7 @@ 53431 - 53432 - /* 53433 - * ok -- we're not inside any sort of structure at all! 53434 - * 53435 - * this means we're at the top level, and everything should 53436 - * basically just match where the previous line is, except 53437 - * for the lines immediately following a function declaration, 53438 - * which are K&R-style parameters and need to be indented. 53439 - */ 53440 else 53441 { 53442 /* 53443 + * ok -- we're not inside any sort of structure at all! 53444 + * 53445 + * This means we're at the top level, and everything should 53446 + * basically just match where the previous line is, except 53447 + * for the lines immediately following a function declaration, 53448 + * which are K&R-style parameters and need to be indented. 53449 + * 53450 * if our line starts with an open brace, forget about any 53451 * prevailing indent and make sure it looks like the start 53452 * of a function 53453 @@ -8502,7 +8680,7 @@ 46656 53454 46657 53455 if (theline[0] == '{') … … 46662 53460 46663 53461 /* 46664 @@ -8519,11 +8 482,10 @@53462 @@ -8519,11 +8697,10 @@ 46665 53463 && !cin_ends_in(theline, (char_u *)":", NULL) 46666 53464 && !cin_ends_in(theline, (char_u *)",", NULL) … … 46676 53474 else 46677 53475 { 46678 @@ -8542,7 +8 504,7 @@53476 @@ -8542,7 +8719,7 @@ 46679 53477 /* 46680 53478 * If we're in a comment now, skip to the start of the comment. … … 46685 53483 curwin->w_cursor.lnum = trypos->lnum + 1; 46686 53484 curwin->w_cursor.col = 0; 46687 @@ -8554,7 +8 516,7 @@53485 @@ -8554,7 +8731,7 @@ 46688 53486 * constructor initialization? 46689 53487 */ /* XXX */ … … 46694 53492 n = cin_is_cpp_baseclass(&col); 46695 53493 l = ml_get_curline(); 46696 @@ -8562,8 +8 524,7 @@53494 @@ -8562,8 +8739,7 @@ 46697 53495 if (n) 46698 53496 { … … 46704 53502 } 46705 53503 46706 @@ -8594,8 +8 555,8 @@53504 @@ -8594,8 +8770,8 @@ 46707 53505 { 46708 53506 /* take us back to opening paren */ … … 46715 53513 46716 53514 /* For a line ending in ',' that is a continuation line go 46717 @@ -8626,8 +8 587,7 @@53515 @@ -8626,8 +8802,7 @@ 46718 53516 * If the line looks like a function declaration, and we're 46719 53517 * not in a comment, put it the left margin. … … 46725 53523 l = ml_get_curline(); 46726 53524 46727 @@ -8675,10 +8635,9 @@ 53525 @@ -8648,6 +8823,18 @@ 53526 break; 53527 53528 /* 53529 + * If the previous line ends on '[' we are probably in an 53530 + * array constant: 53531 + * something = [ 53532 + * 234, <- extra indent 53533 + */ 53534 + if (cin_ends_in(l, (char_u *)"[", NULL)) 53535 + { 53536 + amount = get_indent() + ind_continuation; 53537 + break; 53538 + } 53539 + 53540 + /* 53541 * Find a line only has a semicolon that belongs to a previous 53542 * line ending in '}', e.g. before an #endif. Don't increase 53543 * indent then. 53544 @@ -8675,10 +8862,9 @@ 46728 53545 * line (and the ones that follow) needs to be indented as 46729 53546 * parameters. … … 46738 53555 } 46739 53556 46740 @@ -8707,8 +8 666,7 @@53557 @@ -8707,8 +8893,7 @@ 46741 53558 */ 46742 53559 find_last_paren(l, '(', ')'); … … 46748 53565 amount = get_indent(); /* XXX */ 46749 53566 break; 46750 @@ -8716,7 +8 674,7 @@53567 @@ -8716,7 +8901,7 @@ 46751 53568 46752 53569 /* add extra indent for a comment */ … … 46757 53574 /* add extra indent if the previous line ended in a backslash: 46758 53575 * "asdfasdf\ 46759 @@ -8751,11 +8 709,9 @@53576 @@ -8751,11 +8936,9 @@ 46760 53577 } 46761 53578 … … 46770 53587 char_u *look; 46771 53588 pos_T *theirscope; 46772 @@ -8785,13 +8 741,13 @@53589 @@ -8785,13 +8968,13 @@ 46773 53590 if (cin_iselse(look) 46774 53591 || cin_isif(look) … … 46786 53603 break; 46787 53604 46788 @@ -8829,7 + 8785,7 @@53605 @@ -8829,7 +9012,7 @@ 46789 53606 * if it was a "while" then we need to go back to 46790 53607 * another "do", so increment whilelevel. XXX … … 46795 53612 ++whilelevel; 46796 53613 continue; 46797 @@ -8926,7 + 8882,7 @@53614 @@ -8926,7 +9109,7 @@ 46798 53615 { 46799 53616 char_u buf[LSIZE]; … … 46804 53621 while (*word != NUL) 46805 53622 { 46806 @@ -9174,6 +9130,8 @@ 53623 @@ -9046,10 +9229,12 @@ 53624 amount = 2; 53625 else 53626 { 53627 + char_u *line = that; 53628 + 53629 amount = 0; 53630 while (*that && col) 53631 { 53632 - amount += lbr_chartabsize_adv(&that, (colnr_T)amount); 53633 + amount += lbr_chartabsize_adv(line, &that, (colnr_T)amount); 53634 col--; 53635 } 53636 53637 @@ -9072,7 +9257,7 @@ 53638 53639 while (vim_iswhite(*that)) 53640 { 53641 - amount += lbr_chartabsize(that, (colnr_T)amount); 53642 + amount += lbr_chartabsize(line, that, (colnr_T)amount); 53643 ++that; 53644 } 53645 53646 @@ -9110,15 +9295,16 @@ 53647 && !quotecount) 53648 --parencount; 53649 if (*that == '\\' && *(that+1) != NUL) 53650 - amount += lbr_chartabsize_adv(&that, 53651 - (colnr_T)amount); 53652 - amount += lbr_chartabsize_adv(&that, 53653 - (colnr_T)amount); 53654 + amount += lbr_chartabsize_adv( 53655 + line, &that, (colnr_T)amount); 53656 + amount += lbr_chartabsize_adv( 53657 + line, &that, (colnr_T)amount); 53658 } 53659 } 53660 while (vim_iswhite(*that)) 53661 { 53662 - amount += lbr_chartabsize(that, (colnr_T)amount); 53663 + amount += lbr_chartabsize( 53664 + line, that, (colnr_T)amount); 53665 that++; 53666 } 53667 if (!*that || *that == ';') 53668 @@ -9174,6 +9360,8 @@ 46807 53669 /* 46808 53670 * Preserve files and exit. … … 46813 53675 void 46814 53676 preserve_exit() 46815 @@ -9196,7 +9 154,7 @@53677 @@ -9196,7 +9384,7 @@ 46816 53678 { 46817 53679 if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) … … 46822 53684 out_flush(); 46823 53685 ml_sync_all(FALSE, FALSE); /* preserve all swap files */ 46824 @@ -9206,7 +9 164,7 @@53686 @@ -9206,7 +9394,7 @@ 46825 53687 46826 53688 ml_close_all(FALSE); /* close all memfiles, without deleting */ … … 46831 53693 getout(1); 46832 53694 } 46833 @@ -10381,9 +10 339,6 @@53695 @@ -10381,9 +10569,6 @@ 46834 53696 { 46835 53697 char_u *curdir; … … 46841 53703 46842 53704 if ((curdir = alloc((unsigned)MAXPATHL)) == NULL) 46843 @@ -10396,37 +10 351,13 @@53705 @@ -10396,37 +10581,13 @@ 46844 53706 if (path_ga.ga_len == 0) 46845 53707 return 0; … … 46881 53743 return gap->ga_len; 46882 53744 } 46883 @@ -10710,7 +10 641,7 @@53745 @@ -10710,7 +10871,7 @@ 46884 53746 else 46885 53747 #endif … … 46890 53752 if (buffer == NULL) 46891 53753 return 0; 46892 @@ -10773,7 +10 704,7 @@53754 @@ -10773,7 +10934,7 @@ 46893 53755 return; 46894 53756 … … 46899 53761 46900 53762 /* Make room for another item in the file list. */ 46901 @@ -10810,13 +10 741,16 @@53763 @@ -10810,13 +10971,16 @@ 46902 53764 46903 53765 /* … … 46917 53779 char_u *tempname; 46918 53780 char_u *command; 46919 @@ -10886,7 +1 0820,7 @@53781 @@ -10886,7 +11050,7 @@ 46920 53782 vim_free(buffer); 46921 53783 buffer = NULL; … … 46926 53788 /* Change NUL into SOH, otherwise the string is truncated. */ 46927 53789 for (i = 0; i < len; ++i) 46928 @@ -10895,6 +1 0829,8 @@53790 @@ -10895,6 +11059,8 @@ 46929 53791 46930 53792 buffer[len] = NUL; /* make sure the buffer is terminated */ … … 46935 53797 done: 46936 53798 vim_free(tempname); 46937 @@ -10936,3 +1 0872,41 @@53799 @@ -10936,3 +11102,41 @@ 46938 53800 { 46939 53801 return (p_im && stuff_empty() && typebuf_typed()); … … 46979 53841 diff -Naur vim74.orig/src/misc2.c vim74/src/misc2.c 46980 53842 --- vim74.orig/src/misc2.c 2013-07-07 14:03:35.000000000 +0000 46981 +++ vim74/src/misc2.c 2014-0 6-01 00:43:15.634143166+000053843 +++ vim74/src/misc2.c 2014-07-21 23:33:41.296796265 +0000 46982 53844 @@ -31,9 +31,7 @@ 46983 53845 if (virtual_op != MAYBE) … … 47000 53862 || ((ve_flags & VE_ONEMORE) && wcol < MAXCOL) 47001 53863 #endif 53864 @@ -205,10 +201,10 @@ 53865 { 53866 /* Count a tab for what it's worth (if list mode not on) */ 53867 #ifdef FEAT_LINEBREAK 53868 - csize = win_lbr_chartabsize(curwin, ptr, col, &head); 53869 + csize = win_lbr_chartabsize(curwin, line, ptr, col, &head); 53870 mb_ptr_adv(ptr); 53871 #else 53872 - csize = lbr_chartabsize_adv(&ptr, col); 53873 + csize = lbr_chartabsize_adv(line, &ptr, col); 53874 #endif 53875 col += csize; 53876 } 47002 53877 @@ -487,7 +483,7 @@ 47003 53878 { … … 47118 53993 } 47119 53994 return s; 47120 @@ -3286,17 +3290,14 @@ 53995 @@ -2152,7 +2156,8 @@ 53996 } 53997 } 53998 53999 -#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) 54000 +#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) \ 54001 + || defined(PROTO) 54002 /* 54003 * Append the text in "gap" below the cursor line and clear "gap". 54004 */ 54005 @@ -3286,17 +3291,14 @@ 47121 54006 { 47122 54007 if (State & NORMAL) … … 47138 54023 return State; 47139 54024 } 47140 @@ -3734,7 +373 5,6 @@54025 @@ -3734,7 +3736,6 @@ 47141 54026 } 47142 54027 if (finish_op) … … 47146 54031 { 47147 54032 if (*p_sel == 'e') 47148 @@ -3742,7 +374 2,6 @@54033 @@ -3742,7 +3743,6 @@ 47149 54034 else 47150 54035 return SHAPE_IDX_V; … … 47154 54039 } 47155 54040 #endif 47156 @@ -4695,8 +469 4,8 @@54041 @@ -4695,8 +4695,8 @@ 47157 54042 else 47158 54043 { … … 47165 54050 47166 54051 if (p > search_ctx->ffsc_fix_path) 47167 @@ -6496,13 +649 5,15 @@54052 @@ -6496,13 +6496,15 @@ 47168 54053 get4c(fd) 47169 54054 FILE *fd; … … 47190 54075 diff -Naur vim74.orig/src/move.c vim74/src/move.c 47191 54076 --- vim74.orig/src/move.c 2012-11-28 17:15:42.000000000 +0000 47192 +++ vim74/src/move.c 2014-0 6-01 00:43:15.670809739+000054077 +++ vim74/src/move.c 2014-07-21 23:33:41.333462836 +0000 47193 54078 @@ -20,6 +20,7 @@ 47194 54079 #include "vim.h" … … 47333 54218 diff -Naur vim74.orig/src/netbeans.c vim74/src/netbeans.c 47334 54219 --- vim74.orig/src/netbeans.c 2012-06-20 17:56:18.000000000 +0000 47335 +++ vim74/src/netbeans.c 2014-0 6-01 00:43:15.750809536+000054220 +++ vim74/src/netbeans.c 2014-07-21 23:33:41.400129329 +0000 47336 54221 @@ -2232,11 +2232,9 @@ 47337 54222 … … 47348 54233 diff -Naur vim74.orig/src/normal.c vim74/src/normal.c 47349 54234 --- vim74.orig/src/normal.c 2013-07-14 11:24:37.000000000 +0000 47350 +++ vim74/src/normal.c 2014-0 6-01 00:43:15.757476185+000054235 +++ vim74/src/normal.c 2014-07-21 23:33:41.430129250 +0000 47351 54236 @@ -14,17 +14,15 @@ 47352 54237 … … 48995 55880 diff -Naur vim74.orig/src/ops.c vim74/src/ops.c 48996 55881 --- vim74.orig/src/ops.c 2013-08-09 17:34:32.000000000 +0000 48997 +++ vim74/src/ops.c 2014-0 6-01 00:43:15.767476160+000055882 +++ vim74/src/ops.c 2014-07-21 23:33:41.460129172 +0000 48998 55883 @@ -57,9 +57,7 @@ 48999 55884 char_u **y_array; /* pointer to array of line pointers */ … … 49097 55982 struct block_def bd; 49098 55983 int incr; 49099 @@ -733,14 +718,10 @@ 55984 @@ -435,7 +420,9 @@ 55985 } 55986 for ( ; vim_iswhite(*bd.textstart); ) 55987 { 55988 - incr = lbr_chartabsize_adv(&bd.textstart, (colnr_T)(bd.start_vcol)); 55989 + /* TODO: is passing bd.textstart for start of the line OK? */ 55990 + incr = lbr_chartabsize_adv(bd.textstart, &bd.textstart, 55991 + (colnr_T)(bd.start_vcol)); 55992 total += incr; 55993 bd.start_vcol += incr; 55994 } 55995 @@ -495,7 +482,7 @@ 55996 55997 while (vim_iswhite(*non_white)) 55998 { 55999 - incr = lbr_chartabsize_adv(&non_white, non_white_col); 56000 + incr = lbr_chartabsize_adv(bd.textstart, &non_white, non_white_col); 56001 non_white_col += incr; 56002 } 56003 56004 @@ -520,7 +507,11 @@ 56005 verbatim_copy_width -= bd.start_char_vcols; 56006 while (verbatim_copy_width < destination_col) 56007 { 56008 - incr = lbr_chartabsize(verbatim_copy_end, verbatim_copy_width); 56009 + char_u *line = verbatim_copy_end; 56010 + 56011 + /* TODO: is passing verbatim_copy_end for start of the line OK? */ 56012 + incr = lbr_chartabsize(line, verbatim_copy_end, 56013 + verbatim_copy_width); 56014 if (verbatim_copy_width + incr > destination_col) 56015 break; 56016 verbatim_copy_width += incr; 56017 @@ -733,14 +724,10 @@ 49100 56018 * there is no change still need to remove the Visual highlighting. */ 49101 56019 if (last_changed != 0) … … 49112 56030 if (oap->line_count > p_report) 49113 56031 { 49114 @@ -948,7 +9 29,6 @@56032 @@ -948,7 +935,6 @@ 49115 56033 } 49116 56034 #endif … … 49120 56038 * Obtain the contents of a "normal" register. The register is made empty. 49121 56039 * The returned pointer has allocated memory, use put_register() later. 49122 @@ -1016,10 + 996,10 @@56040 @@ -1016,10 +1002,10 @@ 49123 56041 *y_current = *(struct yankreg *)reg; 49124 56042 vim_free(reg); … … 49133 56051 49134 56052 void 49135 @@ -1034,7 +10 14,6 @@56053 @@ -1034,7 +1020,6 @@ 49136 56054 vim_free(reg); 49137 56055 *y_current = tmp; … … 49141 56059 #if defined(FEAT_MOUSE) || defined(PROTO) 49142 56060 /* 49143 @@ -1634,10 +161 3,8 @@56061 @@ -1634,10 +1619,8 @@ 49144 56062 int n; 49145 56063 linenr_T lnum; … … 49152 56070 int did_yank = FALSE; 49153 56071 int orig_regname = oap->regname; 49154 @@ -1670,10 +16 47,8 @@56072 @@ -1670,10 +1653,8 @@ 49155 56073 * delete linewise. Don't do this for the change command or Visual mode. 49156 56074 */ … … 49163 56081 && oap->motion_force == NUL 49164 56082 && oap->op_type == OP_DELETE) 49165 @@ -1787,7 +176 2,6 @@56083 @@ -1787,7 +1768,6 @@ 49166 56084 } 49167 56085 } … … 49171 56089 * block mode delete 49172 56090 */ 49173 @@ -1838,9 +181 2,7 @@56091 @@ -1838,9 +1818,7 @@ 49174 56092 oap->end.lnum + 1, 0L); 49175 56093 oap->line_count = 0; /* no lines deleted */ … … 49182 56100 if (oap->op_type == OP_CHANGE) 49183 56101 { 49184 @@ -1924,13 +1 896,10 @@56102 @@ -1924,13 +1902,10 @@ 49185 56103 return FAIL; 49186 56104 … … 49198 56116 49199 56117 n = oap->end.col - oap->start.col + 1 - !oap->inclusive; 49200 @@ -1967,11 +19 36,8 @@56118 @@ -1967,11 +1942,8 @@ 49201 56119 } 49202 56120 else … … 49212 56130 } 49213 56131 else /* delete characters between lines */ 49214 @@ -2008,15 +19 74,12 @@56132 @@ -2008,15 +1980,12 @@ 49215 56133 { 49216 56134 /* delete from start of line until op_end */ … … 49231 56149 } 49232 56150 49233 @@ -2025,14 +19 88,12 @@56151 @@ -2025,14 +1994,12 @@ 49234 56152 #ifdef FEAT_VIRTUALEDIT 49235 56153 setmarks: … … 49246 56164 curbuf->b_op_start = oap->start; 49247 56165 49248 @@ -2074,10 +20 35,15 @@56166 @@ -2074,10 +2041,15 @@ 49249 56167 char_u *newp, *oldp; 49250 56168 size_t oldlen; … … 49262 56180 if (has_mbyte) 49263 56181 mb_adjust_opend(oap); 49264 @@ -2164,25 +213 0,44 @@56182 @@ -2164,25 +2136,44 @@ 49265 56183 /* insert pre-spaces */ 49266 56184 copy_spaces(newp + bd.textcol, (size_t)bd.startspaces); … … 49319 56237 } 49320 56238 else 49321 @@ -2294,9 +22 79,7 @@56239 @@ -2294,9 +2285,7 @@ 49322 56240 oparg_T *oap; 49323 56241 { … … 49329 56247 49330 56248 if (u_save((linenr_T)(oap->start.lnum - 1), 49331 @@ -2304,7 +22 87,6 @@56249 @@ -2304,7 +2293,6 @@ 49332 56250 return; 49333 56251 … … 49337 56255 { 49338 56256 for (; pos.lnum <= oap->end.lnum; ++pos.lnum) 49339 @@ -2316,7 +2 298,7 @@56257 @@ -2316,7 +2304,7 @@ 49340 56258 one_change = swapchars(oap->op_type, &pos, bd.textlen); 49341 56259 did_change |= one_change; … … 49346 56264 { 49347 56265 char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE); 49348 @@ -2326,13 +23 08,12 @@56266 @@ -2326,13 +2314,12 @@ 49349 56267 netbeans_inserted(curbuf, pos.lnum, bd.textcol, 49350 56268 &ptr[bd.textcol], bd.textlen); … … 49361 56279 if (oap->motion_type == MLINE) 49362 56280 { 49363 @@ -2388,11 +23 69,9 @@56281 @@ -2388,11 +2375,9 @@ 49364 56282 } 49365 56283 } … … 49373 56291 /* 49374 56292 * Set '[ and '] marks. 49375 @@ -2617,6 +2 596,47 @@56293 @@ -2617,6 +2602,47 @@ 49376 56294 { 49377 56295 struct block_def bd2; … … 49421 56339 * Spaces and tabs in the indent may have changed to other spaces and 49422 56340 * tabs. Get the starting column again and correct the length. 49423 @@ -2953,10 +297 3,8 @@56341 @@ -2953,10 +2979,8 @@ 49424 56342 if ( oap->motion_type == MCHAR 49425 56343 && oap->start.col == 0 … … 49432 56350 && yanklines > 1) 49433 56351 { 49434 @@ -2967,9 +29 85,7 @@56352 @@ -2967,9 +2991,7 @@ 49435 56353 49436 56354 y_current->y_size = yanklines; … … 49442 56360 yanklines), TRUE); 49443 56361 49444 @@ -2982,7 + 2998,6 @@56362 @@ -2982,7 +3004,6 @@ 49445 56363 y_idx = 0; 49446 56364 lnum = oap->start.lnum; … … 49450 56368 { 49451 56369 /* Visual block mode */ 49452 @@ -2992,19 +30 07,16 @@56370 @@ -2992,19 +3013,16 @@ 49453 56371 if (curwin->w_curswant == MAXCOL && y_current->y_width > 0) 49454 56372 y_current->y_width--; … … 49470 56388 case MLINE: 49471 56389 if ((y_current->y_array[y_idx] = 49472 @@ -3141,9 +3153,7 @@ 56390 @@ -3138,12 +3156,12 @@ 56391 vim_free(y_current->y_array); 56392 y_current = curr; 56393 } 56394 + if (curwin->w_p_rnu) 56395 + redraw_later(SOME_VALID); /* cursor moved to start */ 49473 56396 if (mess) /* Display message about yank? */ 49474 56397 { … … 49480 56403 yanklines = 0; 49481 56404 /* Some versions of Vi use ">=" here, some don't... */ 49482 @@ -3153,17 +31 63,13 @@56405 @@ -3153,17 +3171,13 @@ 49483 56406 update_topline_redraw(); 49484 56407 if (yanklines == 1) … … 49498 56421 smsg((char_u *)_("%ld lines yanked"), yanklines); 49499 56422 } 49500 @@ -3174,11 +318 0,7 @@56423 @@ -3174,11 +3188,7 @@ 49501 56424 */ 49502 56425 curbuf->b_op_start = oap->start; … … 49511 56434 curbuf->b_op_start.col = 0; 49512 56435 curbuf->b_op_end.col = MAXCOL; 49513 @@ -3315,7 +33 17,6 @@56436 @@ -3315,7 +3325,6 @@ 49514 56437 long i; /* index in y_array[] */ 49515 56438 int y_type; … … 49519 56442 long y_width = 0; 49520 56443 colnr_T vcol; 49521 @@ -3323,7 +33 24,6 @@56444 @@ -3323,7 +3332,6 @@ 49522 56445 int incr = 0; 49523 56446 long j; … … 49527 56450 long nr_lines = 0; 49528 56451 pos_T new_cursor; 49529 @@ -3432,14 +34 32,11 @@56452 @@ -3432,14 +3440,11 @@ 49530 56453 get_yank_register(regname, FALSE); 49531 56454 … … 49542 56465 { 49543 56466 if (flags & PUT_LINE_SPLIT) 49544 @@ -3470,7 +34 67,6 @@56467 @@ -3470,7 +3475,6 @@ 49545 56468 curbuf->b_op_start = curwin->w_cursor; /* default for '[ mark */ 49546 56469 curbuf->b_op_end = curwin->w_cursor; /* default for '] mark */ … … 49550 56473 if (flags & PUT_LINE) /* :put command or "p" in Visual line mode. */ 49551 56474 y_type = MLINE; 49552 @@ -3482,7 +34 78,6 @@56475 @@ -3482,7 +3486,6 @@ 49553 56476 goto end; 49554 56477 } … … 49558 56481 { 49559 56482 lnum = curwin->w_cursor.lnum + y_size + 1; 49560 @@ -3491,9 +34 86,7 @@56483 @@ -3491,9 +3494,7 @@ 49561 56484 if (u_save(curwin->w_cursor.lnum - 1, lnum) == FAIL) 49562 56485 goto end; … … 49569 56492 lnum = curwin->w_cursor.lnum; 49570 56493 #ifdef FEAT_FOLDING 49571 @@ -3545,7 +35 38,6 @@56494 @@ -3545,7 +3546,6 @@ 49572 56495 lnum = curwin->w_cursor.lnum; 49573 56496 col = curwin->w_cursor.col; … … 49577 56500 * Block mode 49578 56501 */ 49579 @@ -3727,7 +3719,6 @@ 56502 @@ -3623,7 +3623,7 @@ 56503 for (ptr = oldp; vcol < col && *ptr; ) 56504 { 56505 /* Count a tab for what it's worth (if list mode not on) */ 56506 - incr = lbr_chartabsize_adv(&ptr, (colnr_T)vcol); 56507 + incr = lbr_chartabsize_adv(oldp, &ptr, (colnr_T)vcol); 56508 vcol += incr; 56509 } 56510 bd.textcol = (colnr_T)(ptr - oldp); 56511 @@ -3657,7 +3657,7 @@ 56512 /* calculate number of spaces required to fill right side of block*/ 56513 spaces = y_width + 1; 56514 for (j = 0; j < yanklen; j++) 56515 - spaces -= lbr_chartabsize(&y_array[i][j], 0); 56516 + spaces -= lbr_chartabsize(NULL, &y_array[i][j], 0); 56517 if (spaces < 0) 56518 spaces = 0; 56519 56520 @@ -3727,7 +3727,6 @@ 49580 56521 curwin->w_cursor.lnum = lnum; 49581 56522 } … … 49585 56526 /* 49586 56527 * Character or Line mode 49587 @@ -3776,25 +37 67,35 @@56528 @@ -3776,25 +3775,35 @@ 49588 56529 */ 49589 56530 if (y_type == MCHAR && y_size == 1) … … 49638 56579 /* For "CTRL-O p" in Insert mode, put cursor after last char */ 49639 56580 if (totlen && (restart_edit != 0 || (flags & PUT_CURSEND))) 49640 @@ -3955,6 +39 56,8 @@56581 @@ -3955,6 +3964,8 @@ 49641 56582 if (regname == '=') 49642 56583 vim_free(y_array); … … 49647 56588 adjust_cursor_eol(); 49648 56589 } 49649 @@ -4005,7 +40 08,8 @@56590 @@ -4005,7 +4016,8 @@ 49650 56591 # endif 49651 56592 # endif … … 49657 56598 ; 49658 56599 } 49659 @@ -4319,17 +43 23,20 @@56600 @@ -4319,17 +4331,20 @@ 49660 56601 /* 49661 56602 * Join 'count' lines (minimal 2) at cursor position. … … 49681 56622 char_u *curr = NULL; 49682 56623 char_u *curr_start = NULL; 49683 @@ -4380,6 +43 87,12 @@56624 @@ -4380,6 +4395,12 @@ 49684 56625 for (t = 0; t < count; ++t) 49685 56626 { … … 49694 56635 if (remove_comments) 49695 56636 { 49696 @@ -4496,6 +45 09,13 @@56637 @@ -4496,6 +4517,13 @@ 49697 56638 } 49698 56639 ml_replace(curwin->w_cursor.lnum, newp, FALSE); … … 49708 56649 * the deleted line. */ 49709 56650 changed_lines(curwin->w_cursor.lnum, currsize, 49710 @@ -4631,11 +465 1,9 @@56651 @@ -4631,11 +4659,9 @@ 49711 56652 return; 49712 56653 curwin->w_cursor = oap->start; … … 49720 56661 /* Set '[ mark at the start of the formatted area */ 49721 56662 curbuf->b_op_start = oap->start; 49722 @@ -4667,7 +46 85,6 @@56663 @@ -4667,7 +4693,6 @@ 49723 56664 saved_cursor.lnum = 0; 49724 56665 } … … 49728 56669 { 49729 56670 win_T *wp; 49730 @@ -4685,7 +47 02,6 @@56671 @@ -4685,7 +4710,6 @@ 49731 56672 } 49732 56673 } … … 49736 56677 49737 56678 #if defined(FEAT_EVAL) || defined(PROTO) 49738 @@ -4696,11 +47 12,9 @@56679 @@ -4696,11 +4720,9 @@ 49739 56680 op_formatexpr(oap) 49740 56681 oparg_T *oap; … … 49748 56689 if (fex_format(oap->start.lnum, oap->line_count, NUL) != 0) 49749 56690 /* As documented: when 'formatexpr' returns non-zero fall back to 49750 @@ -4971,7 +49 85,7 @@56691 @@ -4971,7 +4993,7 @@ 49751 56692 49752 56693 /* … … 49757 56698 if (!is_end_par) 49758 56699 { 49759 @@ -4981,13 + 4995,27 @@56700 @@ -4981,13 +5003,27 @@ 49760 56701 if (line_count < 0 && u_save_cursor() == FAIL) 49761 56702 break; … … 49787 56728 beep_flush(); 49788 56729 break; 49789 @@ -5126,7 +51 54,6 @@56730 @@ -5126,7 +5162,6 @@ 49790 56731 return FALSE; 49791 56732 } … … 49795 56736 * prepare a few things for block mode yank/delete/tilde 49796 56737 * 49797 @@ -5285,7 +5312,6 @@ 56738 @@ -5174,7 +5209,7 @@ 56739 while (bdp->start_vcol < oap->start_vcol && *pstart) 56740 { 56741 /* Count a tab for what it's worth (if list mode not on) */ 56742 - incr = lbr_chartabsize(pstart, (colnr_T)bdp->start_vcol); 56743 + incr = lbr_chartabsize(line, pstart, (colnr_T)bdp->start_vcol); 56744 bdp->start_vcol += incr; 56745 #ifdef FEAT_VISUALEXTRA 56746 if (vim_iswhite(*pstart)) 56747 @@ -5243,7 +5278,10 @@ 56748 { 56749 /* Count a tab for what it's worth (if list mode not on) */ 56750 prev_pend = pend; 56751 - incr = lbr_chartabsize_adv(&pend, (colnr_T)bdp->end_vcol); 56752 + /* TODO: is passing prev_pend for start of the line OK? 56753 + * perhaps it should be "line". */ 56754 + incr = lbr_chartabsize_adv(prev_pend, &pend, 56755 + (colnr_T)bdp->end_vcol); 56756 bdp->end_vcol += incr; 56757 } 56758 if (bdp->end_vcol <= oap->end_vcol 56759 @@ -5285,7 +5323,6 @@ 49798 56760 bdp->textcol = (colnr_T) (pstart - line); 49799 56761 bdp->textstart = pstart; … … 49803 56765 #ifdef FEAT_RIGHTLEFT 49804 56766 static void reverse_line __ARGS((char_u *s)); 49805 @@ -5636,19 +56 62,13 @@56767 @@ -5636,19 +5673,13 @@ 49806 56768 str = skipwhite(skiptowhite(str)); 49807 56769 if (STRNCMP(str, "CHAR", 4) == 0) … … 49823 56785 49824 56786 while (!(eof = viminfo_readline(virp)) 49825 @@ -5756,11 +57 76,9 @@56787 @@ -5756,11 +5787,9 @@ 49826 56788 case MCHAR: 49827 56789 type = (char_u *)"CHAR"; … … 49835 56797 sprintf((char *)IObuff, _("E574: Unknown register type %d"), 49836 56798 y_regs[i].y_type); 49837 @@ -5774,13 +5 792,7 @@56799 @@ -5774,13 +5803,7 @@ 49838 56800 fprintf(fp, "\"%c", c); 49839 56801 if (c == execreg_lastc) … … 49850 56812 /* If max_num_lines < 0, then we save ALL the lines in the register */ 49851 56813 if (max_num_lines > 0 && num_lines > max_num_lines) 49852 @@ -5927,10 +59 39,8 @@56814 @@ -5927,10 +5950,8 @@ 49853 56815 { 49854 56816 struct yankreg *old_y_previous, *old_y_current; … … 49861 56823 int old_set_curswant; 49862 56824 pos_T old_op_start, old_op_end; 49863 @@ -5951,10 +59 61,8 @@56825 @@ -5951,10 +5972,8 @@ 49864 56826 old_set_curswant = curwin->w_set_curswant; 49865 56827 old_op_start = curbuf->b_op_start; … … 49872 56834 oa.regname = (cbd == &clip_plus ? '+' : '*'); 49873 56835 oa.op_type = OP_YANK; 49874 @@ -5972,10 +59 80,8 @@56836 @@ -5972,10 +5991,8 @@ 49875 56837 curwin->w_set_curswant = old_set_curswant; 49876 56838 curbuf->b_op_start = old_op_start; … … 49883 56845 else 49884 56846 { 49885 @@ -6005,7 +60 11,7 @@56847 @@ -6005,7 +6022,7 @@ 49886 56848 49887 56849 clip_free_selection(cbd); … … 49892 56854 49893 56855 /* 49894 @@ -6078,7 +60 84,6 @@56856 @@ -6078,7 +6095,6 @@ 49895 56857 } 49896 56858 … … 49900 56862 * If we have written to a clipboard register, send the text to the clipboard. 49901 56863 */ 49902 @@ -6096,7 +61 01,6 @@56864 @@ -6096,7 +6112,6 @@ 49903 56865 clip_gen_set_selection(&clip_plus); 49904 56866 } … … 49908 56870 #endif /* FEAT_CLIPBOARD || PROTO */ 49909 56871 49910 @@ -6115,7 +61 19,7 @@56872 @@ -6115,7 +6130,7 @@ 49911 56873 curr = y_current; 49912 56874 y_current = &y_regs[TILDE_REGISTER]; … … 49917 56879 } 49918 56880 #endif 49919 @@ -6154,30 +61 58,63 @@56881 @@ -6154,30 +6169,63 @@ 49920 56882 regname = may_get_selection(regname); 49921 56883 #endif … … 49987 56949 long i; 49988 56950 char_u *retval; 49989 @@ -6187,13 +62 24,11 @@56951 @@ -6187,13 +6235,11 @@ 49990 56952 /* Don't allow using an expression register inside an expression */ 49991 56953 if (regname == '=') … … 50006 56968 50007 56969 if (regname == '@') /* "@@" is used for unnamed register */ 50008 @@ -6211,15 +62 46,33 @@56970 @@ -6211,15 +6257,33 @@ 50009 56971 { 50010 56972 if (retval == NULL) … … 50043 57005 * Compute length of resulting string. 50044 57006 */ 50045 @@ -6261,6 +63 14,47 @@57007 @@ -6261,6 +6325,47 @@ 50046 57008 return retval; 50047 57009 } … … 50091 57053 * Store string "str" in register "name". 50092 57054 * "maxlen" is the maximum number of bytes to use, -1 for all bytes. 50093 @@ -6281,6 +63 75,51 @@57055 @@ -6281,6 +6386,51 @@ 50094 57056 } 50095 57057 … … 50143 57105 int name; 50144 57106 char_u *str; 50145 @@ -6317,45 +64 56,22 @@57107 @@ -6317,45 +6467,22 @@ 50146 57108 s = concat_str(get_expr_line_src(), p); 50147 57109 vim_free(p); … … 50194 57156 #endif /* FEAT_EVAL */ 50195 57157 50196 @@ -6365,12 +64 81,13 @@57158 @@ -6365,12 +6492,13 @@ 50197 57159 * is appended. 50198 57160 */ … … 50209 57171 int type; /* MCHAR, MLINE or MBLOCK */ 50210 57172 int lnum; 50211 @@ -6381,16 +6 498,16 @@57173 @@ -6381,16 +6509,16 @@ 50212 57174 int extraline = 0; /* extra line at the end */ 50213 57175 int append = FALSE; /* append to last line in register */ … … 50229 57191 else 50230 57192 type = yank_type; 50231 @@ -6399,18 +65 16,26 @@57193 @@ -6399,18 +6527,26 @@ 50232 57194 * Count the number of lines within the string 50233 57195 */ … … 50265 57227 50266 57228 /* 50267 @@ -6425,58 +65 50,65 @@57229 @@ -6425,58 +6561,65 @@ 50268 57230 pp[lnum] = y_ptr->y_array[lnum]; 50269 57231 vim_free(y_ptr->y_array); … … 50367 57329 #endif /* FEAT_CLIPBOARD || FEAT_EVAL || PROTO */ 50368 57330 50369 @@ -6570,12 +67 02,10 @@57331 @@ -6570,12 +6713,10 @@ 50370 57332 long word_count_cursor = 0; 50371 57333 int eol_size; … … 50380 57342 /* 50381 57343 * Compute the length of the file in characters. 50382 @@ -6591,7 +67 21,6 @@57344 @@ -6591,7 +6732,6 @@ 50383 57345 else 50384 57346 eol_size = 1; … … 50388 57350 { 50389 57351 if (lt(VIsual, curwin->w_cursor)) 50390 @@ -6635,7 +67 64,6 @@57352 @@ -6635,7 +6775,6 @@ 50391 57353 } 50392 57354 line_count_selected = max_pos.lnum - min_pos.lnum + 1; … … 50396 57358 for (lnum = 1; lnum <= curbuf->b_ml.ml_line_count; ++lnum) 50397 57359 { 50398 @@ -6648,7 +67 76,6 @@57360 @@ -6648,7 +6787,6 @@ 50399 57361 last_check = byte_count + 100000L; 50400 57362 } … … 50404 57366 if (VIsual_active 50405 57367 && lnum >= min_pos.lnum && lnum <= max_pos.lnum) 50406 @@ -6659,13 +67 86,13 @@57368 @@ -6659,13 +6797,13 @@ 50407 57369 switch (VIsual_mode) 50408 57370 { … … 50422 57384 len = (long)bd.textlen; 50423 57385 break; 50424 @@ -6697,7 +68 24,6 @@57386 @@ -6697,7 +6835,6 @@ 50425 57387 } 50426 57388 } … … 50430 57392 /* In non-visual mode, check for the line the cursor is on */ 50431 57393 if (lnum == curwin->w_cursor.lnum) 50432 @@ -6719,7 +68 45,6 @@57394 @@ -6719,7 +6856,6 @@ 50433 57395 if (!curbuf->b_p_eol && curbuf->b_p_bin) 50434 57396 byte_count -= eol_size; … … 50438 57400 { 50439 57401 if (VIsual_mode == Ctrl_V && curwin->w_curswant < MAXCOL) 50440 @@ -6750, 7 +6875,6@@57402 @@ -6750,13 +6886,13 @@ 50441 57403 byte_count_cursor, byte_count); 50442 57404 } … … 50446 57408 p = ml_get_curline(); 50447 57409 validate_virtcol(); 57410 col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1, 57411 (int)curwin->w_virtcol + 1); 57412 - col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p)); 57413 + col_print(buf2, sizeof(buf2), (int)STRLEN(p), 57414 + linetabsize(p)); 57415 57416 if (char_count_cursor == byte_count_cursor 57417 && char_count == byte_count) 50448 57418 diff -Naur vim74.orig/src/option.c vim74/src/option.c 50449 57419 --- vim74.orig/src/option.c 2013-07-17 19:39:13.000000000 +0000 50450 +++ vim74/src/option.c 2014-0 6-01 00:43:15.777476134+000057420 +++ vim74/src/option.c 2014-07-21 23:33:41.516795691 +0000 50451 57421 @@ -134,6 +134,7 @@ 50452 57422 #define PV_KP OPT_BOTH(OPT_BUF(BV_KP)) … … 50457 57427 #define PV_MA OPT_BUF(BV_MA) 50458 57428 #define PV_ML OPT_BUF(BV_ML) 50459 @@ -234,6 +235,7 @@ 57429 @@ -187,6 +188,10 @@ 57430 #ifdef FEAT_ARABIC 57431 # define PV_ARAB OPT_WIN(WV_ARAB) 57432 #endif 57433 +#ifdef FEAT_LINEBREAK 57434 +# define PV_BRI OPT_WIN(WV_BRI) 57435 +# define PV_BRIOPT OPT_WIN(WV_BRIOPT) 57436 +#endif 57437 #ifdef FEAT_DIFF 57438 # define PV_DIFF OPT_WIN(WV_DIFF) 57439 #endif 57440 @@ -234,6 +239,7 @@ 50460 57441 #ifdef FEAT_STL_OPT 50461 57442 # define PV_STL OPT_BOTH(OPT_WIN(WV_STL)) … … 50465 57446 # define PV_WFH OPT_WIN(WV_WFH) 50466 57447 #endif 50467 @@ -1627,11 +1629,7 @@ 57448 @@ -646,6 +652,24 @@ 57449 {(char_u *)0L, (char_u *)0L} 57450 #endif 57451 SCRIPTID_INIT}, 57452 + {"breakindent", "bri", P_BOOL|P_VI_DEF|P_VIM|P_RWIN, 57453 +#ifdef FEAT_LINEBREAK 57454 + (char_u *)VAR_WIN, PV_BRI, 57455 + {(char_u *)FALSE, (char_u *)0L} 57456 +#else 57457 + (char_u *)NULL, PV_NONE, 57458 + {(char_u *)0L, (char_u *)0L} 57459 +#endif 57460 + SCRIPTID_INIT}, 57461 + {"breakindentopt", "briopt", P_STRING|P_ALLOCED|P_VI_DEF|P_RBUF|P_COMMA|P_NODUP, 57462 +#ifdef FEAT_LINEBREAK 57463 + (char_u *)VAR_WIN, PV_BRIOPT, 57464 + {(char_u *)"", (char_u *)NULL} 57465 +#else 57466 + (char_u *)NULL, PV_NONE, 57467 + {(char_u *)"", (char_u *)NULL} 57468 +#endif 57469 + SCRIPTID_INIT}, 57470 {"browsedir", "bsdir",P_STRING|P_VI_DEF, 57471 #ifdef FEAT_BROWSE 57472 (char_u *)&p_bsdir, PV_NONE, 57473 @@ -1390,7 +1414,7 @@ 57474 SCRIPTID_INIT}, 57475 {"history", "hi", P_NUM|P_VIM, 57476 (char_u *)&p_hi, PV_NONE, 57477 - {(char_u *)0L, (char_u *)20L} SCRIPTID_INIT}, 57478 + {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT}, 57479 {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM, 57480 #ifdef FEAT_RIGHTLEFT 57481 (char_u *)&p_hkmap, PV_NONE, 57482 @@ -1627,11 +1651,7 @@ 50468 57483 #endif 50469 57484 SCRIPTID_INIT}, … … 50477 57492 {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, 50478 57493 (char_u *)&p_kp, PV_KP, 50479 @@ -1654,7 +16 52,7 @@57494 @@ -1654,7 +1674,7 @@ 50480 57495 #endif 50481 57496 #endif … … 50486 57501 (char_u *)&p_langmap, PV_NONE, 50487 57502 {(char_u *)"", /* unmatched } */ 50488 @@ -1717,7 +17 15,7 @@57503 @@ -1717,7 +1737,7 @@ 50489 57504 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 50490 57505 {"lispwords", "lw", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, … … 50495 57510 #else 50496 57511 (char_u *)NULL, PV_NONE, 50497 @@ -2188,19 +2 186,11 @@57512 @@ -2188,19 +2208,11 @@ 50498 57513 (char_u *)&p_secure, PV_NONE, 50499 57514 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, … … 50515 57530 {"sessionoptions", "ssop", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, 50516 57531 #ifdef FEAT_SESSION 50517 @@ -2683,7 +26 73,7 @@57532 @@ -2683,7 +2695,7 @@ 50518 57533 #endif 50519 57534 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, … … 50524 57539 #if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS) 50525 57540 (char_u *)1000L, 50526 @@ -2977,13 +29 67,9 @@57541 @@ -2977,13 +2989,9 @@ 50527 57542 static char *(p_wak_values[]) = {"yes", "menu", "no", NULL}; 50528 57543 #endif … … 50538 57553 static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL}; 50539 57554 #endif 50540 @@ -3313,6 +3299,7 @@ 57555 @@ -3066,6 +3074,7 @@ 57556 static char_u *get_varp_scope __ARGS((struct vimoption *p, int opt_flags)); 57557 static char_u *get_varp __ARGS((struct vimoption *)); 57558 static void option_value2string __ARGS((struct vimoption *, int opt_flags)); 57559 +static void check_winopt __ARGS((winopt_T *wop)); 57560 static int wc_use_keyname __ARGS((char_u *varp, long *wcp)); 57561 #ifdef FEAT_LANGMAP 57562 static void langmap_init __ARGS((void)); 57563 @@ -3313,6 +3322,7 @@ 50541 57564 50542 57565 curbuf->b_p_initialized = TRUE; … … 50546 57569 check_win_options(curwin); 50547 57570 check_options(); 50548 @@ -3817,37 +38 04,7 @@57571 @@ -3817,37 +3827,7 @@ 50549 57572 else 50550 57573 do_sp = !(options[idx_sp].flags & P_WAS_SET); … … 50585 57608 { 50586 57609 /* 50587 @@ -3888,6 +38 45,7 @@57610 @@ -3888,6 +3868,7 @@ 50588 57611 || fnamecmp(p, "zsh") == 0 50589 57612 || fnamecmp(p, "zsh-beta") == 0 … … 50593 57616 || fnamecmp(p, "cmd") == 0 50594 57617 || fnamecmp(p, "sh.exe") == 0 50595 @@ -4512,8 +44 70,16 @@57618 @@ -4512,8 +4493,16 @@ 50596 57619 ((flags & P_VI_DEF) || cp_val) 50597 57620 ? VI_DEFAULT : VIM_DEFAULT]; … … 50612 57635 || (long *)varp == &p_wcm) 50613 57636 && (*arg == '<' 50614 @@ -5372,6 +5338,7 @@ 57637 @@ -5290,6 +5279,9 @@ 57638 /* set cedit_key */ 57639 (void)check_cedit(); 57640 #endif 57641 +#ifdef FEAT_LINEBREAK 57642 + briopt_check(); 57643 +#endif 57644 } 57645 57646 /* 57647 @@ -5372,6 +5364,7 @@ 50615 57648 #ifdef FEAT_CINDENT 50616 57649 check_string_option(&buf->b_p_cink); … … 50620 57653 #ifdef FEAT_AUTOCMD 50621 57654 check_string_option(&buf->b_p_ft); 50622 @@ -5401,6 +53 68,9 @@57655 @@ -5401,6 +5394,9 @@ 50623 57656 check_string_option(&buf->b_p_dict); 50624 57657 check_string_option(&buf->b_p_tsr); … … 50630 57663 50631 57664 /* 50632 @@ -6563,7 +6533,6 @@ 57665 @@ -5739,6 +5735,14 @@ 57666 *p_pm == '.' ? p_pm + 1 : p_pm) == 0) 57667 errmsg = (char_u *)N_("E589: 'backupext' and 'patchmode' are equal"); 57668 } 57669 +#ifdef FEAT_LINEBREAK 57670 + /* 'breakindentopt' */ 57671 + else if (varp == &curwin->w_p_briopt) 57672 + { 57673 + if (briopt_check() == FAIL) 57674 + errmsg = e_invarg; 57675 + } 57676 +#endif 57677 57678 /* 57679 * 'isident', 'iskeyword', 'isprint or 'isfname' option: refill chartab[] 57680 @@ -6563,7 +6567,6 @@ 50633 57681 } 50634 57682 #endif … … 50638 57686 else if (varp == &p_sel) 50639 57687 { 50640 @@ -6578,7 +65 47,6 @@57688 @@ -6578,7 +6581,6 @@ 50641 57689 if (check_opt_strings(p_slm, p_slm_values, TRUE) != OK) 50642 57690 errmsg = e_invarg; … … 50646 57694 #ifdef FEAT_BROWSE 50647 57695 /* 'browsedir' */ 50648 @@ -6590,7 +65 58,6 @@57696 @@ -6590,7 +6592,6 @@ 50649 57697 } 50650 57698 #endif … … 50654 57702 else if (varp == &p_km) 50655 57703 { 50656 @@ -6602,7 +6 569,6 @@57704 @@ -6602,7 +6603,6 @@ 50657 57705 km_startsel = (vim_strchr(p_km, 'a') != NULL); 50658 57706 } … … 50662 57710 /* 'mousemodel' */ 50663 57711 else if (varp == &p_mousem) 50664 @@ -6990,6 +69 56,15 @@57712 @@ -6990,6 +6990,15 @@ 50665 57713 } 50666 57714 #endif … … 50678 57726 else 50679 57727 { 50680 @@ -7102,6 +7 077,11 @@57728 @@ -7102,6 +7111,11 @@ 50681 57729 if (varp == &(curwin->w_s->b_p_spl)) 50682 57730 { … … 50690 57738 /* 50691 57739 * Source the spell/LANG.vim in 'runtimepath'. 50692 @@ -7109,11 +7 089,10 @@57740 @@ -7109,11 +7123,10 @@ 50693 57741 * Use the first name in 'spelllang' up to '_region' or 50694 57742 * '.encoding'. … … 50704 57752 } 50705 57753 #endif 50706 @@ -7791,7 +7 770,7 @@57754 @@ -7791,7 +7804,7 @@ 50707 57755 /* when 'hlsearch' is set or reset: reset no_hlsearch */ 50708 57756 else if ((int *)varp == &p_hls) … … 50713 57761 #endif 50714 57762 50715 @@ -8338,14 +83 17,24 @@57763 @@ -8338,14 +8351,24 @@ 50716 57764 curwin->w_p_fdc = 12; 50717 57765 } … … 50739 57787 #ifdef FEAT_MBYTE 50740 57788 /* 'maxcombine' */ 50741 @@ -8467,6 +84 56,13 @@57789 @@ -8467,6 +8490,13 @@ 50742 57790 u_sync(TRUE); 50743 57791 p_ul = value; … … 50753 57801 #ifdef FEAT_LINEBREAK 50754 57802 /* 'numberwidth' must be positive */ 50755 @@ -8820,7 +8816,7 @@ 57803 @@ -8599,6 +8629,11 @@ 57804 errmsg = e_positive; 57805 p_hi = 0; 57806 } 57807 + else if (p_hi > 10000) 57808 + { 57809 + errmsg = e_invarg; 57810 + p_hi = 10000; 57811 + } 57812 if (p_re < 0 || p_re > 2) 57813 { 57814 errmsg = e_invarg; 57815 @@ -8820,7 +8855,7 @@ 50756 57816 } 50757 57817 #endif … … 50762 57822 * Returns the option attributes and its value. Unlike the above function it 50763 57823 * will return either global value or local value of the option depending on 50764 @@ -8833,7 +88 29,8 @@57824 @@ -8833,7 +8868,8 @@ 50765 57825 * opt_type). Uses 50766 57826 * … … 50772 57832 * 50773 57833 * Possible opt_type values: see SREQ_* in vim.h 50774 @@ -8956,6 +89 53,68 @@57834 @@ -8956,6 +8992,68 @@ 50775 57835 50776 57836 return r; … … 50841 57901 50842 57902 /* 50843 @@ -9700,7 +97 59,6 @@57903 @@ -9700,7 +9798,6 @@ 50844 57904 /* 50845 57905 * Unset local option value, similar to ":set opt<". … … 50849 57909 unset_global_local_option(name, from) 50850 57910 char_u *name; 50851 @@ -9773,6 +98 31,14 @@57911 @@ -9773,6 +9870,14 @@ 50852 57912 clear_string_option(&((win_T *)from)->w_p_stl); 50853 57913 break; … … 50864 57924 } 50865 57925 50866 @@ -9821,6 +9 887,10 @@57926 @@ -9821,6 +9926,10 @@ 50867 57927 #ifdef FEAT_STL_OPT 50868 57928 case PV_STL: return (char_u *)&(curwin->w_p_stl); … … 50875 57935 return NULL; /* "cannot happen" */ 50876 57936 } 50877 @@ -9885,6 +99 55,12 @@57937 @@ -9885,6 +9994,12 @@ 50878 57938 case PV_STL: return *curwin->w_p_stl != NUL 50879 57939 ? (char_u *)&(curwin->w_p_stl) : p->var; … … 50888 57948 #ifdef FEAT_ARABIC 50889 57949 case PV_ARAB: return (char_u *)&(curwin->w_p_arab); 50890 @@ -10425,6 +10501,7 @@ 57950 @@ -9937,6 +10052,8 @@ 57951 case PV_WRAP: return (char_u *)&(curwin->w_p_wrap); 57952 #ifdef FEAT_LINEBREAK 57953 case PV_LBR: return (char_u *)&(curwin->w_p_lbr); 57954 + case PV_BRI: return (char_u *)&(curwin->w_p_bri); 57955 + case PV_BRIOPT: return (char_u *)&(curwin->w_p_briopt); 57956 #endif 57957 #ifdef FEAT_SCROLLBIND 57958 case PV_SCBIND: return (char_u *)&(curwin->w_p_scb); 57959 @@ -10126,6 +10243,8 @@ 57960 #endif 57961 #ifdef FEAT_LINEBREAK 57962 to->wo_lbr = from->wo_lbr; 57963 + to->wo_bri = from->wo_bri; 57964 + to->wo_briopt = vim_strsave(from->wo_briopt); 57965 #endif 57966 #ifdef FEAT_SCROLLBIND 57967 to->wo_scb = from->wo_scb; 57968 @@ -10187,7 +10306,7 @@ 57969 /* 57970 * Check for NULL pointers in a winopt_T and replace them with empty_option. 57971 */ 57972 - void 57973 + static void 57974 check_winopt(wop) 57975 winopt_T *wop UNUSED; 57976 { 57977 @@ -10213,6 +10332,9 @@ 57978 #ifdef FEAT_CONCEAL 57979 check_string_option(&wop->wo_cocu); 57980 #endif 57981 +#ifdef FEAT_LINEBREAK 57982 + check_string_option(&wop->wo_briopt); 57983 +#endif 57984 } 57985 57986 /* 57987 @@ -10232,6 +10354,9 @@ 57988 # endif 57989 clear_string_option(&wop->wo_fmr); 57990 #endif 57991 +#ifdef FEAT_LINEBREAK 57992 + clear_string_option(&wop->wo_briopt); 57993 +#endif 57994 #ifdef FEAT_RIGHTLEFT 57995 clear_string_option(&wop->wo_rlc); 57996 #endif 57997 @@ -10425,6 +10550,7 @@ 50891 57998 /* options that are normally global but also have a local value 50892 57999 * are not copied, start using the global value */ … … 50896 58003 buf->b_p_gp = empty_option; 50897 58004 buf->b_p_mp = empty_option; 50898 @@ -10457,6 +105 34,9 @@58005 @@ -10457,6 +10583,9 @@ 50899 58006 #ifdef FEAT_PERSISTENT_UNDO 50900 58007 buf->b_p_udf = p_udf; … … 50906 58013 /* 50907 58014 * Don't copy the options set by ex_help(), use the saved values, 50908 @@ -11729,9 +118 09,10 @@58015 @@ -11729,9 +11858,10 @@ 50909 58016 * 'tabstop' value when 'shiftwidth' is zero. 50910 58017 */ … … 50919 58026 50920 58027 /* 50921 @@ -11741,7 +118 22,7 @@58028 @@ -11741,7 +11871,7 @@ 50922 58029 long 50923 58030 get_sts_value() … … 50928 58035 50929 58036 /* 58037 @@ -11841,3 +11971,49 @@ 58038 ++ptr; 58039 } 58040 } 58041 + 58042 +#if defined(FEAT_LINEBREAK) || defined(PROTO) 58043 +/* 58044 + * This is called when 'breakindentopt' is changed and when a window is 58045 + * initialized. 58046 + */ 58047 + int 58048 +briopt_check() 58049 +{ 58050 + char_u *p; 58051 + int bri_shift = 0; 58052 + long bri_min = 20; 58053 + int bri_sbr = FALSE; 58054 + 58055 + p = curwin->w_p_briopt; 58056 + while (*p != NUL) 58057 + { 58058 + if (STRNCMP(p, "shift:", 6) == 0 58059 + && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6]))) 58060 + { 58061 + p += 6; 58062 + bri_shift = getdigits(&p); 58063 + } 58064 + else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4])) 58065 + { 58066 + p += 4; 58067 + bri_min = getdigits(&p); 58068 + } 58069 + else if (STRNCMP(p, "sbr", 3) == 0) 58070 + { 58071 + p += 3; 58072 + bri_sbr = TRUE; 58073 + } 58074 + if (*p != ',' && *p != NUL) 58075 + return FAIL; 58076 + if (*p == ',') 58077 + ++p; 58078 + } 58079 + 58080 + curwin->w_p_brishift = bri_shift; 58081 + curwin->w_p_brimin = bri_min; 58082 + curwin->w_p_brisbr = bri_sbr; 58083 + 58084 + return OK; 58085 +} 58086 +#endif 50930 58087 diff -Naur vim74.orig/src/option.h vim74/src/option.h 50931 58088 --- vim74.orig/src/option.h 2013-06-26 16:41:39.000000000 +0000 50932 +++ vim74/src/option.h 2014-0 6-01 00:43:15.780809459+000058089 +++ vim74/src/option.h 2014-07-21 23:33:41.546795613 +0000 50933 58090 @@ -31,9 +31,9 @@ 50934 58091 # define DFLT_EFM "%A%p^,%C%%CC-%t-%m,%Cat line number %l in file %f,%f|%l| %m" … … 50990 58147 , BV_COUNT /* must be the last one */ 50991 58148 }; 50992 @@ -1109,3 +1108,6 @@ 58149 @@ -1053,6 +1052,10 @@ 58150 #ifdef FEAT_CURSORBIND 58151 , WV_CRBIND 58152 #endif 58153 +#ifdef FEAT_LINEBREAK 58154 + , WV_BRI 58155 + , WV_BRIOPT 58156 +#endif 58157 #ifdef FEAT_DIFF 58158 , WV_DIFF 58159 #endif 58160 @@ -1109,3 +1112,6 @@ 50993 58161 , WV_WRAP 50994 58162 , WV_COUNT /* must be the last one */ … … 50999 58167 diff -Naur vim74.orig/src/os_amiga.c vim74/src/os_amiga.c 51000 58168 --- vim74.orig/src/os_amiga.c 2013-05-06 02:06:04.000000000 +0000 51001 +++ vim74/src/os_amiga.c 2014-0 6-01 00:43:15.794142759+000058169 +++ vim74/src/os_amiga.c 2014-07-21 23:33:41.560128911 +0000 51002 58170 @@ -884,8 +884,9 @@ 51003 58171 * Return -1 if unknown. … … 51013 58181 diff -Naur vim74.orig/src/os_dos.h vim74/src/os_dos.h 51014 58182 --- vim74.orig/src/os_dos.h 2013-06-12 18:09:44.000000000 +0000 51015 +++ vim74/src/os_dos.h 2014-0 6-01 00:43:15.837475982+000058183 +++ vim74/src/os_dos.h 2014-07-21 23:33:41.600128807 +0000 51016 58184 @@ -109,7 +109,7 @@ 51017 58185 #endif … … 51034 58202 diff -Naur vim74.orig/src/os_mac.h vim74/src/os_mac.h 51035 58203 --- vim74.orig/src/os_mac.h 2013-05-06 02:06:04.000000000 +0000 51036 +++ vim74/src/os_mac.h 2014-0 6-01 00:43:15.847475956+000058204 +++ vim74/src/os_mac.h 2014-07-21 23:33:41.610128781 +0000 51037 58205 @@ -16,6 +16,11 @@ 51038 58206 # define OPAQUE_TOOLBOX_STRUCTS 0 … … 51058 58226 diff -Naur vim74.orig/src/os_msdos.c vim74/src/os_msdos.c 51059 58227 --- vim74.orig/src/os_msdos.c 2013-05-06 02:06:04.000000000 +0000 51060 +++ vim74/src/os_msdos.c 2014-0 6-01 00:43:15.950809026+000058228 +++ vim74/src/os_msdos.c 2014-07-21 23:33:41.723461818 +0000 51061 58229 @@ -2270,9 +2270,7 @@ 51062 58230 default: … … 51100 58268 diff -Naur vim74.orig/src/os_mswin.c vim74/src/os_mswin.c 51101 58269 --- vim74.orig/src/os_mswin.c 2013-06-16 14:41:11.000000000 +0000 51102 +++ vim74/src/os_mswin.c 2014-0 6-01 00:43:15.970808975+000058270 +++ vim74/src/os_mswin.c 2014-07-21 23:33:41.773461688 +0000 51103 58271 @@ -456,7 +456,14 @@ 51104 58272 int … … 51508 58676 diff -Naur vim74.orig/src/os_os2_cfg.h vim74/src/os_os2_cfg.h 51509 58677 --- vim74.orig/src/os_os2_cfg.h 2010-05-15 11:04:11.000000000 +0000 51510 +++ vim74/src/os_os2_cfg.h 2014-0 6-01 00:43:15.987475600 +000058678 +++ vim74/src/os_os2_cfg.h 2014-07-21 23:33:41.796794960 +0000 51511 58679 @@ -47,7 +47,7 @@ 51512 58680 #undef UNIX /* define always by current configure script */ … … 51520 58688 diff -Naur vim74.orig/src/os_qnx.c vim74/src/os_qnx.c 51521 58689 --- vim74.orig/src/os_qnx.c 2011-09-21 17:48:08.000000000 +0000 51522 +++ vim74/src/os_qnx.c 2014-0 6-01 00:43:16.000808899 +000058690 +++ vim74/src/os_qnx.c 2014-07-21 23:33:41.810128259 +0000 51523 58691 @@ -78,9 +78,7 @@ 51524 58692 default: /* fallthrough to line type */ … … 51543 58711 diff -Naur vim74.orig/src/os_unix.c vim74/src/os_unix.c 51544 58712 --- vim74.orig/src/os_unix.c 2013-07-03 14:32:32.000000000 +0000 51545 +++ vim74/src/os_unix.c 2014-0 6-01 00:43:16.020808848+000058713 +++ vim74/src/os_unix.c 2014-07-21 23:33:41.840128181 +0000 51546 58714 @@ -46,6 +46,14 @@ 51547 58715 static int selinux_enabled = -1; … … 51815 58983 # ifdef FEAT_GUI 51816 58984 && !gui.in_use 51817 @@ -3601, 32 +3740,49@@58985 @@ -3601,26 +3740,40 @@ 51818 58986 # endif 51819 58987 … … 51857 59025 del_mouse_termcode(KS_PTERM_MOUSE); 51858 59026 # endif 51859 # ifdef FEAT_MOUSE_URXVT 51860 /* same as the dec mouse */ 51861 if (use_xterm_mouse() == 3 51862 +# ifdef FEAT_TERMRESPONSE 51863 + && !did_request_esc_sequence() 51864 +# endif 51865 # ifdef FEAT_GUI 51866 && !gui.in_use 51867 # endif 51868 @@ -3641,12 +3797,13 @@ 59027 @@ -3641,12 +3794,14 @@ 51869 59028 mch_setmouse(FALSE); 51870 59029 setmouse(); 51871 59030 } 51872 + xterm_conflict_mouse = TRUE; 59031 + /* It's OK to request the xterm version for uxterm. */ 59032 + resume_get_esc_sequence(); 51873 59033 } 51874 59034 else … … 51881 59041 # ifdef FEAT_GUI 51882 59042 && !gui.in_use 51883 @@ -5028,6 +518 5,7 @@59043 @@ -5028,6 +5183,7 @@ 51884 59044 return avail; 51885 59045 } … … 51889 59049 * Wait "msec" msec until a character is available from file descriptor "fd". 51890 59050 * "msec" == 0 will check for characters once. 51891 @@ -5327,13 +548 5,7 @@59051 @@ -5327,13 +5483,7 @@ 51892 59052 } 51893 59053 # endif … … 51903 59063 if (ret == -1 && errno == EINTR) 51904 59064 { 51905 @@ -5455,8 +560 7,6 @@59065 @@ -5455,8 +5605,6 @@ 51906 59066 return (ret > 0); 51907 59067 } … … 51912 59072 /* 51913 59073 * Expand a path into all matching files and/or directories. Handles "*", 51914 @@ -5569,7 +571 9,7 @@59074 @@ -5569,7 +5717,7 @@ 51915 59075 continue; 51916 59076 … … 51921 59081 51922 59082 if (--files_free == 0) 51923 @@ -5979,7 +612 9,7 @@59083 @@ -5979,7 +6127,7 @@ 51924 59084 { 51925 59085 /* If there is a NUL, set did_find_nul, else set check_spaces */ … … 51930 59090 else 51931 59091 check_spaces = TRUE; 51932 @@ -6067,7 +621 7,7 @@59092 @@ -6067,7 +6215,7 @@ 51933 59093 continue; 51934 59094 … … 51939 59099 51940 59100 p = alloc((unsigned)(STRLEN((*file)[i]) + 1 + dir)); 51941 @@ -6294,7 +644 4,7 @@59101 @@ -6294,7 +6442,7 @@ 51942 59102 51943 59103 /* Reads gpm event and adds special keys to input buf. Returns length of … … 51950 59110 diff -Naur vim74.orig/src/os_unix.h vim74/src/os_unix.h 51951 59111 --- vim74.orig/src/os_unix.h 2013-06-12 18:09:44.000000000 +0000 51952 +++ vim74/src/os_unix.h 2014-0 6-01 00:43:16.040808797+000059112 +++ vim74/src/os_unix.h 2014-07-21 23:33:41.860128129 +0000 51953 59113 @@ -225,6 +225,8 @@ 51954 59114 # include <starlet.h> … … 51991 59151 diff -Naur vim74.orig/src/os_vms.c vim74/src/os_vms.c 51992 59152 --- vim74.orig/src/os_vms.c 2010-06-26 04:03:31.000000000 +0000 51993 +++ vim74/src/os_vms.c 2014-0 6-01 00:43:16.060808746 +000059153 +++ vim74/src/os_vms.c 2014-07-21 23:33:41.880128076 +0000 51994 59154 @@ -11,6 +11,23 @@ 51995 59155 … … 52239 59399 diff -Naur vim74.orig/src/os_vms_conf.h vim74/src/os_vms_conf.h 52240 59400 --- vim74.orig/src/os_vms_conf.h 2010-07-28 17:07:48.000000000 +0000 52241 +++ vim74/src/os_vms_conf.h 2014-0 6-01 00:43:16.077475370+000059401 +++ vim74/src/os_vms_conf.h 2014-07-21 23:33:41.906794673 +0000 52242 59402 @@ -23,7 +23,7 @@ 52243 59403 #define HAVE_DATE_TIME … … 52281 59441 diff -Naur vim74.orig/src/os_win16.h vim74/src/os_win16.h 52282 59442 --- vim74.orig/src/os_win16.h 2013-05-06 02:06:04.000000000 +0000 52283 +++ vim74/src/os_win16.h 2014-0 6-01 00:43:16.150808517 +000059443 +++ vim74/src/os_win16.h 2014-07-21 23:33:41.966794517 +0000 52284 59444 @@ -55,8 +55,8 @@ 52285 59445 … … 52295 59455 diff -Naur vim74.orig/src/os_win32.c vim74/src/os_win32.c 52296 59456 --- vim74.orig/src/os_win32.c 2013-08-10 10:39:12.000000000 +0000 52297 +++ vim74/src/os_win32.c 2014-0 6-01 00:43:16.187475090+000059457 +++ vim74/src/os_win32.c 2014-07-21 23:33:42.003461088 +0000 52298 59458 @@ -78,16 +78,6 @@ 52299 59459 # endif … … 52423 59583 if (!OpenProcessToken(GetCurrentProcess(), 52424 59584 TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) 59585 @@ -541,7 +619,7 @@ 59586 return FALSE; 59587 } 59588 59589 - tokenPrivileges.PrivilegeCount = 1; 59590 + tokenPrivileges.PrivilegeCount = 1; 59591 tokenPrivileges.Privileges[0].Luid = luid; 59592 tokenPrivileges.Privileges[0].Attributes = bEnable ? 59593 SE_PRIVILEGE_ENABLED : 0; 52425 59594 @@ -573,6 +651,10 @@ 52426 59595 … … 52501 59670 if (did_create_conin) 52502 59671 read_error_exit(); 52503 @@ -1800,7 +1882,7 @@ 59672 @@ -1703,13 +1785,14 @@ 59673 #endif 59674 { 59675 int n = 1; 59676 + int conv = FALSE; 59677 59678 - /* A key may have one or two bytes. */ 59679 typeahead[typeaheadlen] = c; 59680 if (ch2 != NUL) 59681 { 59682 - typeahead[typeaheadlen + 1] = ch2; 59683 - ++n; 59684 + typeahead[typeaheadlen + 1] = 3; 59685 + typeahead[typeaheadlen + 2] = ch2; 59686 + n += 2; 59687 } 59688 #ifdef FEAT_MBYTE 59689 /* Only convert normal characters, not special keys. Need to 59690 @@ -1718,6 +1801,7 @@ 59691 if (input_conv.vc_type != CONV_NONE 59692 && (ch2 == NUL || c != K_NUL)) 59693 { 59694 + conv = TRUE; 59695 typeaheadlen -= unconverted; 59696 n = convert_input_safe(typeahead + typeaheadlen, 59697 n + unconverted, TYPEAHEADLEN - typeaheadlen, 59698 @@ -1725,6 +1809,24 @@ 59699 } 59700 #endif 59701 59702 + if (conv) 59703 + { 59704 + char_u *p = typeahead + typeaheadlen; 59705 + char_u *e = typeahead + TYPEAHEADLEN; 59706 + 59707 + while (*p && p < e) 59708 + { 59709 + if (*p == K_NUL) 59710 + { 59711 + ++p; 59712 + mch_memmove(p + 1, p, ((size_t)(e - p)) - 1); 59713 + *p = 3; 59714 + ++n; 59715 + } 59716 + ++p; 59717 + } 59718 + } 59719 + 59720 /* Use the ALT key to set the 8th bit of the character 59721 * when it's one byte, the 8th bit isn't set yet and not 59722 * using a double-byte encoding (would become a lead 59723 @@ -1800,7 +1902,7 @@ 52504 59724 * TODO: Should somehow check if it's really executable. 52505 59725 */ … … 52510 59730 char *dum; 52511 59731 char fname[_MAX_PATH]; 52512 @@ -1823,6 +19 05,8 @@59732 @@ -1823,6 +1925,8 @@ 52513 59733 return FALSE; 52514 59734 if (GetFileAttributesW(fnamew) & FILE_ATTRIBUTE_DIRECTORY) … … 52519 59739 } 52520 59740 /* Retry with non-wide function (for Windows 98). */ 52521 @@ -1833,6 +19 17,8 @@59741 @@ -1833,6 +1937,8 @@ 52522 59742 return FALSE; 52523 59743 if (mch_isdir(fname)) … … 52528 59748 } 52529 59749 52530 @@ -1914,7 +20 00,7 @@59750 @@ -1914,7 +2020,7 @@ 52531 59751 vimrun_path = (char *)vim_strsave(vimrun_location); 52532 59752 s_dont_use_vimrun = FALSE; … … 52537 59757 52538 59758 /* Don't give the warning for a missing vimrun.exe right now, but only 52539 @@ -1928,7 +20 14,7 @@59759 @@ -1928,7 +2034,7 @@ 52540 59760 * If "finstr.exe" doesn't exist, use "grep -n" for 'grepprg'. 52541 59761 * Otherwise the default "findstr /n" is used. … … 52546 59766 52547 59767 #ifdef FEAT_CLIPBOARD 52548 @@ -2500,9 +2 586,125 @@59768 @@ -2500,9 +2606,125 @@ 52549 59769 } 52550 59770 … … 52672 59892 void 52673 59893 fname_case( 52674 @@ -2520,11 +27 22,44 @@59894 @@ -2520,11 +2742,44 @@ 52675 59895 int slen; 52676 59896 … … 52718 59938 porig = name; 52719 59939 ptrue = szTrueName; 52720 @@ -2534,8 +27 69,8 @@59940 @@ -2534,8 +2789,8 @@ 52721 59941 /* copy leading drive letter */ 52722 59942 *ptrue++ = *porig++; … … 52728 59948 while (*porig != NUL) 52729 59949 { 52730 @@ -2629,6 +28 64,28 @@59950 @@ -2629,6 +2884,28 @@ 52731 59951 char szUserName[256 + 1]; /* UNLEN is 256 */ 52732 59952 DWORD cch = sizeof szUserName; … … 52757 59977 { 52758 59978 vim_strncpy(s, szUserName, len - 1); 52759 @@ -2649,6 +29 06,28 @@59979 @@ -2649,6 +2926,28 @@ 52760 59980 { 52761 59981 DWORD cch = len; … … 52786 60006 vim_strncpy(s, "PC (Win32 Vim)", len - 1); 52787 60007 } 52788 @@ -2695,6 +29 74,8 @@60008 @@ -2695,6 +2994,8 @@ 52789 60009 return OK; 52790 60010 } … … 52795 60015 } 52796 60016 #endif 52797 @@ -2702,18 + 2983,17 @@60017 @@ -2702,18 +3003,17 @@ 52798 60018 } 52799 60019 … … 52818 60038 52819 60039 52820 @@ -2736,7 +30 16,7 @@60040 @@ -2736,7 +3036,7 @@ 52821 60041 { 52822 60042 n = _wchmod(p, perm); … … 52827 60047 /* Retry with non-wide function (for Windows 98). */ 52828 60048 } 52829 @@ -2955,8 +32 35,7 @@60049 @@ -2955,8 +3255,7 @@ 52830 60050 * -1 : error 52831 60051 * else FILE_ATTRIBUTE_* defined in winnt.h … … 52837 60057 { 52838 60058 int attr; 52839 @@ -3055,7 +33 34,7 @@60059 @@ -3055,7 +3354,7 @@ 52840 60060 * Return -1 if unknown. 52841 60061 */ … … 52846 60066 char_u buf[_MAX_PATH]; 52847 60067 int len = (int)STRLEN(name); 52848 @@ -3068,7 +33 47,7 @@60068 @@ -3068,7 +3367,7 @@ 52849 60069 * this with a Unix-shell like 'shell'. */ 52850 60070 if (vim_strchr(gettail(name), '.') != NULL … … 52855 60075 52856 60076 /* 52857 @@ -3090,7 +33 69,7 @@60077 @@ -3090,7 +3389,7 @@ 52858 60078 } 52859 60079 else … … 52864 60084 } 52865 60085 return FALSE; 52866 @@ -3107,6 +3 386,9 @@60086 @@ -3107,6 +3406,9 @@ 52867 60087 { 52868 60088 HANDLE hFile; … … 52874 60094 /* We can't open a file with a name "\\.\con" or "\\.\prn" and trying to 52875 60095 * read from it later will cause Vim to hang. Thus return NODE_WRITABLE 52876 @@ -3114,14 +3 396,41 @@60096 @@ -3114,14 +3416,41 @@ 52877 60097 if (STRNCMP(name, "\\\\.\\", 4) == 0) 52878 60098 return NODE_WRITABLE; … … 52923 60143 return NODE_NORMAL; 52924 60144 52925 @@ -3618,6 +39 27,50 @@60145 @@ -3618,6 +3947,50 @@ 52926 60146 } 52927 60147 #endif /* FEAT_GUI_W32 */ … … 52974 60194 52975 60195 #if defined(FEAT_GUI_W32) || defined(PROTO) 52976 @@ -3664,18 +40 17,8 @@60196 @@ -3664,18 +4037,8 @@ 52977 60197 cmd += 3; 52978 60198 … … 52995 60215 /* Wait for the command to terminate before continuing */ 52996 60216 if (g_PlatformId != VER_PLATFORM_WIN32s) 52997 @@ -4007,22 +43 50,11 @@60217 @@ -4007,22 +4370,11 @@ 52998 60218 p = cmd; 52999 60219 } … … 53023 60243 if (p != cmd) 53024 60244 vim_free(p); 53025 @@ -4049,10 +4 381,10 @@60245 @@ -4049,10 +4401,10 @@ 53026 60246 { 53027 60247 MSG msg; … … 53036 60256 53037 60257 /* write pipe information in the window */ 53038 @@ -4240,7 +45 72,25 @@60258 @@ -4240,7 +4592,25 @@ 53039 60259 } 53040 60260 #else … … 53063 60283 #endif 53064 60284 53065 @@ -4325,6 +46 75,7 @@60285 @@ -4325,6 +4695,7 @@ 53066 60286 DWORD flags = CREATE_NEW_CONSOLE; 53067 60287 char_u *p; … … 53071 60291 si.lpReserved = NULL; 53072 60292 si.lpDesktop = NULL; 53073 @@ -4408,16 +47 59,7 @@60293 @@ -4408,16 +4779,7 @@ 53074 60294 * inherit our handles which causes unpleasant dangling swap 53075 60295 * files if we exit before the spawned process … … 53089 60309 else 53090 60310 { 53091 @@ -4430,9 +47 72,9 @@60311 @@ -4430,9 +4792,9 @@ 53092 60312 if (newcmd != cmdbase) 53093 60313 vim_free(newcmd); … … 53101 60321 } 53102 60322 /* Close the handles to the subprocess, so that it goes away */ 53103 @@ -5716,7 +60 58,7 @@60323 @@ -5716,7 +6078,7 @@ 53104 60324 { 53105 60325 f = _wopen(wn, flags, mode); … … 53110 60330 /* Retry with non-wide function (for Windows 98). Can't use 53111 60331 * GetLastError() here and it's unclear what errno gets set to if 53112 @@ -5767,7 +61 09,7 @@60332 @@ -5767,7 +6129,7 @@ 53113 60333 _set_fmode(oldMode); 53114 60334 # endif … … 53119 60339 /* Retry with non-wide function (for Windows 98). Can't use 53120 60340 * GetLastError() here and it's unclear what errno gets set to if 53121 @@ -6102,6 +64 44,7 @@60341 @@ -6102,6 +6464,7 @@ 53122 60342 while (i > 0) 53123 60343 free(argv[--i]); … … 53129 60349 diff -Naur vim74.orig/src/os_win32.h vim74/src/os_win32.h 53130 60350 --- vim74.orig/src/os_win32.h 2013-07-21 15:53:13.000000000 +0000 53131 +++ vim74/src/os_win32.h 2014-0 6-01 00:43:16.214141689+000060351 +++ vim74/src/os_win32.h 2014-07-21 23:33:42.043460983 +0000 53132 60352 @@ -68,7 +68,7 @@ 53133 60353 #endif … … 53161 60381 diff -Naur vim74.orig/src/osdef.sh vim74/src/osdef.sh 53162 60382 --- vim74.orig/src/osdef.sh 2010-05-15 11:04:08.000000000 +0000 53163 +++ vim74/src/osdef.sh 2014-0 6-01 00:43:16.220808339+000060383 +++ vim74/src/osdef.sh 2014-07-21 23:33:42.050127633 +0000 53164 60384 @@ -47,11 +47,7 @@ 53165 60385 #endif … … 53175 60395 # insert a space in front of each line, so that a function name at the 53176 60396 # start of the line is matched with "[)*, ]\1[ (]" 60397 diff -Naur vim74.orig/src/po/Makefile vim74/src/po/Makefile 60398 --- vim74.orig/src/po/Makefile 2013-06-23 11:26:12.000000000 +0000 60399 +++ vim74/src/po/Makefile 2014-07-21 23:33:42.136794073 +0000 60400 @@ -1,5 +1,8 @@ 60401 # Makefile for the Vim message translations. 60402 60403 +# Include stuff found by configure. 60404 +include ../auto/config.mk 60405 + 60406 # TODO make this configurable 60407 # Note: ja.sjis, *.cp1250 and zh_CN.cp936 are only for MS-Windows, they are 60408 # not installed on Unix 60409 @@ -133,7 +136,7 @@ 60410 # tools 0.10.37, which use a slightly different .po file format that is not 60411 # compatible with Solaris (and old gettext implementations) unless these are 60412 # set. gettext 0.10.36 will not work! 60413 -MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -v 60414 +MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMT) -v 60415 XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext 60416 MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge 60417 60418 @@ -142,7 +145,7 @@ 60419 .PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED) 60420 60421 .po.mo: 60422 - $(MSGFMT) -o $@ $< 60423 + $(MSGFMTCMD) -o $@ $< 60424 60425 .po.ck: 60426 $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< 53177 60427 diff -Naur vim74.orig/src/po/ca.po vim74/src/po/ca.po 53178 60428 --- vim74.orig/src/po/ca.po 2012-01-18 18:40:35.000000000 +0000 53179 +++ vim74/src/po/ca.po 2014-0 6-01 00:43:16.347474683 +000060429 +++ vim74/src/po/ca.po 2014-07-21 23:33:42.186793943 +0000 53180 60430 @@ -448,7 +448,7 @@ 53181 60431 msgid "E691: Can only compare List with List" … … 53189 60439 diff -Naur vim74.orig/src/po/de.po vim74/src/po/de.po 53190 60440 --- vim74.orig/src/po/de.po 2013-01-23 12:04:20.000000000 +0000 53191 +++ vim74/src/po/de.po 2014-0 6-01 00:43:16.460807728+000060441 +++ vim74/src/po/de.po 2014-07-21 23:33:42.256793760 +0000 53192 60442 @@ -426,7 +426,7 @@ 53193 60443 msgid "E691: Can only compare List with List" … … 53201 60451 diff -Naur vim74.orig/src/po/eo.po vim74/src/po/eo.po 53202 60452 --- vim74.orig/src/po/eo.po 2013-05-27 18:40:27.000000000 +0000 53203 +++ vim74/src/po/eo.po 2014-0 6-01 00:43:16.487474326+000060453 +++ vim74/src/po/eo.po 2014-07-21 23:33:42.300126980 +0000 53204 60454 @@ -23,8 +23,8 @@ 53205 60455 msgstr "" … … 53960 61210 diff -Naur vim74.orig/src/po/es.po vim74/src/po/es.po 53961 61211 --- vim74.orig/src/po/es.po 2011-05-19 10:45:41.000000000 +0000 53962 +++ vim74/src/po/es.po 2014-0 6-01 00:43:16.504140951+000061212 +++ vim74/src/po/es.po 2014-07-21 23:33:42.306793630 +0000 53963 61213 @@ -582,8 +582,8 @@ 53964 61214 msgstr "E691: Solo se puede comparar una lista con otra lista" … … 53974 61224 diff -Naur vim74.orig/src/po/fi.po vim74/src/po/fi.po 53975 61225 --- vim74.orig/src/po/fi.po 2013-04-20 13:49:08.000000000 +0000 53976 +++ vim74/src/po/fi.po 2014-0 6-01 00:43:16.510807600+000061226 +++ vim74/src/po/fi.po 2014-07-21 23:33:42.326793578 +0000 53977 61227 @@ -471,7 +471,7 @@ 53978 61228 msgid "E691: Can only compare List with List" … … 53986 61236 diff -Naur vim74.orig/src/po/fr.po vim74/src/po/fr.po 53987 61237 --- vim74.orig/src/po/fr.po 2013-05-27 08:41:50.000000000 +0000 53988 +++ vim74/src/po/fr.po 2014-0 6-01 00:43:16.527474225 +000061238 +++ vim74/src/po/fr.po 2014-07-21 23:33:42.353460175 +0000 53989 61239 @@ -543,8 +543,8 @@ 53990 61240 msgid "E691: Can only compare List with List" … … 54000 61250 diff -Naur vim74.orig/src/po/ga.po vim74/src/po/ga.po 54001 61251 --- vim74.orig/src/po/ga.po 2011-05-19 10:46:33.000000000 +0000 54002 +++ vim74/src/po/ga.po 2014-0 6-01 00:43:16.540807524+000061252 +++ vim74/src/po/ga.po 2014-07-21 23:33:42.366793473 +0000 54003 61253 @@ -443,7 +443,7 @@ 54004 61254 msgid "E691: Can only compare List with List" … … 54012 61262 diff -Naur vim74.orig/src/po/it.po vim74/src/po/it.po 54013 61263 --- vim74.orig/src/po/it.po 2013-08-10 11:31:45.000000000 +0000 54014 +++ vim74/src/po/it.po 2014-0 6-01 00:43:16.590807397+000061264 +++ vim74/src/po/it.po 2014-07-21 23:33:42.436793291 +0000 54015 61265 @@ -477,7 +477,7 @@ 54016 61266 msgid "E691: Can only compare List with List" … … 54024 61274 diff -Naur vim74.orig/src/po/ja.euc-jp.po vim74/src/po/ja.euc-jp.po 54025 61275 --- vim74.orig/src/po/ja.euc-jp.po 2013-07-06 10:53:48.000000000 +0000 54026 +++ vim74/src/po/ja.euc-jp.po 2014-0 6-01 00:43:16.594140721+000061276 +++ vim74/src/po/ja.euc-jp.po 2014-07-21 23:33:42.473459862 +0000 54027 61277 @@ -3,7 +3,7 @@ 54028 61278 # Do ":help uganda" in Vim to read copying and usage conditions. … … 54045 61295 diff -Naur vim74.orig/src/po/ja.po vim74/src/po/ja.po 54046 61296 --- vim74.orig/src/po/ja.po 2013-07-06 06:04:57.000000000 +0000 54047 +++ vim74/src/po/ja.po 2014-0 6-01 00:43:16.640807269+000061297 +++ vim74/src/po/ja.po 2014-07-21 23:33:42.513459757 +0000 54048 61298 @@ -3,7 +3,7 @@ 54049 61299 # Do ":help uganda" in Vim to read copying and usage conditions. … … 54066 61316 diff -Naur vim74.orig/src/po/ja.sjis.po vim74/src/po/ja.sjis.po 54067 61317 --- vim74.orig/src/po/ja.sjis.po 2013-08-10 12:28:27.000000000 +0000 54068 +++ vim74/src/po/ja.sjis.po 2014-0 6-01 00:43:16.647473919+000061318 +++ vim74/src/po/ja.sjis.po 2014-07-21 23:33:42.560126302 +0000 54069 61319 @@ -3,7 +3,7 @@ 54070 61320 # Do ":help uganda" in Vim to read copying and usage conditions. … … 54087 61337 diff -Naur vim74.orig/src/po/ko.UTF-8.po vim74/src/po/ko.UTF-8.po 54088 61338 --- vim74.orig/src/po/ko.UTF-8.po 2011-05-19 10:47:30.000000000 +0000 54089 +++ vim74/src/po/ko.UTF-8.po 2014-0 6-01 00:43:16.650807244+000061339 +++ vim74/src/po/ko.UTF-8.po 2014-07-21 23:33:42.596792873 +0000 54090 61340 @@ -462,7 +462,7 @@ 54091 61341 msgid "E691: Can only compare List with List" … … 54099 61349 diff -Naur vim74.orig/src/po/ko.po vim74/src/po/ko.po 54100 61350 --- vim74.orig/src/po/ko.po 2011-05-19 10:47:53.000000000 +0000 54101 +++ vim74/src/po/ko.po 2014-0 6-01 00:43:16.657473894 +000061351 +++ vim74/src/po/ko.po 2014-07-21 23:33:42.633459444 +0000 54102 61352 @@ -462,7 +462,7 @@ 54103 61353 msgid "E691: Can only compare List with List" … … 54111 61361 diff -Naur vim74.orig/src/po/nb.po vim74/src/po/nb.po 54112 61362 --- vim74.orig/src/po/nb.po 2011-05-19 11:12:47.000000000 +0000 54113 +++ vim74/src/po/nb.po 2014-0 6-01 00:43:16.660807218+000061363 +++ vim74/src/po/nb.po 2014-07-21 23:33:42.653459392 +0000 54114 61364 @@ -456,8 +456,8 @@ 54115 61365 msgid "E691: Can only compare List with List" … … 54125 61375 diff -Naur vim74.orig/src/po/nl.po vim74/src/po/nl.po 54126 61376 --- vim74.orig/src/po/nl.po 2013-07-09 12:55:16.000000000 +0000 54127 +++ vim74/src/po/nl.po 2014-0 6-01 00:43:16.667473868+000061377 +++ vim74/src/po/nl.po 2014-07-21 23:33:42.680125989 +0000 54128 61378 @@ -458,8 +458,8 @@ 54129 61379 msgid "E691: Can only compare List with List" … … 54139 61389 diff -Naur vim74.orig/src/po/no.po vim74/src/po/no.po 54140 61390 --- vim74.orig/src/po/no.po 2011-05-19 10:48:14.000000000 +0000 54141 +++ vim74/src/po/no.po 2014-0 6-01 00:43:16.670807193+000061391 +++ vim74/src/po/no.po 2014-07-21 23:33:42.706792586 +0000 54142 61392 @@ -456,8 +456,8 @@ 54143 61393 msgid "E691: Can only compare List with List" … … 54153 61403 diff -Naur vim74.orig/src/po/pl.UTF-8.po vim74/src/po/pl.UTF-8.po 54154 61404 --- vim74.orig/src/po/pl.UTF-8.po 2013-07-09 12:25:44.000000000 +0000 54155 +++ vim74/src/po/pl.UTF-8.po 2014-06-01 00:43:16.677473843 +0000 54156 @@ -14,7 +14,7 @@ 61405 +++ vim74/src/po/pl.UTF-8.po 2014-07-21 23:33:42.740125832 +0000 61406 @@ -12,9 +12,10 @@ 61407 "POT-Creation-Date: 2013-07-06 19:33+0200\n" 61408 "PO-Revision-Date: 2010-08-10 18:15+0200\n" 54157 61409 "Last-Translator: Mikolaj Machowski <mikmach@wp.pl>\n" 61410 +"Language-Team: \n" 54158 61411 "Language: pl\n" 54159 61412 "MIME-Version: 1.0\n" … … 54163 61416 "X-Generator: Lokalize 1.0\n" 54164 61417 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 54165 @@ -475,7 +47 5,7 @@61418 @@ -475,7 +476,7 @@ 54166 61419 msgid "E691: Can only compare List with List" 54167 61420 msgstr "E691: ListÄ mogÄ porównaÄ tylko z ListÄ … … 54175 61428 diff -Naur vim74.orig/src/po/pl.cp1250.po vim74/src/po/pl.cp1250.po 54176 61429 --- vim74.orig/src/po/pl.cp1250.po 2013-08-10 12:28:27.000000000 +0000 54177 +++ vim74/src/po/pl.cp1250.po 2014-06-01 00:43:16.684140492 +0000 54178 @@ -14,7 +14,7 @@ 61430 +++ vim74/src/po/pl.cp1250.po 2014-07-21 23:33:42.793459027 +0000 61431 @@ -12,9 +12,10 @@ 61432 "POT-Creation-Date: 2013-07-06 19:33+0200\n" 61433 "PO-Revision-Date: 2010-08-10 18:15+0200\n" 54179 61434 "Last-Translator: Mikolaj Machowski <mikmach@wp.pl>\n" 61435 +"Language-Team: \n" 54180 61436 "Language: pl\n" 54181 61437 "MIME-Version: 1.0\n" … … 54185 61441 "X-Generator: Lokalize 1.0\n" 54186 61442 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " 54187 @@ -475,7 +47 5,7 @@61443 @@ -475,7 +476,7 @@ 54188 61444 msgid "E691: Can only compare List with List" 54189 61445 msgstr "E691: Listê mogê porównaæ tylko z List¹" … … 54196 61452 diff -Naur vim74.orig/src/po/pl.po vim74/src/po/pl.po 54197 61453 --- vim74.orig/src/po/pl.po 2013-07-09 12:25:10.000000000 +0000 54198 +++ vim74/src/po/pl.po 2014-06-01 00:43:16.690807142 +0000 54199 @@ -475,7 +475,7 @@ 61454 +++ vim74/src/po/pl.po 2014-07-21 23:33:42.833458922 +0000 61455 @@ -12,6 +12,7 @@ 61456 "POT-Creation-Date: 2013-07-06 19:33+0200\n" 61457 "PO-Revision-Date: 2010-08-10 18:15+0200\n" 61458 "Last-Translator: Mikolaj Machowski <mikmach@wp.pl>\n" 61459 +"Language-Team: \n" 61460 "Language: pl\n" 61461 "MIME-Version: 1.0\n" 61462 "Content-Type: text/plain; charset=ISO-8859-2\n" 61463 @@ -475,7 +476,7 @@ 54200 61464 msgid "E691: Can only compare List with List" 54201 61465 msgstr "E691: Listê mogê porównaæ tylko z List±" … … 54208 61472 diff -Naur vim74.orig/src/po/pt_BR.po vim74/src/po/pt_BR.po 54209 61473 --- vim74.orig/src/po/pt_BR.po 2011-05-19 10:49:11.000000000 +0000 54210 +++ vim74/src/po/pt_BR.po 2014-0 6-01 00:43:16.697473792+000061474 +++ vim74/src/po/pt_BR.po 2014-07-21 23:33:42.866792169 +0000 54211 61475 @@ -438,8 +438,8 @@ 54212 61476 msgid "E691: Can only compare List with List" … … 54222 61486 diff -Naur vim74.orig/src/po/ru.cp1251.po vim74/src/po/ru.cp1251.po 54223 61487 --- vim74.orig/src/po/ru.cp1251.po 2013-08-10 12:28:27.000000000 +0000 54224 +++ vim74/src/po/ru.cp1251.po 2014-0 6-01 00:43:16.704140441+000061488 +++ vim74/src/po/ru.cp1251.po 2014-07-21 23:33:42.910125389 +0000 54225 61489 @@ -3,14 +3,14 @@ 54226 61490 # Îá óñëîâèÿõ èñïîëüçîâàíèÿ ÷èòàéòå â ðåäàêòîðå Vim ":help uganda" … … 54483 61747 diff -Naur vim74.orig/src/po/ru.po vim74/src/po/ru.po 54484 61748 --- vim74.orig/src/po/ru.po 2013-07-09 12:36:10.000000000 +0000 54485 +++ vim74/src/po/ru.po 2014-0 6-01 00:43:16.710807091+000061749 +++ vim74/src/po/ru.po 2014-07-21 23:33:42.953458609 +0000 54486 61750 @@ -3,14 +3,14 @@ 54487 61751 # Ðб ÑÑлПвОÑÑ … … 54752 62016 diff -Naur vim74.orig/src/po/sk.cp1250.po vim74/src/po/sk.cp1250.po 54753 62017 --- vim74.orig/src/po/sk.cp1250.po 2013-08-10 12:28:27.000000000 +0000 54754 +++ vim74/src/po/sk.cp1250.po 2014-0 6-01 00:43:16.734140365 +000062018 +++ vim74/src/po/sk.cp1250.po 2014-07-21 23:33:42.986791855 +0000 54755 62019 @@ -414,8 +414,8 @@ 54756 62020 msgid "E691: Can only compare List with List" … … 54766 62030 diff -Naur vim74.orig/src/po/sk.po vim74/src/po/sk.po 54767 62031 --- vim74.orig/src/po/sk.po 2011-05-19 10:50:14.000000000 +0000 54768 +++ vim74/src/po/sk.po 2014-0 6-01 00:43:16.740807015+000062032 +++ vim74/src/po/sk.po 2014-07-21 23:33:43.016791777 +0000 54769 62033 @@ -414,8 +414,8 @@ 54770 62034 msgid "E691: Can only compare List with List" … … 54780 62044 diff -Naur vim74.orig/src/po/sv.po vim74/src/po/sv.po 54781 62045 --- vim74.orig/src/po/sv.po 2011-05-19 10:50:27.000000000 +0000 54782 +++ vim74/src/po/sv.po 2014-0 6-01 00:43:16.744140339+000062046 +++ vim74/src/po/sv.po 2014-07-21 23:33:43.043458374 +0000 54783 62047 @@ -433,8 +433,8 @@ 54784 62048 msgid "E691: Can only compare List with List" … … 54794 62058 diff -Naur vim74.orig/src/po/uk.cp1251.po vim74/src/po/uk.cp1251.po 54795 62059 --- vim74.orig/src/po/uk.cp1251.po 2013-08-10 12:28:27.000000000 +0000 54796 +++ vim74/src/po/uk.cp1251.po 2014-0 6-01 00:43:16.754140314+000062060 +++ vim74/src/po/uk.cp1251.po 2014-07-21 23:33:43.086791595 +0000 54797 62061 @@ -2,19 +2,17 @@ 54798 62062 # Ukrainian Vim translation [uk] … … 55636 62900 diff -Naur vim74.orig/src/po/uk.po vim74/src/po/uk.po 55637 62901 --- vim74.orig/src/po/uk.po 2013-01-17 12:11:55.000000000 +0000 55638 +++ vim74/src/po/uk.po 2014-0 6-01 00:43:16.790806887+000062902 +++ vim74/src/po/uk.po 2014-07-21 23:33:43.130124815 +0000 55639 62903 @@ -2,19 +2,17 @@ 55640 62904 # Ukrainian Vim translation [uk] … … 56488 63752 diff -Naur vim74.orig/src/po/zh_CN.UTF-8.po vim74/src/po/zh_CN.UTF-8.po 56489 63753 --- vim74.orig/src/po/zh_CN.UTF-8.po 2012-04-20 11:48:11.000000000 +0000 56490 +++ vim74/src/po/zh_CN.UTF-8.po 2014-0 6-01 00:43:16.830806785+000063754 +++ vim74/src/po/zh_CN.UTF-8.po 2014-07-21 23:33:43.186791334 +0000 56491 63755 @@ -434,7 +434,7 @@ 56492 63756 msgid "E691: Can only compare List with List" … … 56500 63764 diff -Naur vim74.orig/src/po/zh_CN.cp936.po vim74/src/po/zh_CN.cp936.po 56501 63765 --- vim74.orig/src/po/zh_CN.cp936.po 2013-08-10 12:28:27.000000000 +0000 56502 +++ vim74/src/po/zh_CN.cp936.po 2014-0 6-01 00:43:16.834140110 +000063766 +++ vim74/src/po/zh_CN.cp936.po 2014-07-21 23:33:43.220124580 +0000 56503 63767 @@ -435,7 +435,7 @@ 56504 63768 msgid "E691: Can only compare List with List" … … 56521 63785 diff -Naur vim74.orig/src/po/zh_CN.po vim74/src/po/zh_CN.po 56522 63786 --- vim74.orig/src/po/zh_CN.po 2011-05-19 10:52:13.000000000 +0000 56523 +++ vim74/src/po/zh_CN.po 2014-0 6-01 00:43:16.840806760+000063787 +++ vim74/src/po/zh_CN.po 2014-07-21 23:33:43.240124528 +0000 56524 63788 @@ -435,7 +435,7 @@ 56525 63789 msgid "E691: Can only compare List with List" … … 56533 63797 diff -Naur vim74.orig/src/popupmnu.c vim74/src/popupmnu.c 56534 63798 --- vim74.orig/src/popupmnu.c 2011-08-17 16:04:28.000000000 +0000 56535 +++ vim74/src/popupmnu.c 2014-0 6-01 00:43:16.890806633+000063799 +++ vim74/src/popupmnu.c 2014-07-21 23:33:43.323457644 +0000 56536 63800 @@ -282,6 +282,10 @@ 56537 63801 int round; … … 56545 63809 { 56546 63810 thumb_heigth = pum_height * pum_height / pum_size; 56547 @@ -672,10 +676,6 @@ 63811 @@ -563,7 +567,9 @@ 63812 g_do_tagpreview = 3; 63813 if (p_pvh > 0 && p_pvh < g_do_tagpreview) 63814 g_do_tagpreview = p_pvh; 63815 + ++RedrawingDisabled; 63816 resized = prepare_tagpreview(FALSE); 63817 + --RedrawingDisabled; 63818 g_do_tagpreview = 0; 63819 63820 if (curwin->w_p_pvw) 63821 @@ -672,10 +678,6 @@ 56548 63822 #endif 56549 63823 } … … 56558 63832 diff -Naur vim74.orig/src/proto/blowfish.pro vim74/src/proto/blowfish.pro 56559 63833 --- vim74.orig/src/proto/blowfish.pro 2013-08-10 11:37:06.000000000 +0000 56560 +++ vim74/src/proto/blowfish.pro 2014-0 6-01 00:43:16.927473206+000063834 +++ vim74/src/proto/blowfish.pro 2014-07-21 23:33:43.370124189 +0000 56561 63835 @@ -1,6 +1,6 @@ 56562 63836 /* blowfish.c */ … … 56567 63841 void bf_crypt_decode __ARGS((char_u *ptr, long len)); 56568 63842 void bf_crypt_init_keys __ARGS((char_u *passwd)); 63843 diff -Naur vim74.orig/src/proto/charset.pro vim74/src/proto/charset.pro 63844 --- vim74.orig/src/proto/charset.pro 2013-08-10 11:37:07.000000000 +0000 63845 +++ vim74/src/proto/charset.pro 2014-07-21 23:33:43.400124110 +0000 63846 @@ -16,7 +16,7 @@ 63847 int chartabsize __ARGS((char_u *p, colnr_T col)); 63848 int linetabsize __ARGS((char_u *s)); 63849 int linetabsize_col __ARGS((int startcol, char_u *s)); 63850 -int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len)); 63851 +int win_linetabsize __ARGS((win_T *wp, char_u *line, colnr_T len)); 63852 int vim_isIDc __ARGS((int c)); 63853 int vim_iswordc __ARGS((int c)); 63854 int vim_iswordc_buf __ARGS((int c, buf_T *buf)); 63855 @@ -26,9 +26,9 @@ 63856 int vim_isfilec_or_wc __ARGS((int c)); 63857 int vim_isprintc __ARGS((int c)); 63858 int vim_isprintc_strict __ARGS((int c)); 63859 -int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col)); 63860 -int lbr_chartabsize_adv __ARGS((char_u **s, colnr_T col)); 63861 -int win_lbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp)); 63862 +int lbr_chartabsize __ARGS((char_u *line, unsigned char *s, colnr_T col)); 63863 +int lbr_chartabsize_adv __ARGS((char_u *line, char_u **s, colnr_T col)); 63864 +int win_lbr_chartabsize __ARGS((win_T *wp, char_u *line, char_u *s, colnr_T col, int *headp)); 63865 int in_win_border __ARGS((win_T *wp, colnr_T vcol)); 63866 void getvcol __ARGS((win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *end)); 63867 colnr_T getvcol_nolist __ARGS((pos_T *posp)); 56569 63868 diff -Naur vim74.orig/src/proto/eval.pro vim74/src/proto/eval.pro 56570 63869 --- vim74.orig/src/proto/eval.pro 2013-08-10 11:37:09.000000000 +0000 56571 +++ vim74/src/proto/eval.pro 2014-0 6-01 00:43:16.980806403+000063870 +++ vim74/src/proto/eval.pro 2014-07-21 23:33:43.440124006 +0000 56572 63871 @@ -59,7 +59,8 @@ 56573 63872 int list_append_dict __ARGS((list_T *list, dict_T *dict)); … … 56582 63881 diff -Naur vim74.orig/src/proto/ex_cmds2.pro vim74/src/proto/ex_cmds2.pro 56583 63882 --- vim74.orig/src/proto/ex_cmds2.pro 2013-08-10 11:37:10.000000000 +0000 56584 +++ vim74/src/proto/ex_cmds2.pro 2014-0 6-01 00:43:17.000806353+000063883 +++ vim74/src/proto/ex_cmds2.pro 2014-07-21 23:33:43.463457278 +0000 56585 63884 @@ -35,7 +35,7 @@ 56586 63885 int prof_def_func __ARGS((void)); … … 56594 63893 diff -Naur vim74.orig/src/proto/ex_docmd.pro vim74/src/proto/ex_docmd.pro 56595 63894 --- vim74.orig/src/proto/ex_docmd.pro 2013-08-10 11:37:10.000000000 +0000 56596 +++ vim74/src/proto/ex_docmd.pro 2014-0 6-01 00:43:17.007473002+000063895 +++ vim74/src/proto/ex_docmd.pro 2014-07-21 23:33:43.470123928 +0000 56597 63896 @@ -54,4 +54,5 @@ 56598 63897 int put_line __ARGS((FILE *fd, char *s)); … … 56603 63902 diff -Naur vim74.orig/src/proto/ex_eval.pro vim74/src/proto/ex_eval.pro 56604 63903 --- vim74.orig/src/proto/ex_eval.pro 2013-08-10 11:37:10.000000000 +0000 56605 +++ vim74/src/proto/ex_eval.pro 2014-0 6-01 00:43:17.020806302+000063904 +++ vim74/src/proto/ex_eval.pro 2014-07-21 23:33:43.483457226 +0000 56606 63905 @@ -4,8 +4,10 @@ 56607 63906 int should_abort __ARGS((int retcode)); … … 56617 63916 diff -Naur vim74.orig/src/proto/ex_getln.pro vim74/src/proto/ex_getln.pro 56618 63917 --- vim74.orig/src/proto/ex_getln.pro 2013-08-10 11:37:11.000000000 +0000 56619 +++ vim74/src/proto/ex_getln.pro 2014-0 6-01 00:43:17.020806302+000063918 +++ vim74/src/proto/ex_getln.pro 2014-07-21 23:33:43.496790525 +0000 56620 63919 @@ -32,7 +32,7 @@ 56621 63920 void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); … … 56629 63928 diff -Naur vim74.orig/src/proto/getchar.pro vim74/src/proto/getchar.pro 56630 63929 --- vim74.orig/src/proto/getchar.pro 2013-08-10 11:37:12.000000000 +0000 56631 +++ vim74/src/proto/getchar.pro 2014-0 6-01 00:43:17.060806200 +000063930 +++ vim74/src/proto/getchar.pro 2014-07-21 23:33:43.536790420 +0000 56632 63931 @@ -1,8 +1,9 @@ 56633 63932 /* getchar.c */ … … 56643 63942 diff -Naur vim74.orig/src/proto/misc1.pro vim74/src/proto/misc1.pro 56644 63943 --- vim74.orig/src/proto/misc1.pro 2013-08-10 11:37:20.000000000 +0000 56645 +++ vim74/src/proto/misc1.pro 2014-06-01 00:43:17.457471856 +0000 56646 @@ -69,6 +69,7 @@ 63944 +++ vim74/src/proto/misc1.pro 2014-07-21 23:33:43.906789455 +0000 63945 @@ -2,9 +2,10 @@ 63946 int get_indent __ARGS((void)); 63947 int get_indent_lnum __ARGS((linenr_T lnum)); 63948 int get_indent_buf __ARGS((buf_T *buf, linenr_T lnum)); 63949 -int get_indent_str __ARGS((char_u *ptr, int ts)); 63950 +int get_indent_str __ARGS((char_u *ptr, int ts, int list)); 63951 int set_indent __ARGS((int size, int flags)); 63952 int get_number_indent __ARGS((linenr_T lnum)); 63953 +int get_breakindent_win __ARGS((win_T *wp, char_u *ptr)); 63954 int open_line __ARGS((int dir, int flags, int second_line_indent)); 63955 int get_leader_len __ARGS((char_u *line, char_u **flags, int backward, int include_space)); 63956 int get_last_leader_offset __ARGS((char_u *line, char_u **flags)); 63957 @@ -69,6 +70,7 @@ 56647 63958 char_u *getnextcomp __ARGS((char_u *fname)); 56648 63959 char_u *get_past_head __ARGS((char_u *path)); … … 56652 63963 void shorten_dir __ARGS((char_u *str)); 56653 63964 int dir_of_file_exists __ARGS((char_u *fname)); 56654 @@ -80,9 +8 1,10 @@63965 @@ -80,9 +82,10 @@ 56655 63966 char_u *FullName_save __ARGS((char_u *fname, int force)); 56656 63967 pos_T *find_start_comment __ARGS((int ind_maxcomment)); … … 56664 63975 int get_expr_indent __ARGS((void)); 56665 63976 int get_lisp_indent __ARGS((void)); 56666 @@ -98,7 +10 0,8 @@63977 @@ -98,7 +101,8 @@ 56667 63978 void remove_duplicates __ARGS((garray_T *gap)); 56668 63979 int gen_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); … … 56676 63987 diff -Naur vim74.orig/src/proto/misc2.pro vim74/src/proto/misc2.pro 56677 63988 --- vim74.orig/src/proto/misc2.pro 2013-08-10 11:37:20.000000000 +0000 56678 +++ vim74/src/proto/misc2.pro 2014-0 6-01 00:43:17.460805181+000063989 +++ vim74/src/proto/misc2.pro 2014-07-21 23:33:43.936789377 +0000 56679 63990 @@ -32,7 +32,7 @@ 56680 63991 char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars)); … … 56697 64008 diff -Naur vim74.orig/src/proto/ops.pro vim74/src/proto/ops.pro 56698 64009 --- vim74.orig/src/proto/ops.pro 2013-08-10 11:37:22.000000000 +0000 56699 +++ vim74/src/proto/ops.pro 2014-0 6-01 00:43:17.494138430+000064010 +++ vim74/src/proto/ops.pro 2014-07-21 23:33:43.970122623 +0000 56700 64011 @@ -37,7 +37,7 @@ 56701 64012 int preprocs_left __ARGS((void)); … … 56721 64032 diff -Naur vim74.orig/src/proto/option.pro vim74/src/proto/option.pro 56722 64033 --- vim74.orig/src/proto/option.pro 2013-08-10 11:37:22.000000000 +0000 56723 +++ vim74/src/proto/option.pro 2014-0 6-01 00:43:17.510805054+000064034 +++ vim74/src/proto/option.pro 2014-07-21 23:33:43.983455922 +0000 56724 64035 @@ -23,6 +23,7 @@ 56725 64036 char_u *check_stl_option __ARGS((char_u *s)); … … 56730 64041 char_u *get_term_code __ARGS((char_u *tname)); 56731 64042 char_u *get_highlight_default __ARGS((void)); 56732 @@ -59,7 +60,7 @@ 64043 @@ -39,7 +40,6 @@ 64044 void win_copy_options __ARGS((win_T *wp_from, win_T *wp_to)); 64045 void copy_winopt __ARGS((winopt_T *from, winopt_T *to)); 64046 void check_win_options __ARGS((win_T *win)); 64047 -void check_winopt __ARGS((winopt_T *wop)); 64048 void clear_winopt __ARGS((winopt_T *wop)); 64049 void buf_copy_options __ARGS((buf_T *buf, int flags)); 64050 void reset_modifiable __ARGS((void)); 64051 @@ -59,7 +59,8 @@ 56733 64052 void save_file_ff __ARGS((buf_T *buf)); 56734 64053 int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); … … 56738 64057 long get_sts_value __ARGS((void)); 56739 64058 void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit)); 64059 +int briopt_check __ARGS((void)); 56740 64060 /* vim: set ft=c : */ 56741 64061 diff -Naur vim74.orig/src/proto/os_amiga.pro vim74/src/proto/os_amiga.pro 56742 64062 --- vim74.orig/src/proto/os_amiga.pro 2013-08-10 11:37:37.000000000 +0000 56743 +++ vim74/src/proto/os_amiga.pro 2014-0 6-01 00:43:17.517471704+000064063 +++ vim74/src/proto/os_amiga.pro 2014-07-21 23:33:44.013455843 +0000 56744 64064 @@ -26,7 +26,7 @@ 56745 64065 void mch_hide __ARGS((char_u *name)); … … 56753 64073 diff -Naur vim74.orig/src/proto/os_msdos.pro vim74/src/proto/os_msdos.pro 56754 64074 --- vim74.orig/src/proto/os_msdos.pro 2013-08-10 11:37:37.000000000 +0000 56755 +++ vim74/src/proto/os_msdos.pro 2014-0 6-01 00:43:17.564138251+000064075 +++ vim74/src/proto/os_msdos.pro 2014-07-21 23:33:44.060122388 +0000 56756 64076 @@ -38,7 +38,7 @@ 56757 64077 int mch_setperm __ARGS((char_u *name, long perm)); … … 56765 64085 diff -Naur vim74.orig/src/proto/os_unix.pro vim74/src/proto/os_unix.pro 56766 64086 --- vim74.orig/src/proto/os_unix.pro 2013-08-10 11:37:23.000000000 +0000 56767 +++ vim74/src/proto/os_unix.pro 2014-0 6-01 00:43:17.584138200+000064087 +++ vim74/src/proto/os_unix.pro 2014-07-21 23:33:44.080122336 +0000 56768 64088 @@ -42,7 +42,7 @@ 56769 64089 void mch_free_acl __ARGS((vim_acl_T aclent)); … … 56777 64097 diff -Naur vim74.orig/src/proto/os_vms.pro vim74/src/proto/os_vms.pro 56778 64098 --- vim74.orig/src/proto/os_vms.pro 2013-08-10 11:37:40.000000000 +0000 56779 +++ vim74/src/proto/os_vms.pro 2014-0 6-01 00:43:17.594138175+000064099 +++ vim74/src/proto/os_vms.pro 2014-07-21 23:33:44.090122310 +0000 56780 64100 @@ -7,6 +7,7 @@ 56781 64101 int vms_sys __ARGS((char *cmd, char *out, char *inp)); … … 56788 64108 diff -Naur vim74.orig/src/proto/os_win32.pro vim74/src/proto/os_win32.pro 56789 64109 --- vim74.orig/src/proto/os_win32.pro 2013-08-10 11:37:38.000000000 +0000 56790 +++ vim74/src/proto/os_win32.pro 2014-0 6-01 00:43:17.610804799+000064110 +++ vim74/src/proto/os_win32.pro 2014-07-21 23:33:44.106788933 +0000 56791 64111 @@ -26,7 +26,7 @@ 56792 64112 int mch_is_linked __ARGS((char_u *fname)); … … 56800 64120 diff -Naur vim74.orig/src/proto/regexp.pro vim74/src/proto/regexp.pro 56801 64121 --- vim74.orig/src/proto/regexp.pro 2013-08-10 11:37:24.000000000 +0000 56802 +++ vim74/src/proto/regexp.pro 2014-0 6-01 00:43:17.660804672+000064122 +++ vim74/src/proto/regexp.pro 2014-07-21 23:33:44.156788803 +0000 56803 64123 @@ -10,6 +10,7 @@ 56804 64124 int vim_regsub __ARGS((regmatch_T *rmp, char_u *source, char_u *dest, int copy, int magic, int backslash)); … … 56811 64131 diff -Naur vim74.orig/src/proto/spell.pro vim74/src/proto/spell.pro 56812 64132 --- vim74.orig/src/proto/spell.pro 2013-08-10 11:37:26.000000000 +0000 56813 +++ vim74/src/proto/spell.pro 2014-0 6-01 00:43:17.687471271+000064133 +++ vim74/src/proto/spell.pro 2014-07-21 23:33:44.173455426 +0000 56814 64134 @@ -3,6 +3,7 @@ 56815 64135 int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, hlf_T *attrp)); … … 56822 64142 diff -Naur vim74.orig/src/proto/term.pro vim74/src/proto/term.pro 56823 64143 --- vim74.orig/src/proto/term.pro 2013-08-10 11:37:28.000000000 +0000 56824 +++ vim74/src/proto/term.pro 2014-0 6-01 00:43:17.707471220+000056825 @@ -34,8 +34, 9@@64144 +++ vim74/src/proto/term.pro 2014-07-21 23:33:44.200122023 +0000 64145 @@ -34,8 +34,10 @@ 56826 64146 void settmode __ARGS((int tmode)); 56827 64147 void starttermcap __ARGS((void)); 56828 64148 void stoptermcap __ARGS((void)); 56829 64149 +int did_request_esc_sequence __ARGS((void)); 64150 +void resume_get_esc_sequence __ARGS((void)); 56830 64151 void may_req_termresponse __ARGS((void)); 56831 64152 -void may_req_ambiguous_character_width __ARGS((void)); … … 56836 64157 diff -Naur vim74.orig/src/proto/winclip.pro vim74/src/proto/winclip.pro 56837 64158 --- vim74.orig/src/proto/winclip.pro 2013-08-10 11:37:39.000000000 +0000 56838 +++ vim74/src/proto/winclip.pro 2014-0 6-01 00:43:17.754137768+000064159 +++ vim74/src/proto/winclip.pro 2014-07-21 23:33:44.260121866 +0000 56839 64160 @@ -11,4 +11,5 @@ 56840 64161 short_u *enc_to_utf16 __ARGS((char_u *str, int *lenp)); … … 56845 64166 diff -Naur vim74.orig/src/proto/window.pro vim74/src/proto/window.pro 56846 64167 --- vim74.orig/src/proto/window.pro 2013-08-10 11:37:30.000000000 +0000 56847 +++ vim74/src/proto/window.pro 2014-0 6-01 00:43:17.764137742+000064168 +++ vim74/src/proto/window.pro 2014-07-21 23:33:44.273455165 +0000 56848 64169 @@ -9,7 +9,7 @@ 56849 64170 void win_equal __ARGS((win_T *next_curwin, int current, int dir)); … … 56855 64176 void win_free_all __ARGS((void)); 56856 64177 win_T *winframe_remove __ARGS((win_T *win, int *dirp, tabpage_T *tp)); 64178 @@ -75,7 +75,7 @@ 64179 void switch_buffer __ARGS((buf_T **save_curbuf, buf_T *buf)); 64180 void restore_buffer __ARGS((buf_T *save_curbuf)); 64181 int win_hasvertsplit __ARGS((void)); 64182 -int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id)); 64183 +int match_add __ARGS((win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos)); 64184 int match_delete __ARGS((win_T *wp, int id, int perr)); 64185 void clear_matches __ARGS((win_T *wp)); 64186 matchitem_T *get_match __ARGS((win_T *wp, int id)); 56857 64187 diff -Naur vim74.orig/src/quickfix.c vim74/src/quickfix.c 56858 64188 --- vim74.orig/src/quickfix.c 2013-07-01 19:16:44.000000000 +0000 56859 +++ vim74/src/quickfix.c 2014-0 6-01 00:43:17.804137640+000064189 +++ vim74/src/quickfix.c 2014-07-21 23:33:44.323455035 +0000 56860 64190 @@ -751,7 +751,10 @@ 56861 64191 fmt_start = fmt_ptr; … … 56904 64234 diff -Naur vim74.orig/src/regexp.c vim74/src/regexp.c 56905 64235 --- vim74.orig/src/regexp.c 2013-08-01 16:31:30.000000000 +0000 56906 +++ vim74/src/regexp.c 2014-0 6-01 00:43:17.820804264+000064236 +++ vim74/src/regexp.c 2014-07-21 23:33:44.396788177 +0000 56907 64237 @@ -244,6 +244,7 @@ 56908 64238 … … 56924 64254 * branch which matches nothing. */ 56925 64255 case '[': 56926 @@ -3709,25 +3714,28 @@ 64256 @@ -3104,15 +3109,25 @@ 64257 if (reg_magic >= MAGIC_OFF) 64258 { 64259 char_u *p = regparse + 1; 64260 + int is_magic_all = (reg_magic == MAGIC_ALL); 64261 64262 - /* ignore \c \C \m and \M after '$' */ 64263 + /* ignore \c \C \m \M \v \V and \Z after '$' */ 64264 while (p[0] == '\\' && (p[1] == 'c' || p[1] == 'C' 64265 - || p[1] == 'm' || p[1] == 'M' || p[1] == 'Z')) 64266 + || p[1] == 'm' || p[1] == 'M' 64267 + || p[1] == 'v' || p[1] == 'V' || p[1] == 'Z')) 64268 + { 64269 + if (p[1] == 'v') 64270 + is_magic_all = TRUE; 64271 + else if (p[1] == 'm' || p[1] == 'M' || p[1] == 'V') 64272 + is_magic_all = FALSE; 64273 p += 2; 64274 + } 64275 if (p[0] == NUL 64276 || (p[0] == '\\' 64277 && (p[1] == '|' || p[1] == '&' || p[1] == ')' 64278 || p[1] == 'n')) 64279 + || (is_magic_all 64280 + && (p[0] == '|' || p[0] == '&' || p[0] == ')')) 64281 || reg_magic == MAGIC_ALL) 64282 curchr = Magic('$'); 64283 } 64284 @@ -3709,53 +3724,28 @@ 56927 64285 /* TRUE if using multi-line regexp. */ 56928 64286 #define REG_MULTI (reg_match == NULL) … … 56942 64300 static int 56943 64301 -bt_regexec(rmp, line, col) 56944 +bt_regexec_nl(rmp, line, col, line_lbr) 56945 regmatch_T *rmp; 56946 char_u *line; /* string to match against */ 56947 colnr_T col; /* column to start looking for match */ 56948 + int line_lbr; 56949 { 56950 reg_match = rmp; 56951 reg_mmatch = NULL; 56952 reg_maxline = 0; 64302 - regmatch_T *rmp; 64303 - char_u *line; /* string to match against */ 64304 - colnr_T col; /* column to start looking for match */ 64305 -{ 64306 - reg_match = rmp; 64307 - reg_mmatch = NULL; 64308 - reg_maxline = 0; 56953 64309 - reg_line_lbr = FALSE; 56954 + reg_line_lbr = line_lbr; 56955 reg_buf = curbuf; 56956 reg_win = NULL; 56957 ireg_ic = rmp->rm_ic; 56958 @@ -3738,35 +3746,6 @@ 56959 return (bt_regexec_both(line, col, NULL) != 0); 56960 } 56961 64310 - reg_buf = curbuf; 64311 - reg_win = NULL; 64312 - ireg_ic = rmp->rm_ic; 64313 -#ifdef FEAT_MBYTE 64314 - ireg_icombine = FALSE; 64315 -#endif 64316 - ireg_maxcol = 0; 64317 - return (bt_regexec_both(line, col, NULL) != 0); 64318 -} 64319 - 56962 64320 -#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ 56963 64321 - || defined(FIND_REPLACE_DIALOG) || defined(PROTO) … … 56970 64328 - static int 56971 64329 -bt_regexec_nl(rmp, line, col) 56972 - regmatch_T *rmp; 56973 - char_u *line; /* string to match against */ 56974 - colnr_T col; /* column to start looking for match */ 56975 -{ 56976 - reg_match = rmp; 56977 - reg_mmatch = NULL; 56978 - reg_maxline = 0; 64330 +bt_regexec_nl(rmp, line, col, line_lbr) 64331 regmatch_T *rmp; 64332 char_u *line; /* string to match against */ 64333 colnr_T col; /* column to start looking for match */ 64334 + int line_lbr; 64335 { 64336 reg_match = rmp; 64337 reg_mmatch = NULL; 64338 reg_maxline = 0; 56979 64339 - reg_line_lbr = TRUE; 56980 - reg_buf = curbuf; 56981 - reg_win = NULL; 56982 - ireg_ic = rmp->rm_ic; 56983 -#ifdef FEAT_MBYTE 56984 - ireg_icombine = FALSE; 64340 + reg_line_lbr = line_lbr; 64341 reg_buf = curbuf; 64342 reg_win = NULL; 64343 ireg_ic = rmp->rm_ic; 64344 @@ -3765,7 +3755,6 @@ 64345 ireg_maxcol = 0; 64346 return (bt_regexec_both(line, col, NULL) != 0); 64347 } 56985 64348 -#endif 56986 - ireg_maxcol = 0; 56987 - return (bt_regexec_both(line, col, NULL) != 0); 56988 -} 56989 -#endif 56990 - 64349 56991 64350 static long bt_regexec_multi __ARGS((regmmatch_T *rmp, win_T *win, buf_T *buf, linenr_T lnum, colnr_T col, proftime_T *tm)); 56992 64351 56993 /* 56994 @@ -4146,7 +4125,8 @@ 64352 @@ -4146,7 +4135,8 @@ 56995 64353 { 56996 64354 /* Only accept single line matches. */ … … 57002 64360 vim_strnsave(reg_getline(reg_startzpos[i].lnum) 57003 64361 + reg_startzpos[i].col, 57004 @@ -4179,9 +41 59,8 @@64362 @@ -4179,9 +4169,8 @@ 57005 64363 - (*mb_head_off)(regline, reginput - 1), reg_buf); 57006 64364 return -1; … … 57013 64371 57014 64372 /* 57015 @@ -4258,7 +42 37,6 @@64373 @@ -4258,7 +4247,6 @@ 57016 64374 } 57017 64375 return TRUE; … … 57021 64379 #define ADVANCE_REGINPUT() mb_ptr_adv(reginput) 57022 64380 57023 @@ -4311,8 +42 89,8 @@64381 @@ -4311,8 +4299,8 @@ 57024 64382 */ 57025 64383 for (;;) … … 57032 64390 57033 64391 #ifdef DEBUG 57034 @@ -4440,9 +44 18,7 @@64392 @@ -4440,9 +4428,7 @@ 57035 64393 break; 57036 64394 … … 57042 64400 break; 57043 64401 57044 @@ -4721,31 +4 697,39 @@64402 @@ -4721,31 +4707,39 @@ 57045 64403 /* match empty string always works; happens when "~" is 57046 64404 * empty. */ … … 57096 64454 } 57097 64455 } 57098 @@ -4814,6 +4 798,16 @@64456 @@ -4814,6 +4808,16 @@ 57099 64457 status = RA_NOMATCH; 57100 64458 break; … … 57113 64471 case NOTHING: 57114 64472 break; 57115 @@ -6455,7 +64 49,8 @@64473 @@ -6455,7 +6459,8 @@ 57116 64474 /* 57117 64475 * Check whether a backreference matches. … … 57123 64481 static int 57124 64482 match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen) 57125 @@ -6511,6 +65 06,8 @@64483 @@ -6511,6 +6516,8 @@ 57126 64484 57127 64485 /* Advance to next line. */ … … 57132 64490 ccol = 0; 57133 64491 if (got_int) 57134 @@ -7381,6 +73 78,7 @@64492 @@ -7381,6 +7388,7 @@ 57135 64493 reg_mmatch = NULL; 57136 64494 reg_maxline = 0; … … 57140 64498 } 57141 64499 #endif 57142 @@ -7400,6 +7 398,7 @@64500 @@ -7400,6 +7408,7 @@ 57143 64501 reg_buf = curbuf; /* always works on the current buffer! */ 57144 64502 reg_firstlnum = lnum; … … 57148 64506 } 57149 64507 57150 @@ -7898,17 +7 897,92 @@64508 @@ -7898,17 +7907,92 @@ 57151 64509 57152 64510 return retval; … … 57245 64603 #ifdef DEBUG 57246 64604 ,(char_u *)"" 57247 @@ -7922,11 + 7996,7 @@64605 @@ -7922,11 +8006,7 @@ 57248 64606 { 57249 64607 nfa_regcomp, … … 57257 64615 #ifdef DEBUG 57258 64616 ,(char_u *)"" 57259 @@ -7975,8 +80 45,8 @@64617 @@ -7975,8 +8055,8 @@ 57260 64618 regexp_engine = expr[4] - '0'; 57261 64619 expr += 5; … … 57268 64626 } 57269 64627 else 57270 @@ -8016,12 +80 86,11 @@64628 @@ -8016,12 +8096,11 @@ 57271 64629 } 57272 64630 #endif … … 57284 64642 57285 64643 return prog; 57286 @@ -8051,7 +81 20,7 @@64644 @@ -8051,7 +8130,7 @@ 57287 64645 char_u *line; /* string to match against */ 57288 64646 colnr_T col; /* column to start looking for match */ … … 57293 64651 57294 64652 #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \ 57295 @@ -8065,7 +81 34,7 @@64653 @@ -8065,7 +8144,7 @@ 57296 64654 char_u *line; 57297 64655 colnr_T col; … … 57304 64662 diff -Naur vim74.orig/src/regexp.h vim74/src/regexp.h 57305 64663 --- vim74.orig/src/regexp.h 2013-06-11 08:53:14.000000000 +0000 57306 +++ vim74/src/regexp.h 2014-0 6-01 00:43:17.844137538+000064664 +++ vim74/src/regexp.h 2014-07-21 23:33:44.400121501 +0000 57307 64665 @@ -149,11 +149,7 @@ 57308 64666 { … … 57320 64678 diff -Naur vim74.orig/src/regexp_nfa.c vim74/src/regexp_nfa.c 57321 64679 --- vim74.orig/src/regexp_nfa.c 2013-08-01 16:27:51.000000000 +0000 57322 +++ vim74/src/regexp_nfa.c 2014-0 6-01 00:43:17.864137487+000064680 +++ vim74/src/regexp_nfa.c 2014-07-21 23:33:44.493454591 +0000 57323 64681 @@ -29,11 +29,14 @@ 57324 64682 # define NFA_REGEXP_DEBUG_LOG "nfa_regexp_debug.log" … … 58541 65899 diff -Naur vim74.orig/src/screen.c vim74/src/screen.c 58542 65900 --- vim74.orig/src/screen.c 2013-07-13 10:23:00.000000000 +0000 58543 +++ vim74/src/screen.c 2014-0 6-01 00:43:17.884137436+000065901 +++ vim74/src/screen.c 2014-07-21 23:33:44.550121110 +0000 58544 65902 @@ -42,7 +42,7 @@ 58545 65903 * … … 58551 65909 * - w_skipcol (skipped window cells of first line) 58552 65910 * 58553 @@ -446,8 +446,6 @@ 65911 @@ -139,12 +139,13 @@ 65912 static void redraw_custom_statusline __ARGS((win_T *wp)); 65913 #endif 65914 #ifdef FEAT_SEARCH_EXTRA 65915 -#define SEARCH_HL_PRIORITY 0 65916 +# define SEARCH_HL_PRIORITY 0 65917 static void start_search_hl __ARGS((void)); 65918 static void end_search_hl __ARGS((void)); 65919 static void init_search_hl __ARGS((win_T *wp)); 65920 static void prepare_search_hl __ARGS((win_T *wp, linenr_T lnum)); 65921 -static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol)); 65922 +static void next_search_hl __ARGS((win_T *win, match_T *shl, linenr_T lnum, colnr_T mincol, matchitem_T *cur)); 65923 +static int next_search_hl_pos __ARGS((match_T *shl, linenr_T lnum, posmatch_T *pos, colnr_T mincol)); 65924 #endif 65925 static void screen_start_highlight __ARGS((int attr)); 65926 static void screen_char __ARGS((unsigned off, int row, int col)); 65927 @@ -446,8 +447,6 @@ 58554 65928 #endif 58555 65929 } … … 58560 65934 * update all windows that are editing the current buffer 58561 65935 */ 58562 @@ -458,7 +45 6,6 @@65936 @@ -458,7 +457,6 @@ 58563 65937 redraw_curbuf_later(type); 58564 65938 update_screen(type); … … 58568 65942 /* 58569 65943 * update_screen() 58570 @@ -596,14 +59 3,12 @@65944 @@ -596,14 +594,12 @@ 58571 65945 && curwin->w_botfill == curwin->w_old_botfill 58572 65946 #endif … … 58583 65957 curwin->w_redr_type = type; 58584 65958 58585 @@ -1030,10 +102 5,8 @@65959 @@ -1030,10 +1026,8 @@ 58586 65960 updating. 0 when no mid area updating. */ 58587 65961 int bot_start = 999;/* first row of the bot area that needs … … 58594 65968 matchitem_T *cur; /* points to the match list */ 58595 65969 int top_to_mod = FALSE; /* redraw above mod_top */ 58596 @@ -1354,9 +134 7,7 @@65970 @@ -1354,9 +1348,7 @@ 58597 65971 /* Need to update rows that are new, stop at the 58598 65972 * first one that scrolled down. */ … … 58604 65978 /* Move the entries that were scrolled, disable 58605 65979 * the entries for the lines to be redrawn. */ 58606 @@ -1513,7 +150 4,6 @@65980 @@ -1513,7 +1505,6 @@ 58607 65981 type = NOT_VALID; 58608 65982 } … … 58612 65986 if ((VIsual_active && buf == curwin->w_buffer) 58613 65987 || (wp->w_old_cursor_lnum != 0 && type != NOT_VALID)) 58614 @@ -1708,7 +169 8,6 @@65988 @@ -1708,7 +1699,6 @@ 58615 65989 wp->w_old_visual_lnum = 0; 58616 65990 wp->w_old_visual_col = 0; … … 58620 65994 #if defined(FEAT_SYN_HL) || defined(FEAT_SEARCH_EXTRA) 58621 65995 /* reset got_int, otherwise regexp won't work */ 58622 @@ -2467,8 +2456,8 @@ 65996 @@ -1779,8 +1769,10 @@ 65997 syntax_check_changed(lnum))) 65998 #endif 65999 #ifdef FEAT_SEARCH_EXTRA 66000 - /* match in fixed position might need redraw */ 66001 - || wp->w_match_head != NULL 66002 + /* match in fixed position might need redraw 66003 + * if lines were inserted or deleted */ 66004 + || (wp->w_match_head != NULL 66005 + && buf->b_mod_xlines != 0) 66006 #endif 66007 ))))) 66008 { 66009 @@ -2467,8 +2459,8 @@ 58623 66010 if (len > 0) 58624 66011 { … … 58631 66018 if (len > w + 1) 58632 66019 len = w + 1; 58633 @@ -2670,7 +26 59,6 @@66020 @@ -2670,7 +2662,6 @@ 58634 66021 * 6. set highlighting for the Visual area an other text. 58635 66022 * If all folded lines are in the Visual area, highlight the line. … … 58639 66026 { 58640 66027 if (ltoreq(curwin->w_cursor, VIsual)) 58641 @@ -2718,7 +270 6,6 @@66028 @@ -2718,7 +2709,6 @@ 58642 66029 } 58643 66030 } … … 58647 66034 #ifdef FEAT_SYN_HL 58648 66035 /* Show 'cursorcolumn' in the fold line. */ 58649 @@ -2876,10 +2863,8 @@ 66036 @@ -2853,6 +2843,7 @@ 66037 char_u extra[18]; /* "%ld" and 'fdc' must fit in here */ 66038 int n_extra = 0; /* number of extra chars */ 66039 char_u *p_extra = NULL; /* string of extra chars, plus NUL */ 66040 + char_u *p_extra_free = NULL; /* p_extra needs to be freed */ 66041 int c_extra = NUL; /* extra chars, all the same */ 66042 int extra_attr = 0; /* attributes when n_extra != 0 */ 66043 static char_u *at_end_str = (char_u *)""; /* used for p_extra when 66044 @@ -2876,10 +2867,8 @@ 58650 66045 int fromcol, tocol; /* start/end of inverting */ 58651 66046 int fromcol_prev = -2; /* start of inverting after cursor */ … … 58658 66053 long v; 58659 66054 58660 @@ -3090,7 +3075,6 @@ 66055 @@ -2944,6 +2933,8 @@ 66056 match_T *shl; /* points to search_hl or a match */ 66057 int shl_flag; /* flag to indicate whether search_hl 66058 has been processed or not */ 66059 + int pos_inprogress; /* marks that position match search is 66060 + in progress */ 66061 int prevcol_hl_flag; /* flag to indicate whether prevcol 66062 equals startcol of search_hl or one 66063 of the matches */ 66064 @@ -2974,10 +2965,15 @@ 66065 # define WL_SIGN WL_FOLD /* column for signs */ 66066 #endif 66067 #define WL_NR WL_SIGN + 1 /* line number */ 66068 +#ifdef FEAT_LINEBREAK 66069 +# define WL_BRI WL_NR + 1 /* 'breakindent' */ 66070 +#else 66071 +# define WL_BRI WL_NR 66072 +#endif 66073 #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF) 66074 -# define WL_SBR WL_NR + 1 /* 'showbreak' or 'diff' */ 66075 +# define WL_SBR WL_BRI + 1 /* 'showbreak' or 'diff' */ 66076 #else 66077 -# define WL_SBR WL_NR 66078 +# define WL_SBR WL_BRI 66079 #endif 66080 #define WL_LINE WL_SBR + 1 /* text in the line */ 66081 int draw_state = WL_START; /* what to draw next */ 66082 @@ -3090,7 +3086,6 @@ 58661 66083 */ 58662 66084 fromcol = -10; … … 58666 66088 { 58667 66089 /* Visual is after curwin->w_cursor */ 58668 @@ -3183,9 +31 67,7 @@66090 @@ -3183,9 +3178,7 @@ 58669 66091 /* 58670 66092 * handle 'incsearch' and ":s///c" highlighting … … 58677 66099 && lnum >= curwin->w_cursor.lnum 58678 66100 && lnum <= curwin->w_cursor.lnum + search_match_lines) 58679 @@ -3324,7 +3306,6 @@ 66101 @@ -3316,7 +3309,7 @@ 66102 #endif 66103 while (vcol < v && *ptr != NUL) 66104 { 66105 - c = win_lbr_chartabsize(wp, ptr, (colnr_T)vcol, NULL); 66106 + c = win_lbr_chartabsize(wp, line, ptr, (colnr_T)vcol, NULL); 66107 vcol += c; 66108 #ifdef FEAT_MBYTE 66109 prev_ptr = ptr; 66110 @@ -3324,7 +3317,6 @@ 58680 66111 mb_ptr_adv(ptr); 58681 66112 } … … 58685 66116 * - 'cuc' is set, or 58686 66117 * - 'colorcolumn' is set, or 58687 @@ -3333,27 +33 14,16 @@66118 @@ -3333,27 +3325,16 @@ 58688 66119 * the end of the line may be before the start of the displayed part. 58689 66120 */ … … 58720 66151 /* Handle a character that's not completely on the screen: Put ptr at 58721 66152 * that character but skip the first few screen characters. */ 58722 @@ -3583,11 +3553,7 @@ 66153 @@ -3469,44 +3450,43 @@ 66154 shl->startcol = MAXCOL; 66155 shl->endcol = MAXCOL; 66156 shl->attr_cur = 0; 66157 - if (shl->rm.regprog != NULL) 66158 - { 66159 - v = (long)(ptr - line); 66160 - next_search_hl(wp, shl, lnum, (colnr_T)v); 66161 + v = (long)(ptr - line); 66162 + if (cur != NULL) 66163 + cur->pos.cur = 0; 66164 + next_search_hl(wp, shl, lnum, (colnr_T)v, cur); 66165 66166 - /* Need to get the line again, a multi-line regexp may have made it 66167 - * invalid. */ 66168 - line = ml_get_buf(wp->w_buffer, lnum, FALSE); 66169 - ptr = line + v; 66170 + /* Need to get the line again, a multi-line regexp may have made it 66171 + * invalid. */ 66172 + line = ml_get_buf(wp->w_buffer, lnum, FALSE); 66173 + ptr = line + v; 66174 66175 - if (shl->lnum != 0 && shl->lnum <= lnum) 66176 + if (shl->lnum != 0 && shl->lnum <= lnum) 66177 + { 66178 + if (shl->lnum == lnum) 66179 + shl->startcol = shl->rm.startpos[0].col; 66180 + else 66181 + shl->startcol = 0; 66182 + if (lnum == shl->lnum + shl->rm.endpos[0].lnum 66183 + - shl->rm.startpos[0].lnum) 66184 + shl->endcol = shl->rm.endpos[0].col; 66185 + else 66186 + shl->endcol = MAXCOL; 66187 + /* Highlight one character for an empty match. */ 66188 + if (shl->startcol == shl->endcol) 66189 { 66190 - if (shl->lnum == lnum) 66191 - shl->startcol = shl->rm.startpos[0].col; 66192 - else 66193 - shl->startcol = 0; 66194 - if (lnum == shl->lnum + shl->rm.endpos[0].lnum 66195 - - shl->rm.startpos[0].lnum) 66196 - shl->endcol = shl->rm.endpos[0].col; 66197 - else 66198 - shl->endcol = MAXCOL; 66199 - /* Highlight one character for an empty match. */ 66200 - if (shl->startcol == shl->endcol) 66201 - { 66202 #ifdef FEAT_MBYTE 66203 - if (has_mbyte && line[shl->endcol] != NUL) 66204 - shl->endcol += (*mb_ptr2len)(line + shl->endcol); 66205 - else 66206 + if (has_mbyte && line[shl->endcol] != NUL) 66207 + shl->endcol += (*mb_ptr2len)(line + shl->endcol); 66208 + else 66209 #endif 66210 - ++shl->endcol; 66211 - } 66212 - if ((long)shl->startcol < v) /* match at leftcol */ 66213 - { 66214 - shl->attr_cur = shl->attr; 66215 - search_attr = shl->attr; 66216 - } 66217 - area_highlighting = TRUE; 66218 + ++shl->endcol; 66219 + } 66220 + if ((long)shl->startcol < v) /* match at leftcol */ 66221 + { 66222 + shl->attr_cur = shl->attr; 66223 + search_attr = shl->attr; 66224 } 66225 + area_highlighting = TRUE; 66226 } 66227 if (shl != &search_hl && cur != NULL) 66228 cur = cur->next; 66229 @@ -3518,7 +3498,7 @@ 66230 * when Visual mode is active, because it's not clear what is selected 66231 * then. */ 66232 if (wp->w_p_cul && lnum == wp->w_cursor.lnum 66233 - && !(wp == curwin && VIsual_active)) 66234 + && !(wp == curwin && VIsual_active)) 66235 { 66236 line_attr = hl_attr(HLF_CUL); 66237 area_highlighting = TRUE; 66238 @@ -3583,11 +3563,7 @@ 58723 66239 draw_state = WL_SIGN; 58724 66240 /* Show the sign column when there are any signs in this … … 58733 66249 int text_sign; 58734 66250 # ifdef FEAT_SIGN_ICONS 58735 @@ -3599,7 +35 65,11 @@66251 @@ -3599,7 +3575,11 @@ 58736 66252 char_attr = hl_attr(HLF_SC); 58737 66253 n_extra = 2; … … 58746 66262 text_sign = buf_getsigntype(wp->w_buffer, lnum, 58747 66263 SIGN_TEXT); 58748 @@ -4500,9 +4470,7 @@ 66264 @@ -3698,6 +3678,44 @@ 66265 } 66266 } 66267 66268 +#ifdef FEAT_LINEBREAK 66269 + if (wp->w_p_brisbr && draw_state == WL_BRI - 1 66270 + && n_extra == 0 && *p_sbr != NUL) 66271 + /* draw indent after showbreak value */ 66272 + draw_state = WL_BRI; 66273 + else if (wp->w_p_brisbr && draw_state == WL_SBR && n_extra == 0) 66274 + /* After the showbreak, draw the breakindent */ 66275 + draw_state = WL_BRI - 1; 66276 + 66277 + /* draw 'breakindent': indent wrapped text accordingly */ 66278 + if (draw_state == WL_BRI - 1 && n_extra == 0) 66279 + { 66280 + draw_state = WL_BRI; 66281 +# ifdef FEAT_DIFF 66282 +# endif 66283 + if (wp->w_p_bri && n_extra == 0 && row != startrow 66284 +#ifdef FEAT_DIFF 66285 + && filler_lines == 0 66286 +#endif 66287 + ) 66288 + { 66289 + char_attr = 0; /* was: hl_attr(HLF_AT); */ 66290 +#ifdef FEAT_DIFF 66291 + if (diff_hlf != (hlf_T)0) 66292 + char_attr = hl_attr(diff_hlf); 66293 +#endif 66294 + p_extra = NULL; 66295 + c_extra = ' '; 66296 + n_extra = get_breakindent_win(wp, 66297 + ml_get_buf(wp->w_buffer, lnum, FALSE)); 66298 + /* Correct end of highlighted area for 'breakindent', 66299 + * required when 'linebreak' is also set. */ 66300 + if (tocol == vcol) 66301 + tocol += n_extra; 66302 + } 66303 + } 66304 +#endif 66305 + 66306 #if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF) 66307 if (draw_state == WL_SBR - 1 && n_extra == 0) 66308 { 66309 @@ -3822,7 +3840,11 @@ 66310 } 66311 else 66312 shl = &cur->hl; 66313 - while (shl->rm.regprog != NULL) 66314 + if (cur != NULL) 66315 + cur->pos.cur = 0; 66316 + pos_inprogress = TRUE; 66317 + while (shl->rm.regprog != NULL 66318 + || (cur != NULL && pos_inprogress)) 66319 { 66320 if (shl->startcol != MAXCOL 66321 && v >= (long)shl->startcol 66322 @@ -3830,11 +3852,12 @@ 66323 { 66324 shl->attr_cur = shl->attr; 66325 } 66326 - else if (v == (long)shl->endcol) 66327 + else if (v >= (long)shl->endcol) 66328 { 66329 shl->attr_cur = 0; 66330 - 66331 - next_search_hl(wp, shl, lnum, (colnr_T)v); 66332 + next_search_hl(wp, shl, lnum, (colnr_T)v, cur); 66333 + pos_inprogress = cur == NULL || cur->pos.cur == 0 66334 + ? FALSE : TRUE; 66335 66336 /* Need to get the line again, a multi-line regexp 66337 * may have made it invalid. */ 66338 @@ -4031,6 +4054,11 @@ 66339 } 66340 else 66341 { 66342 + if (p_extra_free != NULL) 66343 + { 66344 + vim_free(p_extra_free); 66345 + p_extra_free = NULL; 66346 + } 66347 /* 66348 * Get a character from the line itself. 66349 */ 66350 @@ -4402,14 +4430,16 @@ 66351 /* 66352 * Found last space before word: check for line break. 66353 */ 66354 - if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr) 66355 - && !wp->w_p_list) 66356 + if (wp->w_p_lbr && vim_isbreak(c) && !vim_isbreak(*ptr)) 66357 { 66358 - n_extra = win_lbr_chartabsize(wp, ptr - ( 66359 + char_u *p = ptr - ( 66360 # ifdef FEAT_MBYTE 66361 has_mbyte ? mb_l : 66362 # endif 66363 - 1), (colnr_T)vcol, NULL) - 1; 66364 + 1); 66365 + /* TODO: is passing p for start of the line OK? */ 66366 + n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol, 66367 + NULL) - 1; 66368 c_extra = ' '; 66369 if (vim_iswhite(c)) 66370 { 66371 @@ -4418,7 +4448,8 @@ 66372 /* See "Tab alignment" below. */ 66373 FIX_FOR_BOGUSCOLS; 66374 #endif 66375 - c = ' '; 66376 + if (!wp->w_p_list) 66377 + c = ' '; 66378 } 66379 } 66380 #endif 66381 @@ -4458,9 +4489,50 @@ 66382 */ 66383 if (c == TAB && (!wp->w_p_list || lcs_tab1)) 66384 { 66385 + int tab_len = 0; 66386 /* tab amount depends on current column */ 66387 - n_extra = (int)wp->w_buffer->b_p_ts 66388 + tab_len = (int)wp->w_buffer->b_p_ts 66389 - vcol % (int)wp->w_buffer->b_p_ts - 1; 66390 +#ifdef FEAT_LINEBREAK 66391 + if (!wp->w_p_lbr) 66392 +#endif 66393 + /* tab amount depends on current column */ 66394 + n_extra = tab_len; 66395 +#ifdef FEAT_LINEBREAK 66396 + else 66397 + { 66398 + char_u *p; 66399 + int len = n_extra; 66400 + int i; 66401 + int saved_nextra = n_extra; 66402 + 66403 + /* if n_extra > 0, it gives the number of chars, to 66404 + * use for a tab, else we need to calculate the width 66405 + * for a tab */ 66406 +#ifdef FEAT_MBYTE 66407 + len = (tab_len * mb_char2len(lcs_tab2)); 66408 + if (n_extra > 0) 66409 + len += n_extra - tab_len; 66410 +#endif 66411 + c = lcs_tab1; 66412 + p = alloc((unsigned)(len + 1)); 66413 + vim_memset(p, ' ', len); 66414 + p[len] = NUL; 66415 + p_extra_free = p; 66416 + for (i = 0; i < tab_len; i++) 66417 + { 66418 +#ifdef FEAT_MBYTE 66419 + mb_char2bytes(lcs_tab2, p); 66420 + p += mb_char2len(lcs_tab2); 66421 + n_extra += mb_char2len(lcs_tab2) 66422 + - (saved_nextra > 0 ? 1 : 0); 66423 +#else 66424 + p[i] = lcs_tab2; 66425 +#endif 66426 + } 66427 + p_extra = p_extra_free; 66428 + } 66429 +#endif 66430 #ifdef FEAT_CONCEAL 66431 /* Tab alignment should be identical regardless of 66432 * 'conceallevel' value. So tab compensates of all 66433 @@ -4476,8 +4548,13 @@ 66434 if (wp->w_p_list) 66435 { 66436 c = lcs_tab1; 66437 - c_extra = lcs_tab2; 66438 - n_attr = n_extra + 1; 66439 +#ifdef FEAT_LINEBREAK 66440 + if (wp->w_p_lbr) 66441 + c_extra = NUL; /* using p_extra from above */ 66442 + else 66443 +#endif 66444 + c_extra = lcs_tab2; 66445 + n_attr = tab_len + 1; 66446 extra_attr = hl_attr(HLF_8); 66447 saved_attr2 = char_attr; /* save current attr */ 66448 #ifdef FEAT_MBYTE 66449 @@ -4500,9 +4577,7 @@ 58749 66450 && ((wp->w_p_list && lcs_eol > 0) 58750 66451 || ((fromcol >= 0 || fromcol_prev >= 0) … … 58756 66457 # ifdef FEAT_RIGHTLEFT 58757 66458 wp->w_p_rl ? (col >= 0) : 58758 @@ -4854,11 +4822,9 @@ 66459 @@ -4571,13 +4646,31 @@ 66460 else if (c != NUL) 66461 { 66462 p_extra = transchar(c); 66463 + if (n_extra == 0) 66464 + n_extra = byte2cells(c) - 1; 66465 #ifdef FEAT_RIGHTLEFT 66466 if ((dy_flags & DY_UHEX) && wp->w_p_rl) 66467 rl_mirror(p_extra); /* reverse "<12>" */ 66468 #endif 66469 - n_extra = byte2cells(c) - 1; 66470 c_extra = NUL; 66471 - c = *p_extra++; 66472 +#ifdef FEAT_LINEBREAK 66473 + if (wp->w_p_lbr) 66474 + { 66475 + char_u *p; 66476 + 66477 + c = *p_extra; 66478 + p = alloc((unsigned)n_extra + 1); 66479 + vim_memset(p, ' ', n_extra); 66480 + STRNCPY(p, p_extra + 1, STRLEN(p_extra) - 1); 66481 + p[n_extra] = NUL; 66482 + p_extra_free = p_extra = p; 66483 + } 66484 + else 66485 +#endif 66486 + { 66487 + n_extra = byte2cells(c) - 1; 66488 + c = *p_extra++; 66489 + } 66490 if (!attr_pri) 66491 { 66492 n_attr = n_extra + 1; 66493 @@ -4854,11 +4947,9 @@ 58759 66494 #endif 58760 66495 if (lcs_eol == lcs_eol_one … … 58768 66503 #ifdef FEAT_SEARCH_EXTRA 58769 66504 /* highlight 'hlsearch' match at end of line */ 58770 @@ -6653,6 +6 619,7 @@66505 @@ -6653,6 +6744,7 @@ 58771 66506 win_T *wp; 58772 66507 int draw_ruler; /* TRUE or FALSE */ … … 58776 66511 int curattr; 58777 66512 int row; 58778 @@ -6671,6 +6 638,13 @@66513 @@ -6671,6 +6763,13 @@ 58779 66514 win_T *ewp; 58780 66515 int p_crb_save; … … 58790 66525 if (wp == NULL) 58791 66526 { 58792 @@ -6746,7 +6 720,7 @@66527 @@ -6746,7 +6845,7 @@ 58793 66528 } 58794 66529 … … 58799 66534 /* Temporarily reset 'cursorbind', we don't want a side effect from moving 58800 66535 * the cursor away and back. */ 58801 @@ -6827,6 +6 801,9 @@66536 @@ -6827,6 +6926,9 @@ 58802 66537 while (col < Columns) 58803 66538 TabPageIdxs[col++] = fillchar; … … 58809 66544 58810 66545 #endif /* FEAT_STL_OPT */ 58811 @@ -6939,15 + 6916,16 @@66546 @@ -6939,15 +7041,16 @@ 58812 66547 * a NUL. 58813 66548 */ … … 58828 66563 #ifdef FEAT_MBYTE 58829 66564 unsigned max_off; 58830 @@ -7192,7 +7 170,11 @@66565 @@ -7192,7 +7295,11 @@ 58831 66566 col += mbyte_cells; 58832 66567 ptr += mbyte_blen; … … 58840 66575 else 58841 66576 #endif 58842 @@ -7447,7 +7429,7 @@ 66577 @@ -7295,6 +7402,8 @@ 66578 match_T *shl; /* points to search_hl or a match */ 66579 int shl_flag; /* flag to indicate whether search_hl 66580 has been processed or not */ 66581 + int pos_inprogress; /* marks that position match search is 66582 + in progress */ 66583 int n; 66584 66585 /* 66586 @@ -7329,10 +7438,16 @@ 66587 shl->first_lnum = wp->w_topline; 66588 # endif 66589 } 66590 + if (cur != NULL) 66591 + cur->pos.cur = 0; 66592 + pos_inprogress = TRUE; 66593 n = 0; 66594 - while (shl->first_lnum < lnum && shl->rm.regprog != NULL) 66595 + while (shl->first_lnum < lnum && (shl->rm.regprog != NULL 66596 + || (cur != NULL && pos_inprogress))) 58843 66597 { 58844 /* don't free regprog in the match list, it's a copy */ 58845 vim_regfree(shl->rm.regprog); 66598 - next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n); 66599 + next_search_hl(wp, shl, shl->first_lnum, (colnr_T)n, cur); 66600 + pos_inprogress = cur == NULL || cur->pos.cur == 0 66601 + ? FALSE : TRUE; 66602 if (shl->lnum != 0) 66603 { 66604 shl->first_lnum = shl->lnum 66605 @@ -7361,11 +7476,12 @@ 66606 * Careful: Any pointers for buffer lines will become invalid. 66607 */ 66608 static void 66609 -next_search_hl(win, shl, lnum, mincol) 66610 - win_T *win; 66611 - match_T *shl; /* points to search_hl or a match */ 66612 - linenr_T lnum; 66613 - colnr_T mincol; /* minimal column for a match */ 66614 +next_search_hl(win, shl, lnum, mincol, cur) 66615 + win_T *win; 66616 + match_T *shl; /* points to search_hl or a match */ 66617 + linenr_T lnum; 66618 + colnr_T mincol; /* minimal column for a match */ 66619 + matchitem_T *cur; /* to retrieve match positions if any */ 66620 { 66621 linenr_T l; 66622 colnr_T matchcol; 66623 @@ -7433,27 +7549,36 @@ 66624 matchcol = shl->rm.endpos[0].col; 66625 66626 shl->lnum = lnum; 66627 - nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, matchcol, 66628 + if (shl->rm.regprog != NULL) 66629 + { 66630 + nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum, 66631 + matchcol, 66632 #ifdef FEAT_RELTIME 66633 - &(shl->tm) 66634 + &(shl->tm) 66635 #else 66636 - NULL 66637 + NULL 66638 #endif 66639 - ); 66640 - if (called_emsg || got_int) 66641 - { 66642 - /* Error while handling regexp: stop using this regexp. */ 66643 - if (shl == &search_hl) 66644 + ); 66645 + if (called_emsg || got_int) 66646 { 66647 - /* don't free regprog in the match list, it's a copy */ 66648 - vim_regfree(shl->rm.regprog); 58846 66649 - no_hlsearch = TRUE; 58847 + SET_NO_HLSEARCH(TRUE); 66650 + /* Error while handling regexp: stop using this regexp. */ 66651 + if (shl == &search_hl) 66652 + { 66653 + /* don't free regprog in the match list, it's a copy */ 66654 + vim_regfree(shl->rm.regprog); 66655 + SET_NO_HLSEARCH(TRUE); 66656 + } 66657 + shl->rm.regprog = NULL; 66658 + shl->lnum = 0; 66659 + got_int = FALSE; /* avoid the "Type :quit to exit Vim" 66660 + message */ 66661 + break; 58848 66662 } 58849 shl->rm.regprog = NULL; 58850 shl->lnum = 0; 58851 @@ -9648,10 +9630,7 @@ 66663 - shl->rm.regprog = NULL; 66664 - shl->lnum = 0; 66665 - got_int = FALSE; /* avoid the "Type :quit to exit Vim" message */ 66666 - break; 66667 } 66668 + else if (cur != NULL) 66669 + nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol); 66670 + else 66671 + nmatched = 0; 66672 if (nmatched == 0) 66673 { 66674 shl->lnum = 0; /* no match found */ 66675 @@ -7469,6 +7594,62 @@ 66676 } 66677 } 66678 } 66679 + 66680 + static int 66681 +next_search_hl_pos(shl, lnum, posmatch, mincol) 66682 + match_T *shl; /* points to a match */ 66683 + linenr_T lnum; 66684 + posmatch_T *posmatch; /* match positions */ 66685 + colnr_T mincol; /* minimal column for a match */ 66686 +{ 66687 + int i; 66688 + int bot = -1; 66689 + 66690 + shl->lnum = 0; 66691 + for (i = posmatch->cur; i < MAXPOSMATCH; i++) 66692 + { 66693 + if (posmatch->pos[i].lnum == 0) 66694 + break; 66695 + if (posmatch->pos[i].col < mincol) 66696 + continue; 66697 + if (posmatch->pos[i].lnum == lnum) 66698 + { 66699 + if (shl->lnum == lnum) 66700 + { 66701 + /* partially sort positions by column numbers 66702 + * on the same line */ 66703 + if (posmatch->pos[i].col < posmatch->pos[bot].col) 66704 + { 66705 + llpos_T tmp = posmatch->pos[i]; 66706 + 66707 + posmatch->pos[i] = posmatch->pos[bot]; 66708 + posmatch->pos[bot] = tmp; 66709 + } 66710 + } 66711 + else 66712 + { 66713 + bot = i; 66714 + shl->lnum = lnum; 66715 + } 66716 + } 66717 + } 66718 + posmatch->cur = 0; 66719 + if (shl->lnum == lnum) 66720 + { 66721 + colnr_T start = posmatch->pos[bot].col == 0 66722 + ? 0 : posmatch->pos[bot].col - 1; 66723 + colnr_T end = posmatch->pos[bot].col == 0 66724 + ? MAXCOL : start + posmatch->pos[bot].len; 66725 + 66726 + shl->rm.startpos[0].lnum = 0; 66727 + shl->rm.startpos[0].col = start; 66728 + shl->rm.endpos[0].lnum = 0; 66729 + shl->rm.endpos[0].col = end; 66730 + posmatch->cur = bot + 1; 66731 + return TRUE; 66732 + } 66733 + return FALSE; 66734 +} 66735 #endif 66736 66737 static void 66738 @@ -8853,8 +9034,8 @@ 66739 { 66740 if (noinvcurs) 66741 screen_stop_highlight(); 66742 - if (row == screen_cur_row && (col > screen_cur_col) && 66743 - *T_CRI != NUL) 66744 + if (row == screen_cur_row && (col > screen_cur_col) 66745 + && *T_CRI != NUL) 66746 term_cursor_right(col - screen_cur_col); 66747 else 66748 term_windgoto(row, col); 66749 @@ -9648,10 +9829,7 @@ 58852 66750 do_mode = ((p_smd && msg_silent == 0) 58853 66751 && ((State & INSERT) … … 58861 66759 { 58862 66760 /* 58863 @@ -9704,7 +9 683,8 @@66761 @@ -9704,7 +9882,8 @@ 58864 66762 } 58865 66763 #endif … … 58871 66769 /* These messages can get long, avoid a wrap in a narrow 58872 66770 * window. Prefer showing edit_submode_extra. */ 58873 @@ -9779,7 +9 759,6 @@66771 @@ -9779,7 +9958,6 @@ 58874 66772 if ((State & INSERT) && p_paste) 58875 66773 MSG_PUTS_ATTR(_(" (paste)"), attr); … … 58879 66777 { 58880 66778 char *p; 58881 @@ -9799,7 +9 778,6 @@66779 @@ -9799,7 +9977,6 @@ 58882 66780 } 58883 66781 MSG_PUTS_ATTR(_(p), attr); … … 58887 66785 } 58888 66786 58889 @@ -9828,11 + 9806,9 @@66787 @@ -9828,11 +10005,9 @@ 58890 66788 msg_clr_cmdline(); 58891 66789 … … 58901 66799 diff -Naur vim74.orig/src/search.c vim74/src/search.c 58902 66800 --- vim74.orig/src/search.c 2013-07-17 17:20:47.000000000 +0000 58903 +++ vim74/src/search.c 2014-0 6-01 00:43:17.920804010+000066801 +++ vim74/src/search.c 2014-07-21 23:33:44.590121005 +0000 58904 66802 @@ -201,7 +201,7 @@ 58905 66803 * Save the currently used pattern in the appropriate place, … … 59099 66997 /* 59100 66998 * Search backwards for unclosed '(', '{', etc.. 59101 @@ -3638,7 +3623,6 @@ 59102 if (decl(&curwin->w_cursor) != 0) 59103 break; 59104 } 66999 @@ -3623,22 +3608,22 @@ 67000 67001 /* 67002 * Try to exclude the '(', '{', ')', '}', etc. when "include" is FALSE. 67003 - * If the ending '}' is only preceded by indent, skip that indent. 67004 - * But only if the resulting area is not smaller than what we started with. 67005 + * If the ending '}', ')' or ']' is only preceded by indent, skip that 67006 + * indent. But only if the resulting area is not smaller than what we 67007 + * started with. 67008 */ 67009 while (!include) 67010 { 67011 incl(&start_pos); 67012 sol = (curwin->w_cursor.col == 0); 67013 decl(&curwin->w_cursor); 67014 - if (what == '{') 67015 - while (inindent(1)) 67016 - { 67017 - sol = TRUE; 67018 - if (decl(&curwin->w_cursor) != 0) 67019 - break; 67020 - } 59105 67021 -#ifdef FEAT_VISUAL 67022 + while (inindent(1)) 67023 + { 67024 + sol = TRUE; 67025 + if (decl(&curwin->w_cursor) != 0) 67026 + break; 67027 + } 67028 + 59106 67029 /* 59107 67030 * In Visual mode, when the resulting area is not bigger than what we 59108 67031 * started with, extend it to the next block, and then exclude again. 59109 @@ -3663,11 +364 7,9 @@67032 @@ -3663,11 +3648,9 @@ 59110 67033 curwin->w_cursor = *end_pos; 59111 67034 } … … 59119 67042 { 59120 67043 if (*p_sel == 'e') 59121 @@ -3680,7 +366 2,6 @@67044 @@ -3680,7 +3663,6 @@ 59122 67045 showmode(); 59123 67046 } … … 59127 67050 oap->start = start_pos; 59128 67051 oap->motion_type = MCHAR; 59129 @@ -3804,17 +378 5,13 @@67052 @@ -3804,17 +3786,13 @@ 59130 67053 old_pos = curwin->w_cursor; 59131 67054 old_end = curwin->w_cursor; /* remember where we started */ … … 59145 67068 setpcmark(); 59146 67069 59147 @@ -3840,7 +381 7,6 @@67070 @@ -3840,7 +3818,6 @@ 59148 67071 old_end = curwin->w_cursor; 59149 67072 } … … 59153 67076 { 59154 67077 old_start = VIsual; 59155 @@ -3848,7 +382 4,6 @@67078 @@ -3848,7 +3825,6 @@ 59156 67079 } 59157 67080 else … … 59161 67084 again: 59162 67085 /* 59163 @@ -3948,7 +392 3,6 @@67086 @@ -3948,7 +3924,6 @@ 59164 67087 } 59165 67088 } … … 59169 67092 { 59170 67093 /* If the end is before the start there is no text between tags, select 59171 @@ -3963,7 +393 7,6 @@67094 @@ -3963,7 +3938,6 @@ 59172 67095 showmode(); 59173 67096 } … … 59177 67100 oap->start = start_pos; 59178 67101 oap->motion_type = MCHAR; 59179 @@ -4007,7 +398 0,6 @@67102 @@ -4007,7 +3981,6 @@ 59180 67103 59181 67104 start_lnum = curwin->w_cursor.lnum; … … 59185 67108 * When visual area is more than one line: extend it. 59186 67109 */ 59187 @@ -4061,7 +403 3,6 @@67110 @@ -4061,7 +4034,6 @@ 59188 67111 curwin->w_cursor.col = 0; 59189 67112 return retval; … … 59193 67116 /* 59194 67117 * First move back to the start_lnum of the paragraph or white lines 59195 @@ -4133,7 +410 4,6 @@67118 @@ -4133,7 +4105,6 @@ 59196 67119 while (start_lnum > 1 && linewhite(start_lnum - 1)) 59197 67120 --start_lnum; … … 59201 67124 { 59202 67125 /* Problem: when doing "Vipipip" nothing happens in a single white 59203 @@ -4146,7 +411 6,6 @@67126 @@ -4146,7 +4117,6 @@ 59204 67127 showmode(); 59205 67128 } … … 59209 67132 oap->start.lnum = start_lnum; 59210 67133 oap->start.col = 0; 59211 @@ -4244,7 +421 3,6 @@67134 @@ -4244,7 +4214,6 @@ 59212 67135 int col_end; 59213 67136 int col_start = curwin->w_cursor.col; … … 59217 67140 int vis_bef_curs = FALSE; /* Visual starts before cursor */ 59218 67141 int inside_quotes = FALSE; /* Looks like "i'" done before */ 59219 @@ -4328,17 +429 6,11 @@67142 @@ -4328,17 +4297,11 @@ 59220 67143 } 59221 67144 } … … 59236 67159 { 59237 67160 if (vis_bef_curs) 59238 @@ -4346,7 +430 8,7 @@67161 @@ -4346,7 +4309,7 @@ 59239 67162 else 59240 67163 first_col = find_prev_quote(line, col_start, quotechar, NULL); … … 59245 67168 * closing quote. Search from the start of the line to find out. 59246 67169 * Also do this when there is a Visual area, a' may leave the cursor 59247 @@ -4403,14 +436 5,9 @@67170 @@ -4403,14 +4366,9 @@ 59248 67171 59249 67172 /* Set start position. After vi" another i" must include the ". … … 59261 67184 { 59262 67185 /* Set the start of the Visual area when the Visual area was empty, we 59263 @@ -4430,7 +438 7,6 @@67186 @@ -4430,7 +4388,6 @@ 59264 67187 } 59265 67188 } … … 59269 67192 oap->start = curwin->w_cursor; 59270 67193 oap->motion_type = MCHAR; 59271 @@ -4438,14 +439 4,10 @@67194 @@ -4438,14 +4395,10 @@ 59272 67195 59273 67196 /* Set end position. */ … … 59285 67208 { 59286 67209 if (vis_empty || vis_bef_curs) 59287 @@ -4477,7 +44 29,6 @@67210 @@ -4477,7 +4430,6 @@ 59288 67211 } 59289 67212 } … … 59293 67216 /* Set inclusive and other oap's flags. */ 59294 67217 oap->inclusive = inclusive; 59295 @@ -4488,7 +44 39,6 @@67218 @@ -4488,7 +4440,6 @@ 59296 67219 59297 67220 #endif /* FEAT_TEXTOBJ */ … … 59301 67224 59302 67225 /* 59303 @@ -4541,7 +449 1,10 @@67226 @@ -4541,7 +4492,10 @@ 59304 67227 /* Is the pattern is zero-width? */ 59305 67228 one_char = is_one_char(spats[last_idx].pat); … … 59313 67236 /* 59314 67237 * The trick is to first search backwards and then search forward again, 59315 @@ -4589,7 +454 2,7 @@67238 @@ -4589,7 +4543,7 @@ 59316 67239 ml_get(curwin->w_buffer->b_ml.ml_line_count)); 59317 67240 } … … 59322 67245 59323 67246 start_pos = pos; 59324 @@ -4604,7 +455 7,6 @@67247 @@ -4604,7 +4558,6 @@ 59325 67248 if (!VIsual_active) 59326 67249 VIsual = start_pos; … … 59330 67253 VIsual_active = TRUE; 59331 67254 VIsual_mode = 'v'; 59332 @@ -4677,15 +46 29,14 @@67255 @@ -4677,15 +4630,14 @@ 59333 67256 && regmatch.startpos[0].lnum == regmatch.endpos[0].lnum 59334 67257 && regmatch.startpos[0].col == regmatch.endpos[0].col); … … 59348 67271 #if defined(FEAT_LISP) || defined(FEAT_CINDENT) || defined(FEAT_TEXTOBJ) \ 59349 67272 || defined(PROTO) 59350 @@ -5559,7 +551 0,9 @@67273 @@ -5559,7 +5511,9 @@ 59351 67274 spats[idx].off.off = off; 59352 67275 #ifdef FEAT_SEARCH_EXTRA … … 59361 67284 diff -Naur vim74.orig/src/spell.c vim74/src/spell.c 59362 67285 --- vim74.orig/src/spell.c 2013-07-17 15:28:28.000000000 +0000 59363 +++ vim74/src/spell.c 2014-0 6-01 00:43:17.964137233+000067286 +++ vim74/src/spell.c 2014-07-21 23:33:44.676787446 +0000 59364 67287 @@ -317,7 +317,7 @@ 59365 67288 … … 59792 67715 diff -Naur vim74.orig/src/structs.h vim74/src/structs.h 59793 67716 --- vim74.orig/src/structs.h 2013-07-03 13:35:59.000000000 +0000 59794 +++ vim74/src/structs.h 2014-06-01 00:43:17.970803882 +0000 59795 @@ -346,9 +346,7 @@ 67717 +++ vim74/src/structs.h 2014-07-21 23:33:44.713454017 +0000 67718 @@ -134,6 +134,12 @@ 67719 int wo_arab; 67720 # define w_p_arab w_onebuf_opt.wo_arab /* 'arabic' */ 67721 #endif 67722 +#ifdef FEAT_LINEBREAK 67723 + int wo_bri; 67724 +# define w_p_bri w_onebuf_opt.wo_bri /* 'breakindent' */ 67725 + char_u *wo_briopt; 67726 +# define w_p_briopt w_onebuf_opt.wo_briopt /* 'breakindentopt' */ 67727 +#endif 67728 #ifdef FEAT_DIFF 67729 int wo_diff; 67730 # define w_p_diff w_onebuf_opt.wo_diff /* 'diff' */ 67731 @@ -346,9 +352,7 @@ 59796 67732 #endif 59797 67733 int uh_flags; /* see below */ … … 59803 67739 long uh_save_nr; /* set when the file was saved after the 59804 67740 changes in this block */ 59805 @@ -364,7 +36 2,7 @@67741 @@ -364,7 +368,7 @@ 59806 67742 /* 59807 67743 * structures used in undo.c … … 59812 67748 # define ALIGN_SIZE (sizeof(long)) 59813 67749 #else 59814 @@ -471,13 +4 69,17 @@67750 @@ -471,13 +475,17 @@ 59815 67751 blocknr_T nt_new_bnum; /* new, positive, number */ 59816 67752 }; … … 59832 67768 59833 67769 /* 59834 @@ -485,10 +4 87,10 @@67770 @@ -485,10 +493,10 @@ 59835 67771 */ 59836 67772 struct buffheader … … 59847 67783 59848 67784 /* 59849 @@ -542,6 +5 44,8 @@67785 @@ -542,6 +550,8 @@ 59850 67786 int keepmarks; /* TRUE when ":keepmarks" was used */ 59851 67787 int keepjumps; /* TRUE when ":keepjumps" was used */ … … 59856 67792 char_u *save_ei; /* saved value of 'eventignore' */ 59857 67793 # endif 59858 @@ -568,7 +57 2,7 @@67794 @@ -568,7 +578,7 @@ 59859 67795 unsigned mf_page_size; /* number of bytes in a page */ 59860 67796 int mf_dirty; /* TRUE if there are dirty blocks */ … … 59865 67801 59866 67802 /* Values for key, method and seed used for reading data blocks when 59867 @@ -671,6 +6 75,7 @@67803 @@ -671,6 +681,7 @@ 59868 67804 { 59869 67805 garray_T al_ga; /* growarray with the array of file names */ … … 59873 67809 59874 67810 /* 59875 @@ -963,7 +9 68,8 @@67811 @@ -963,7 +974,8 @@ 59876 67812 int typebuf_valid; /* TRUE when save_typebuf valid */ 59877 67813 int old_char; … … 59883 67819 char_u *save_inputbuf; 59884 67820 #endif 59885 @@ -1088,7 +1 094,7 @@67821 @@ -1088,7 +1100,7 @@ 59886 67822 typedef long_u hash_T; /* Type for hi_hash */ 59887 67823 … … 59892 67828 #else 59893 67829 typedef int varnumber_T; 59894 @@ -1309,6 +13 15,9 @@67830 @@ -1309,6 +1321,9 @@ 59895 67831 regprog_T *b_cap_prog; /* program for 'spellcapcheck' */ 59896 67832 char_u *b_p_spf; /* 'spellfile' */ … … 59902 67838 #if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL) 59903 67839 int dummy; 59904 @@ -1397,12 +14 06,10 @@67840 @@ -1397,12 +1412,10 @@ 59905 67841 59906 67842 pos_T b_namedm[NMARKS]; /* current named marks (mark.c) */ … … 59916 67852 59917 67853 pos_T b_last_cursor; /* cursor position when last unloading this 59918 @@ -1440,6 +14 47,7 @@67854 @@ -1440,6 +1453,7 @@ 59919 67855 * start and end of an operator, also used for '[ and '] 59920 67856 */ … … 59924 67860 59925 67861 #ifdef FEAT_VIMINFO 59926 @@ -1627,12 +16 35,55 @@67862 @@ -1627,12 +1641,55 @@ 59927 67863 char_u *b_p_dict; /* 'dictionary' local value */ 59928 67864 char_u *b_p_tsr; /* 'thesaurus' local value */ … … 59980 67916 * write should not have an end-of-line */ 59981 67917 59982 @@ -1927,7 +1978,6 @@ 67918 @@ -1876,6 +1933,32 @@ 67919 #endif 67920 } match_T; 67921 67922 +/* number of positions supported by matchaddpos() */ 67923 +#define MAXPOSMATCH 8 67924 + 67925 +/* 67926 + * Same as lpos_T, but with additional field len. 67927 + */ 67928 +typedef struct 67929 +{ 67930 + linenr_T lnum; /* line number */ 67931 + colnr_T col; /* column number */ 67932 + int len; /* length: 0 - to the end of line */ 67933 +} llpos_T; 67934 + 67935 +/* 67936 + * posmatch_T provides an array for storing match items for matchaddpos() 67937 + * function. 67938 + */ 67939 +typedef struct posmatch posmatch_T; 67940 +struct posmatch 67941 +{ 67942 + llpos_T pos[MAXPOSMATCH]; /* array of positions */ 67943 + int cur; /* internal position counter */ 67944 + linenr_T toplnum; /* top buffer line */ 67945 + linenr_T botlnum; /* bottom buffer line */ 67946 +}; 67947 + 67948 /* 67949 * matchitem_T provides a linked list for storing match items for ":match" and 67950 * the match functions. 67951 @@ -1889,6 +1972,7 @@ 67952 char_u *pattern; /* pattern to highlight */ 67953 int hlg_id; /* highlight group ID */ 67954 regmmatch_T match; /* regexp program for pattern */ 67955 + posmatch_T pos; /* position matches */ 67956 match_T hl; /* struct for doing the actual highlighting */ 67957 }; 67958 67959 @@ -1927,7 +2011,6 @@ 59983 67960 time through cursupdate() to the 59984 67961 current virtual column */ … … 59988 67965 * the next six are used to update the visual part 59989 67966 */ 59990 @@ -1938,7 + 1988,6 @@67967 @@ -1938,7 +2021,6 @@ 59991 67968 linenr_T w_old_visual_lnum; /* last known start of visual part */ 59992 67969 colnr_T w_old_visual_col; /* last known start of visual part */ … … 59996 67973 /* 59997 67974 * "w_topline", "w_leftcol" and "w_skipcol" specify the offsets for 59998 @@ -2240,10 +2289,8 @@ 67975 @@ -2113,6 +2195,11 @@ 67976 #ifdef FEAT_SYN_HL 67977 int *w_p_cc_cols; /* array of columns to highlight or NULL */ 67978 #endif 67979 +#ifdef FEAT_LINEBREAK 67980 + int w_p_brimin; /* minimum width for breakindent */ 67981 + int w_p_brishift; /* additional shift for breakindent */ 67982 + int w_p_brisbr; /* sbr in 'briopt' */ 67983 +#endif 67984 67985 /* transform a pointer to a "onebuf" option into a "allbuf" option */ 67986 #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T)) 67987 @@ -2240,10 +2327,8 @@ 59999 67988 (inclusive) */ 60000 67989 int empty; /* op_start and op_end the same (only used by … … 60009 67998 diff -Naur vim74.orig/src/syntax.c vim74/src/syntax.c 60010 67999 --- vim74.orig/src/syntax.c 2013-06-08 14:10:08.000000000 +0000 60011 +++ vim74/src/syntax.c 2014-0 6-01 00:43:18.047470354+000068000 +++ vim74/src/syntax.c 2014-07-21 23:33:44.760120562 +0000 60012 68001 @@ -6837,10 +6837,8 @@ 60013 68002 CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue", … … 60041 68030 } 60042 68031 recursive = FALSE; 68032 @@ -8047,8 +8043,14 @@ 68033 { 68034 return ( HL_TABLE()[idx].sg_term_attr != 0 68035 || HL_TABLE()[idx].sg_cterm_attr != 0 68036 + || HL_TABLE()[idx].sg_cterm_fg != 0 68037 + || HL_TABLE()[idx].sg_cterm_bg != 0 68038 #ifdef FEAT_GUI 68039 || HL_TABLE()[idx].sg_gui_attr != 0 68040 + || HL_TABLE()[idx].sg_gui_fg_name != NULL 68041 + || HL_TABLE()[idx].sg_gui_bg_name != NULL 68042 + || HL_TABLE()[idx].sg_gui_sp_name != NULL 68043 + || HL_TABLE()[idx].sg_font_name != NUL 68044 #endif 68045 || (check_link && (HL_TABLE()[idx].sg_set & SG_LINK))); 68046 } 60043 68047 diff -Naur vim74.orig/src/tag.c vim74/src/tag.c 60044 68048 --- vim74.orig/src/tag.c 2013-06-15 20:26:26.000000000 +0000 60045 +++ vim74/src/tag.c 2014-0 6-01 00:43:18.100803551+000068049 +++ vim74/src/tag.c 2014-07-21 23:33:44.786787159 +0000 60046 68050 @@ -741,8 +741,10 @@ 60047 68051 break; … … 60118 68122 diff -Naur vim74.orig/src/term.c vim74/src/term.c 60119 68123 --- vim74.orig/src/term.c 2013-07-04 20:29:28.000000000 +0000 60120 +++ vim74/src/term.c 2014-0 6-01 00:43:18.190803322 +000068124 +++ vim74/src/term.c 2014-07-21 23:33:44.846787002 +0000 60121 68125 @@ -153,6 +153,11 @@ 60122 68126 static char_u *vim_tgetstr __ARGS((char *s, char_u **pp)); … … 60140 68144 } 60141 68145 #endif 60142 @@ -3307,6 +3312, 27@@68146 @@ -3307,6 +3312,40 @@ 60143 68147 } 60144 68148 … … 60162 68166 + || xt_index_out > xt_index_in; 60163 68167 +} 68168 + 68169 +/* 68170 + * If requesting the version was disabled in did_request_esc_sequence(), 68171 + * enable it again. 68172 + */ 68173 + void 68174 +resume_get_esc_sequence() 68175 +{ 68176 + if (crv_status == 0) 68177 + crv_status = CRV_GET; 68178 + if (u7_status == 0) 68179 + u7_status = U7_GET; 68180 +} 60164 68181 +# endif 60165 68182 + … … 60168 68185 * Request version string (for xterm) when needed. 60169 68186 * Only do this after switching to raw mode, otherwise the result will be 60170 @@ -3319,6 +33 45,8 @@68187 @@ -3319,6 +3358,8 @@ 60171 68188 * Insert mode. 60172 68189 * On Unix only do it when both output and input are a tty (avoid writing … … 60177 68194 */ 60178 68195 void 60179 @@ -3332,6 +33 60,7 @@68196 @@ -3332,6 +3373,7 @@ 60180 68197 # ifdef UNIX 60181 68198 && isatty(1) … … 60185 68202 && *T_CRV != NUL) 60186 68203 { 60187 @@ -3356,7 +33 85,7 @@68204 @@ -3356,7 +3398,7 @@ 60188 68205 * it must be called immediately after entering termcap mode. 60189 68206 */ … … 60194 68211 if (u7_status == U7_GET 60195 68212 && cur_tmode == TMODE_RAW 60196 @@ -3379,7 +34 08,8 @@68213 @@ -3379,7 +3421,8 @@ 60197 68214 out_str(buf); 60198 68215 out_str(T_U7); … … 60204 68221 term_windgoto(0, 0); 60205 68222 /* check for the characters now, otherwise they might be eaten by 60206 @@ -3455,12 +34 85,9 @@68223 @@ -3455,12 +3498,9 @@ 60207 68224 return; 60208 68225 } … … 60218 68235 else if (State & INSERT) 60219 68236 checkfor = MOUSE_INSERT; 60220 @@ -4185,24 +4212,38 @@ 68237 @@ -3684,7 +3724,11 @@ 68238 return; 68239 } 68240 68241 +#if defined(WIN3264) && !defined(FEAT_GUI) 68242 + s = vim_strnsave(string, (int)STRLEN(string) + 1); 68243 +#else 68244 s = vim_strsave(string); 68245 +#endif 68246 if (s == NULL) 68247 return; 68248 68249 @@ -3694,6 +3738,15 @@ 68250 STRMOVE(s, s + 1); 68251 s[0] = term_7to8bit(string); 68252 } 68253 + 68254 +#if defined(WIN3264) && !defined(FEAT_GUI) 68255 + if (s[0] == K_NUL) 68256 + { 68257 + STRMOVE(s + 1, s); 68258 + s[1] = 3; 68259 + } 68260 +#endif 68261 + 68262 len = (int)STRLEN(s); 68263 68264 need_gather = TRUE; /* need to fill termleader[] */ 68265 @@ -4185,24 +4238,38 @@ 60221 68266 || (tp[0] == CSI && len >= 2)) 60222 68267 && (VIM_ISDIGIT(*p) || *p == '>' || *p == '?')) … … 60262 68307 char *aw = NULL; 60263 68308 60264 @@ -4211,18 +42 52,16 @@68309 @@ -4211,18 +4278,16 @@ 60265 68310 # ifdef FEAT_AUTOCMD 60266 68311 did_cursorhold = TRUE; … … 60284 68329 char buf[100]; 60285 68330 int r = redraw_asap(CLEAR); 60286 @@ -4231,9 +42 70,9 @@68331 @@ -4231,9 +4296,9 @@ 60287 68332 r); 60288 68333 log_tr(buf); … … 60296 68341 key_name[0] = (int)KS_EXTRA; 60297 68342 key_name[1] = (int)KE_IGNORE; 60298 @@ -5704,9 +57 43,6 @@68343 @@ -5704,9 +5769,6 @@ 60299 68344 * termcap codes from the terminal itself. 60300 68345 * We get them one by one to avoid a very long response string. … … 60308 68353 diff -Naur vim74.orig/src/testdir/Make_amiga.mak vim74/src/testdir/Make_amiga.mak 60309 68354 --- vim74.orig/src/testdir/Make_amiga.mak 2013-07-09 11:40:02.000000000 +0000 60310 +++ vim74/src/testdir/Make_amiga.mak 2014-0 6-01 00:43:18.240803195+000060311 @@ -33,7 +33,1 2@@68355 +++ vim74/src/testdir/Make_amiga.mak 2014-07-21 23:33:44.876786924 +0000 68356 @@ -33,7 +33,15 @@ 60312 68357 test76.out test77.out test78.out test79.out test80.out \ 60313 68358 test81.out test82.out test83.out test84.out test88.out \ … … 60318 68363 + test104.out test105.out test106.out test107.out \ 60319 68364 + test_autoformat_join.out \ 68365 + test_breakindent.out \ 68366 + test_listlbr.out \ 68367 + test_listlbr_utf8.out \ 60320 68368 + test_eval.out \ 60321 68369 + test_options.out … … 60323 68371 .SUFFIXES: .in .out 60324 68372 60325 @@ -148,3 +15 3,15@@68373 @@ -148,3 +156,18 @@ 60326 68374 test96.out: test96.in 60327 68375 test97.out: test97.in … … 60337 68385 +test107.out: test107.in 60338 68386 +test_autoformat_join.out: test_autoformat_join.in 68387 +test_breakindent.out: test_breakindent.in 68388 +test_listlbr.out: test_listlbr.in 68389 +test_listlbr_utf8.out: test_listlbr_utf8.in 60339 68390 +test_eval.out: test_eval.in 60340 68391 +test_options.out: test_options.in 60341 68392 diff -Naur vim74.orig/src/testdir/Make_dos.mak vim74/src/testdir/Make_dos.mak 60342 68393 --- vim74.orig/src/testdir/Make_dos.mak 2013-07-09 11:40:30.000000000 +0000 60343 +++ vim74/src/testdir/Make_dos.mak 2014-0 6-01 00:43:18.240803195+000060344 @@ -32,7 +32,1 2@@68394 +++ vim74/src/testdir/Make_dos.mak 2014-07-21 23:33:44.890120223 +0000 68395 @@ -32,7 +32,15 @@ 60345 68396 test79.out test80.out test81.out test82.out test83.out \ 60346 68397 test84.out test85.out test86.out test87.out test88.out \ … … 60351 68402 + test105.out test106.out test107.out\ 60352 68403 + test_autoformat_join.out \ 68404 + test_breakindent.out \ 68405 + test_listlbr.out \ 68406 + test_listlbr_utf8.out \ 60353 68407 + test_eval.out \ 60354 68408 + test_options.out … … 60358 68412 diff -Naur vim74.orig/src/testdir/Make_ming.mak vim74/src/testdir/Make_ming.mak 60359 68413 --- vim74.orig/src/testdir/Make_ming.mak 2013-07-09 11:40:38.000000000 +0000 60360 +++ vim74/src/testdir/Make_ming.mak 2014-0 6-01 00:43:18.244136520+000060361 @@ -52,7 +52,1 2@@68414 +++ vim74/src/testdir/Make_ming.mak 2014-07-21 23:33:44.903453521 +0000 68415 @@ -52,7 +52,15 @@ 60362 68416 test79.out test80.out test81.out test82.out test83.out \ 60363 68417 test84.out test85.out test86.out test87.out test88.out \ … … 60368 68422 + test105.out test106.out test107.out \ 60369 68423 + test_autoformat_join.out \ 68424 + test_breakindent.out \ 68425 + test_listlbr.out \ 68426 + test_listlbr_utf8.out \ 60370 68427 + test_eval.out \ 60371 68428 + test_options.out … … 60375 68432 diff -Naur vim74.orig/src/testdir/Make_os2.mak vim74/src/testdir/Make_os2.mak 60376 68433 --- vim74.orig/src/testdir/Make_os2.mak 2013-07-09 11:40:43.000000000 +0000 60377 +++ vim74/src/testdir/Make_os2.mak 2014-0 6-01 00:43:18.244136520+000060378 @@ -34,7 +34,1 2@@68434 +++ vim74/src/testdir/Make_os2.mak 2014-07-21 23:33:44.913453495 +0000 68435 @@ -34,7 +34,15 @@ 60379 68436 test76.out test77.out test78.out test79.out test80.out \ 60380 68437 test81.out test82.out test83.out test84.out test88.out \ … … 60386 68443 + test_autoformat_join.out \ 60387 68444 + test_eval.out \ 68445 + test_breakindent.out \ 68446 + test_listlbr_utf8.out \ 68447 + test_listlbr.out \ 60388 68448 + test_options.out 60389 68449 … … 60392 68452 diff -Naur vim74.orig/src/testdir/Make_vms.mms vim74/src/testdir/Make_vms.mms 60393 68453 --- vim74.orig/src/testdir/Make_vms.mms 2013-07-09 11:40:47.000000000 +0000 60394 +++ vim74/src/testdir/Make_vms.mms 2014-0 6-01 00:43:18.247469845+000068454 +++ vim74/src/testdir/Make_vms.mms 2014-07-21 23:33:44.920120144 +0000 60395 68455 @@ -4,7 +4,7 @@ 60396 68456 # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> … … 60435 68495 # End of configuration section. 60436 68496 # 60437 @@ -63,35 +78, 47@@68497 @@ -63,35 +78,50 @@ 60438 68498 60439 68499 SCRIPT = test1.out test2.out test3.out test4.out test5.out \ … … 60464 68524 + test105.out test106.out test107.out \ 60465 68525 + test_autoformat_join.out \ 68526 + test_breakindent.out \ 68527 + test_listlbr.out \ 68528 + test_listlbr_utf8.out \ 60466 68529 + test_eval.out \ 60467 68530 + test_options.out … … 60494 68557 .IFDEF WANT_GUI 60495 68558 SCRIPT_GUI = test16.out 60496 @@ -99,7 +12 6,7 @@68559 @@ -99,7 +129,7 @@ 60497 68560 .ENDIF 60498 68561 … … 60503 68566 60504 68567 .IFDEF WANT_WIN 60505 @@ -114,6 +14 1,10 @@68568 @@ -114,6 +144,10 @@ 60506 68569 SCRIPT_MZSCH = test70.out 60507 68570 .ENDIF … … 60514 68577 SCRIPT_GZIP = test11.out 60515 68578 .ENDIF 60516 @@ -122,10 +15 3,28 @@68579 @@ -122,10 +156,28 @@ 60517 68580 SCRIPT_GDIFF = test47.out 60518 68581 .ENDIF … … 60543 68606 -@ write sys$output "-----------------------------------------------" 60544 68607 -@ write sys$output " "$*" " 60545 @@ -138,9 +1 87,10 @@68608 @@ -138,9 +190,10 @@ 60546 68609 -@ if "''F$SEARCH("$*.out.*")'" .NES. "" then differences /par $*.out $*.ok; 60547 68610 -@ !clean up after the test … … 60556 68619 -@ write sys$output "-----------------------------------------------" 60557 68620 -@ write sys$output " All done" 60558 @@ -163,13 +21 3,18 @@68621 @@ -163,13 +216,18 @@ 60559 68622 -@ write sys$output " Test results:" 60560 68623 -@ write sys$output "-----------------------------------------------" … … 60582 68645 -@ write sys$output "-----------------------------------------------" 60583 68646 -@ type VMS.VIM 60584 @@ -179,6 +23 4,9 @@68647 @@ -179,6 +237,9 @@ 60585 68648 -@ if "''F$SEARCH("test.log")'" .NES. "" then delete/noconfirm/nolog test.log.* 60586 68649 -@ if "''F$SEARCH("test.ok")'" .NES. "" then delete/noconfirm/nolog test.ok.* … … 60592 68655 -@ if "''F$SEARCH("*.failed")'" .NES. "" then delete/noconfirm/nolog *.failed.* 60593 68656 -@ if "''F$SEARCH("*.rej")'" .NES. "" then delete/noconfirm/nolog *.rej.* 60594 @@ -186,6 +24 4,6 @@68657 @@ -186,6 +247,6 @@ 60595 68658 -@ if "''F$SEARCH("small.vim")'" .NES. "" then delete/noconfirm/nolog small.vim.* 60596 68659 -@ if "''F$SEARCH("mbyte.vim")'" .NES. "" then delete/noconfirm/nolog mbyte.vim.* … … 60602 68665 diff -Naur vim74.orig/src/testdir/Makefile vim74/src/testdir/Makefile 60603 68666 --- vim74.orig/src/testdir/Makefile 2013-08-10 12:20:20.000000000 +0000 60604 +++ vim74/src/testdir/Makefile 2014-0 6-01 00:43:18.250803169+000068667 +++ vim74/src/testdir/Makefile 2014-07-21 23:33:44.950120066 +0000 60605 68668 @@ -3,6 +3,7 @@ 60606 68669 # … … 60611 68674 # Uncomment this line to use valgrind for memory leaks and extra warnings. 60612 68675 # The output goes into a file "valgrind.testN" 60613 @@ -29,7 +30,1 2@@68676 @@ -29,7 +30,15 @@ 60614 68677 test79.out test80.out test81.out test82.out test83.out \ 60615 68678 test84.out test85.out test86.out test87.out test88.out \ … … 60620 68683 + test104.out test105.out test106.out test107.out \ 60621 68684 + test_autoformat_join.out \ 68685 + test_breakindent.out \ 68686 + test_listlbr.out \ 68687 + test_listlbr_utf8.out \ 60622 68688 + test_eval.out \ 60623 68689 + test_options.out … … 60625 68691 SCRIPTS_GUI = test16.out 60626 68692 60627 @@ -51,15 + 57,19 @@68693 @@ -51,15 +60,19 @@ 60628 68694 60629 68695 RM_ON_RUN = test.out X* viminfo … … 60650 68716 diff -Naur vim74.orig/src/testdir/sautest/autoload/Test104.vim vim74/src/testdir/sautest/autoload/Test104.vim 60651 68717 --- vim74.orig/src/testdir/sautest/autoload/Test104.vim 1970-01-01 00:00:00.000000000 +0000 60652 +++ vim74/src/testdir/sautest/autoload/Test104.vim 2014-0 6-01 00:43:18.450802660+000068718 +++ vim74/src/testdir/sautest/autoload/Test104.vim 2014-07-21 23:33:45.170119492 +0000 60653 68719 @@ -0,0 +1 @@ 60654 68720 +let Test104#numvar = 123 60655 68721 diff -Naur vim74.orig/src/testdir/sautest/autoload/footest.vim vim74/src/testdir/sautest/autoload/footest.vim 60656 68722 --- vim74.orig/src/testdir/sautest/autoload/footest.vim 1970-01-01 00:00:00.000000000 +0000 60657 +++ vim74/src/testdir/sautest/autoload/footest.vim 2014-0 6-01 00:43:18.464135959+000068723 +++ vim74/src/testdir/sautest/autoload/footest.vim 2014-07-21 23:33:45.183452791 +0000 60658 68724 @@ -0,0 +1,5 @@ 60659 68725 +" Autoload script used by test55 and test60 … … 60664 68730 diff -Naur vim74.orig/src/testdir/test1.in vim74/src/testdir/test1.in 60665 68731 --- vim74.orig/src/testdir/test1.in 2012-04-05 14:37:37.000000000 +0000 60666 +++ vim74/src/testdir/test1.in 2014-0 6-01 00:43:18.470802609+000068732 +++ vim74/src/testdir/test1.in 2014-07-21 23:33:45.213452712 +0000 60667 68733 @@ -18,6 +18,10 @@ 60668 68734 Similar logic is applied to the +lua feature, using lua.vim. … … 60678 68744 diff -Naur vim74.orig/src/testdir/test100.in vim74/src/testdir/test100.in 60679 68745 --- vim74.orig/src/testdir/test100.in 1970-01-01 00:00:00.000000000 +0000 60680 +++ vim74/src/testdir/test100.in 2014-0 6-01 00:43:18.517469157+000068746 +++ vim74/src/testdir/test100.in 2014-07-21 23:33:45.243452634 +0000 60681 68747 @@ -0,0 +1,50 @@ 60682 68748 +Tests for 'undolevel' and 'lispwords' settings being global-local … … 60732 68798 diff -Naur vim74.orig/src/testdir/test100.ok vim74/src/testdir/test100.ok 60733 68799 --- vim74.orig/src/testdir/test100.ok 1970-01-01 00:00:00.000000000 +0000 60734 +++ vim74/src/testdir/test100.ok 2014-0 6-01 00:43:18.517469157+000068800 +++ vim74/src/testdir/test100.ok 2014-07-21 23:33:45.256785933 +0000 60735 68801 @@ -0,0 +1,51 @@ 60736 68802 +ONE: expecting global undolevels: 5, local undolevels: -123456 (default) … … 60787 68853 diff -Naur vim74.orig/src/testdir/test101.in vim74/src/testdir/test101.in 60788 68854 --- vim74.orig/src/testdir/test101.in 1970-01-01 00:00:00.000000000 +0000 60789 +++ vim74/src/testdir/test101.in 2014-0 6-01 00:43:18.540802431 +000068855 +++ vim74/src/testdir/test101.in 2014-07-21 23:33:45.270119231 +0000 60790 68856 @@ -0,0 +1,45 @@ 60791 68857 +Test for v:hlsearch vim: set ft=vim : … … 60836 68902 diff -Naur vim74.orig/src/testdir/test101.ok vim74/src/testdir/test101.ok 60837 68903 --- vim74.orig/src/testdir/test101.ok 1970-01-01 00:00:00.000000000 +0000 60838 +++ vim74/src/testdir/test101.ok 2014-0 6-01 00:43:18.544135756 +000068904 +++ vim74/src/testdir/test101.ok 2014-07-21 23:33:45.273452556 +0000 60839 68905 @@ -0,0 +1,11 @@ 60840 68906 +start: … … 60851 68917 diff -Naur vim74.orig/src/testdir/test102.in vim74/src/testdir/test102.in 60852 68918 --- vim74.orig/src/testdir/test102.in 1970-01-01 00:00:00.000000000 +0000 60853 +++ vim74/src/testdir/test102.in 2014-0 6-01 00:43:18.557469055+000068919 +++ vim74/src/testdir/test102.in 2014-07-21 23:33:45.286785854 +0000 60854 68920 @@ -0,0 +1,12 @@ 60855 68921 +Test if fnameescape is correct for special chars like ! … … 60867 68933 diff -Naur vim74.orig/src/testdir/test102.ok vim74/src/testdir/test102.ok 60868 68934 --- vim74.orig/src/testdir/test102.ok 1970-01-01 00:00:00.000000000 +0000 60869 +++ vim74/src/testdir/test102.ok 2014-0 6-01 00:43:18.560802380+000068935 +++ vim74/src/testdir/test102.ok 2014-07-21 23:33:45.290119179 +0000 60870 68936 @@ -0,0 +1,3 @@ 60871 68937 + … … 60874 68940 diff -Naur vim74.orig/src/testdir/test103.in vim74/src/testdir/test103.in 60875 68941 --- vim74.orig/src/testdir/test103.in 1970-01-01 00:00:00.000000000 +0000 60876 +++ vim74/src/testdir/test103.in 2014-0 6-01 00:43:18.574135679+000068942 +++ vim74/src/testdir/test103.in 2014-07-21 23:33:45.313452451 +0000 60877 68943 @@ -0,0 +1,37 @@ 60878 68944 +Test for visual mode not being reset causing E315 error. … … 60915 68981 diff -Naur vim74.orig/src/testdir/test103.ok vim74/src/testdir/test103.ok 60916 68982 --- vim74.orig/src/testdir/test103.ok 1970-01-01 00:00:00.000000000 +0000 60917 +++ vim74/src/testdir/test103.ok 2014-0 6-01 00:43:18.590802304+000068983 +++ vim74/src/testdir/test103.ok 2014-07-21 23:33:45.320119101 +0000 60918 68984 @@ -0,0 +1,2 @@ 60919 68985 + … … 60921 68987 diff -Naur vim74.orig/src/testdir/test104.in vim74/src/testdir/test104.in 60922 68988 --- vim74.orig/src/testdir/test104.in 1970-01-01 00:00:00.000000000 +0000 60923 +++ vim74/src/testdir/test104.in 2014-0 6-01 00:43:18.600802278+000068989 +++ vim74/src/testdir/test104.in 2014-07-21 23:33:45.330119075 +0000 60924 68990 @@ -0,0 +1,30 @@ 60925 68991 +Tests for :let. vim: set ft=vim ts=8 : … … 60955 69021 diff -Naur vim74.orig/src/testdir/test104.ok vim74/src/testdir/test104.ok 60956 69022 --- vim74.orig/src/testdir/test104.ok 1970-01-01 00:00:00.000000000 +0000 60957 +++ vim74/src/testdir/test104.ok 2014-0 6-01 00:43:18.614135578+000069023 +++ vim74/src/testdir/test104.ok 2014-07-21 23:33:45.356785672 +0000 60958 69024 @@ -0,0 +1,13 @@ 60959 69025 +Results of test104: … … 60972 69038 diff -Naur vim74.orig/src/testdir/test105.in vim74/src/testdir/test105.in 60973 69039 --- vim74.orig/src/testdir/test105.in 1970-01-01 00:00:00.000000000 +0000 60974 +++ vim74/src/testdir/test105.in 2014-0 6-01 00:43:18.620802227+000069040 +++ vim74/src/testdir/test105.in 2014-07-21 23:33:45.360118996 +0000 60975 69041 @@ -0,0 +1,45 @@ 60976 69042 +Test filename modifiers vim: set ft=vim : … … 61021 69087 diff -Naur vim74.orig/src/testdir/test105.ok vim74/src/testdir/test105.ok 61022 69088 --- vim74.orig/src/testdir/test105.ok 1970-01-01 00:00:00.000000000 +0000 61023 +++ vim74/src/testdir/test105.ok 2014-0 6-01 00:43:18.627468877+000069089 +++ vim74/src/testdir/test105.ok 2014-07-21 23:33:45.366785646 +0000 61024 69090 @@ -0,0 +1,29 @@ 61025 69091 +fnamemodify('.', ':p' )[-1:] '/' … … 61054 69120 diff -Naur vim74.orig/src/testdir/test106.in vim74/src/testdir/test106.in 61055 69121 --- vim74.orig/src/testdir/test106.in 1970-01-01 00:00:00.000000000 +0000 61056 +++ vim74/src/testdir/test106.in 2014-0 6-01 00:43:18.644135501+000069122 +++ vim74/src/testdir/test106.in 2014-07-21 23:33:45.383452269 +0000 61057 69123 @@ -0,0 +1,16 @@ 61058 69124 +Tests for errorformat. vim: set ft=vim ts=8 : … … 61074 69140 diff -Naur vim74.orig/src/testdir/test106.ok vim74/src/testdir/test106.ok 61075 69141 --- vim74.orig/src/testdir/test106.ok 1970-01-01 00:00:00.000000000 +0000 61076 +++ vim74/src/testdir/test106.ok 2014-0 6-01 00:43:18.657468801+000069142 +++ vim74/src/testdir/test106.ok 2014-07-21 23:33:45.396785567 +0000 61077 69143 @@ -0,0 +1,4 @@ 61078 69144 +Results of test106: … … 61082 69148 diff -Naur vim74.orig/src/testdir/test107.in vim74/src/testdir/test107.in 61083 69149 --- vim74.orig/src/testdir/test107.in 1970-01-01 00:00:00.000000000 +0000 61084 +++ vim74/src/testdir/test107.in 2014-0 6-01 00:43:18.657468801+000069150 +++ vim74/src/testdir/test107.in 2014-07-21 23:33:45.410118866 +0000 61085 69151 @@ -0,0 +1,38 @@ 61086 69152 +Tests for adjusting window and contents vim: set ft=vim : … … 61124 69190 diff -Naur vim74.orig/src/testdir/test107.ok vim74/src/testdir/test107.ok 61125 69191 --- vim74.orig/src/testdir/test107.ok 1970-01-01 00:00:00.000000000 +0000 61126 +++ vim74/src/testdir/test107.ok 2014-0 6-01 00:43:18.660802125+000069192 +++ vim74/src/testdir/test107.ok 2014-07-21 23:33:45.413452191 +0000 61127 69193 @@ -0,0 +1,4 @@ 61128 69194 +start: … … 61132 69198 diff -Naur vim74.orig/src/testdir/test14.in vim74/src/testdir/test14.in 61133 69199 --- vim74.orig/src/testdir/test14.in 2013-04-03 18:59:14.000000000 +0000 61134 +++ vim74/src/testdir/test14.in 2014-0 6-01 00:43:18.754135221+000069200 +++ vim74/src/testdir/test14.in 2014-07-21 23:33:45.573451773 +0000 61135 69201 @@ -47,7 +47,19 @@ 61136 69202 /two … … 61164 69230 diff -Naur vim74.orig/src/testdir/test14.ok vim74/src/testdir/test14.ok 61165 69231 --- vim74.orig/src/testdir/test14.ok 2013-04-03 18:59:14.000000000 +0000 61166 +++ vim74/src/testdir/test14.ok 2014-0 6-01 00:43:18.767468520+000069232 +++ vim74/src/testdir/test14.ok 2014-07-21 23:33:45.586785072 +0000 61167 69233 @@ -20,3 +20,7 @@ 61168 69234 1 … … 61175 69241 diff -Naur vim74.orig/src/testdir/test20.in vim74/src/testdir/test20.in 61176 69242 --- vim74.orig/src/testdir/test20.in 2010-05-15 11:04:10.000000000 +0000 61177 +++ vim74/src/testdir/test20.in 2014-0 6-01 00:43:18.927468113+000069243 +++ vim74/src/testdir/test20.in 2014-07-21 23:33:45.733451356 +0000 61178 69244 @@ -9,11 +9,17 @@ 61179 69245 @auY:quit! … … 61198 69264 diff -Naur vim74.orig/src/testdir/test20.ok vim74/src/testdir/test20.ok 61199 69265 --- vim74.orig/src/testdir/test20.ok 2010-05-15 11:04:10.000000000 +0000 61200 +++ vim74/src/testdir/test20.ok 2014-0 6-01 00:43:18.940801412+000069266 +++ vim74/src/testdir/test20.ok 2014-07-21 23:33:45.746784654 +0000 61201 69267 @@ -1,3 +1,7 @@ 61202 69268 +123start here56 … … 61209 69275 diff -Naur vim74.orig/src/testdir/test29.in vim74/src/testdir/test29.in 61210 69276 --- vim74.orig/src/testdir/test29.in 2012-06-13 11:48:26.000000000 +0000 61211 +++ vim74/src/testdir/test29.in 2014-0 6-01 00:43:19.107467655+000069277 +++ vim74/src/testdir/test29.in 2014-07-21 23:33:45.913450886 +0000 61212 69278 @@ -102,6 +102,34 @@ 61213 69279 } … … 61247 69313 diff -Naur vim74.orig/src/testdir/test29.ok vim74/src/testdir/test29.ok 61248 69314 --- vim74.orig/src/testdir/test29.ok 2012-06-13 11:48:26.000000000 +0000 61249 +++ vim74/src/testdir/test29.ok 2014-0 6-01 00:43:19.110800979+000069315 +++ vim74/src/testdir/test29.ok 2014-07-21 23:33:45.926784185 +0000 61250 69316 @@ -62,6 +62,15 @@ 61251 69317 action(); … … 61264 69330 { 61265 69331 /* Make sure the previous comment leader is not removed. */ 69332 diff -Naur vim74.orig/src/testdir/test3.in vim74/src/testdir/test3.in 69333 --- vim74.orig/src/testdir/test3.in 2013-03-07 11:39:35.000000000 +0000 69334 +++ vim74/src/testdir/test3.in 2014-07-21 23:33:45.936784158 +0000 69335 @@ -1432,7 +1432,7 @@ 69336 69337 STARTTEST 69338 :set cino=(0,ts 69339 -2kdd=][ 69340 +2kdd2j=][ 69341 ENDTEST 69342 69343 void func(int a 69344 @@ -1446,7 +1446,7 @@ 69345 69346 STARTTEST 69347 :set cino=(0 69348 -2kdd=][ 69349 +2kdd2j=][ 69350 ENDTEST 69351 69352 void 69353 @@ -1461,7 +1461,7 @@ 69354 69355 STARTTEST 69356 :set cino& 69357 -2kdd=7][ 69358 +2kdd2j=7][ 69359 ENDTEST 69360 69361 void func(void) 69362 @@ -1538,7 +1538,7 @@ 69363 STARTTEST 69364 :set cino& 69365 :set cino+=l1 69366 -2kdd=][ 69367 +2kdd2j=][ 69368 ENDTEST 69369 69370 void func(void) 69371 @@ -1567,7 +1567,7 @@ 69372 69373 STARTTEST 69374 :set cino& 69375 -2kdd=][ 69376 +2kdd2j=][ 69377 ENDTEST 69378 69379 void func(void) 69380 @@ -1592,7 +1592,7 @@ 69381 69382 STARTTEST 69383 :set cino& 69384 -2kdd=][ 69385 +2kdd2j=][ 69386 ENDTEST 69387 69388 void func(void) 69389 @@ -1919,10 +1919,10 @@ 69390 69391 JSSTART 69392 var foo = [ 69393 -1, // indent 8 more 69394 +1, 69395 2, 69396 3 69397 -]; // indent 8 less 69398 +]; 69399 JSEND 69400 69401 STARTTEST 69402 @@ -1937,7 +1937,7 @@ 69403 1, 69404 2, 69405 3 69406 -]; // indent 16 less 69407 +]; 69408 } 69409 JSEND 69410 69411 @@ -1950,6 +1950,12 @@ 69412 JSSTART 69413 (function($){ 69414 69415 +if (cond && 69416 +cond) { 69417 +stmt; 69418 +} 69419 +window.something.left = 69420 +(width - 50 + offset) + "px"; 69421 var class_name='myclass'; 69422 69423 function private_method() { 69424 @@ -1965,15 +1971,15 @@ 69425 69426 $(this).data(class_name+'_public',$.extend({},{ 69427 foo: 'bar', 69428 -bar: 2, // indent 8 more 69429 -foobar: [ // indent 8 more 69430 -1, // indent 8 more 69431 -2, // indent 16 more 69432 -3 // indent 16 more 69433 +bar: 2, 69434 +foobar: [ 69435 +1, 69436 +2, 69437 +3 69438 ], 69439 -callback: function(){ // indent 8 more 69440 -return true; // indent 8 more 69441 -} // indent 8 more 69442 +callback: function(){ 69443 +return true; 69444 +} 69445 }, options||{})); 69446 } 69447 69448 @@ -2014,9 +2020,9 @@ 69449 foo: 'bar', 69450 bar: 2, 69451 foobar: [ 69452 -1, // indent 8 more 69453 -2, // indent 8 more 69454 -3 // indent 8 more 69455 +1, 69456 +2, 69457 +3 69458 ], 69459 callback: function(){ 69460 return true; 69461 @@ -2036,15 +2042,15 @@ 69462 function init(options) { 69463 $(this).data(class_name+'_public',$.extend({},{ 69464 foo: 'bar', 69465 -bar: 2, // indent 8 more 69466 -foobar: [ // indent 8 more 69467 -1, // indent 8 more 69468 -2, // indent 16 more 69469 -3 // indent 16 more 69470 +bar: 2, 69471 +foobar: [ 69472 +1, 69473 +2, 69474 +3 69475 ], 69476 -callback: function(){ // indent 8 more 69477 -return true; // indent 8 more 69478 -} // indent 8 more 69479 +callback: function(){ 69480 +return true; 69481 +} 69482 }, options||{})); 69483 } 69484 })(jQuery); 69485 diff -Naur vim74.orig/src/testdir/test3.ok vim74/src/testdir/test3.ok 69486 --- vim74.orig/src/testdir/test3.ok 2013-03-07 11:40:03.000000000 +0000 69487 +++ vim74/src/testdir/test3.ok 2014-07-21 23:33:45.940117483 +0000 69488 @@ -1707,10 +1707,10 @@ 69489 69490 JSSTART 69491 var foo = [ 69492 -1, // indent 8 more 69493 + 1, 69494 2, 69495 3 69496 - ]; // indent 8 less 69497 +]; 69498 JSEND 69499 69500 69501 @@ -1720,7 +1720,7 @@ 69502 1, 69503 2, 69504 3 69505 - ]; // indent 16 less 69506 + ]; 69507 } 69508 JSEND 69509 69510 @@ -1728,6 +1728,12 @@ 69511 JSSTART 69512 (function($){ 69513 69514 + if (cond && 69515 + cond) { 69516 + stmt; 69517 + } 69518 + window.something.left = 69519 + (width - 50 + offset) + "px"; 69520 var class_name='myclass'; 69521 69522 function private_method() { 69523 @@ -1743,15 +1749,15 @@ 69524 69525 $(this).data(class_name+'_public',$.extend({},{ 69526 foo: 'bar', 69527 - bar: 2, // indent 8 more 69528 - foobar: [ // indent 8 more 69529 - 1, // indent 8 more 69530 - 2, // indent 16 more 69531 - 3 // indent 16 more 69532 + bar: 2, 69533 + foobar: [ 69534 + 1, 69535 + 2, 69536 + 3 69537 ], 69538 - callback: function(){ // indent 8 more 69539 - return true; // indent 8 more 69540 - } // indent 8 more 69541 + callback: function(){ 69542 + return true; 69543 + } 69544 }, options||{})); 69545 } 69546 69547 @@ -1787,9 +1793,9 @@ 69548 foo: 'bar', 69549 bar: 2, 69550 foobar: [ 69551 - 1, // indent 8 more 69552 - 2, // indent 8 more 69553 - 3 // indent 8 more 69554 + 1, 69555 + 2, 69556 + 3 69557 ], 69558 callback: function(){ 69559 return true; 69560 @@ -1804,15 +1810,15 @@ 69561 function init(options) { 69562 $(this).data(class_name+'_public',$.extend({},{ 69563 foo: 'bar', 69564 - bar: 2, // indent 8 more 69565 - foobar: [ // indent 8 more 69566 - 1, // indent 8 more 69567 - 2, // indent 16 more 69568 - 3 // indent 16 more 69569 + bar: 2, 69570 + foobar: [ 69571 + 1, 69572 + 2, 69573 + 3 69574 ], 69575 - callback: function(){ // indent 8 more 69576 - return true; // indent 8 more 69577 - } // indent 8 more 69578 + callback: function(){ 69579 + return true; 69580 + } 69581 }, options||{})); 69582 } 69583 })(jQuery); 61266 69584 diff -Naur vim74.orig/src/testdir/test32.in vim74/src/testdir/test32.in 61267 69585 --- vim74.orig/src/testdir/test32.in 2010-05-15 11:04:10.000000000 +0000 61268 +++ vim74/src/testdir/test32.in 2014-0 6-01 00:43:19.207467400+000069586 +++ vim74/src/testdir/test32.in 2014-07-21 23:33:46.013450625 +0000 61269 69587 @@ -36,6 +36,9 @@ 61270 69588 :w Xtest11.one … … 61279 69597 diff -Naur vim74.orig/src/testdir/test34.in vim74/src/testdir/test34.in 61280 69598 --- vim74.orig/src/testdir/test34.in 2012-07-16 14:51:29.000000000 +0000 61281 +++ vim74/src/testdir/test34.in 2014-0 6-01 00:43:19.244133973+000069599 +++ vim74/src/testdir/test34.in 2014-07-21 23:33:46.073450469 +0000 61282 69600 @@ -1,6 +1,7 @@ 61283 69601 Test for user functions. … … 61309 69627 diff -Naur vim74.orig/src/testdir/test34.ok vim74/src/testdir/test34.ok 61310 69628 --- vim74.orig/src/testdir/test34.ok 2012-07-16 14:43:15.000000000 +0000 61311 +++ vim74/src/testdir/test34.ok 2014-0 6-01 00:43:19.250800623+000069629 +++ vim74/src/testdir/test34.ok 2014-07-21 23:33:46.080117118 +0000 61312 69630 @@ -6,3 +6,5 @@ 61313 69631 1. one again … … 61318 69636 diff -Naur vim74.orig/src/testdir/test37.ok vim74/src/testdir/test37.ok 61319 69637 --- vim74.orig/src/testdir/test37.ok 2010-05-15 11:04:10.000000000 +0000 61320 +++ vim74/src/testdir/test37.ok 2014-0 6-01 00:43:19.300800496 +000069638 +++ vim74/src/testdir/test37.ok 2014-07-21 23:33:46.143450286 +0000 61321 69639 @@ -27,7 +27,7 @@ 61322 69640 … … 61332 69650 diff -Naur vim74.orig/src/testdir/test39.in vim74/src/testdir/test39.in 61333 69651 --- vim74.orig/src/testdir/test39.in 2013-03-07 17:30:38.000000000 +0000 61334 +++ vim74/src/testdir/test39.in 2014-0 6-01 00:43:19.330800419+000069652 +++ vim74/src/testdir/test39.in 2014-07-21 23:33:46.173450208 +0000 61335 69653 @@ -19,6 +19,28 @@ 61336 69654 :" Test block-change … … 61404 69722 diff -Naur vim74.orig/src/testdir/test39.ok vim74/src/testdir/test39.ok 61405 69723 --- vim74.orig/src/testdir/test39.ok 2013-03-07 17:28:51.000000000 +0000 61406 +++ vim74/src/testdir/test39.ok 2014-0 6-01 00:43:19.334133744+000069724 +++ vim74/src/testdir/test39.ok 2014-07-21 23:33:46.173450208 +0000 61407 69725 @@ -3,6 +3,24 @@ 61408 69726 axyzqqqqef mno ghijklm … … 61458 69776 diff -Naur vim74.orig/src/testdir/test44.in vim74/src/testdir/test44.in 61459 69777 --- vim74.orig/src/testdir/test44.in 2013-05-26 12:16:31.000000000 +0000 61460 +++ vim74/src/testdir/test44.in 2014-0 6-01 00:43:19.467466738+000069778 +++ vim74/src/testdir/test44.in 2014-07-21 23:33:46.286783245 +0000 61461 69779 @@ -1,9 +1,11 @@ 61462 69780 Tests for regexp with multi-byte encoding and various magic settings. … … 61473 69791 diff -Naur vim74.orig/src/testdir/test49.in vim74/src/testdir/test49.in 61474 69792 --- vim74.orig/src/testdir/test49.in 2012-11-15 21:29:55.000000000 +0000 61475 +++ vim74/src/testdir/test49.in 2014-0 6-01 00:43:19.560799833 +000069793 +++ vim74/src/testdir/test49.in 2014-07-21 23:33:46.400116283 +0000 61476 69794 @@ -1,7 +1,7 @@ 61477 69795 This is a test of the script language. … … 61485 69803 diff -Naur vim74.orig/src/testdir/test53.in vim74/src/testdir/test53.in 61486 69804 --- vim74.orig/src/testdir/test53.in 2013-06-30 12:31:56.000000000 +0000 61487 +++ vim74/src/testdir/test53.in 2014-0 6-01 00:43:19.714132776+000069805 +++ vim74/src/testdir/test53.in 2014-07-21 23:33:46.543449242 +0000 61488 69806 @@ -4,6 +4,8 @@ 61489 69807 … … 61559 69877 diff -Naur vim74.orig/src/testdir/test53.ok vim74/src/testdir/test53.ok 61560 69878 --- vim74.orig/src/testdir/test53.ok 2013-06-30 12:31:56.000000000 +0000 61561 +++ vim74/src/testdir/test53.ok 2014-0 6-01 00:43:19.720799426+000069879 +++ vim74/src/testdir/test53.ok 2014-07-21 23:33:46.550115892 +0000 61562 69880 @@ -18,6 +18,28 @@ 61563 69881 a … … 61608 69926 diff -Naur vim74.orig/src/testdir/test55.in vim74/src/testdir/test55.in 61609 69927 --- vim74.orig/src/testdir/test55.in 2013-03-07 13:33:12.000000000 +0000 61610 +++ vim74/src/testdir/test55.in 2014-0 6-01 00:43:19.757465999+000069928 +++ vim74/src/testdir/test55.in 2014-07-21 23:33:46.586782463 +0000 61611 69929 @@ -282,6 +282,13 @@ 61612 69930 : $put =ps … … 61623 69941 :" a:000 function argument 61624 69942 :" first the tests that should fail 61625 @@ -316,13 +323, 15@@69943 @@ -316,13 +323,21 @@ 61626 69944 : $put ='caught ' . v:exception 61627 69945 :endtry … … 61638 69956 :$put =string(sort(reverse(sort(l)))) 61639 69957 +:$put =string(uniq(sort(l))) 69958 +:let l=[7, 9, 'one', 18, 12, 22, 'two', 10.0e-16, -1, 'three', 0xff, 0.22, 'four'] 69959 +:$put =string(sort(copy(l), 'n')) 69960 +:let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []] 69961 +:$put =string(sort(copy(l), 1)) 69962 +:$put =string(sort(copy(l), 'i')) 69963 +:$put =string(sort(copy(l))) 61640 69964 :" 61641 69965 :" splitting a string to a List … … 61643 69967 diff -Naur vim74.orig/src/testdir/test55.ok vim74/src/testdir/test55.ok 61644 69968 --- vim74.orig/src/testdir/test55.ok 2012-08-29 14:51:15.000000000 +0000 61645 +++ vim74/src/testdir/test55.ok 2014-0 6-01 00:43:19.767465974+000061646 @@ -86,16 +86,2 1@@69969 +++ vim74/src/testdir/test55.ok 2014-07-21 23:33:46.596782436 +0000 69970 @@ -86,16 +86,25 @@ 61647 69971 FFpFFpp 61648 69972 0000-000 … … 61668 69992 +['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] 61669 69993 +['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] 69994 +[-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] 69995 +['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] 69996 +['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] 69997 +['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] 61670 69998 ['aa', 'bb'] 61671 69999 ['aa', 'bb'] … … 61673 70001 diff -Naur vim74.orig/src/testdir/test60.in vim74/src/testdir/test60.in 61674 70002 --- vim74.orig/src/testdir/test60.in 2010-05-15 11:04:10.000000000 +0000 61675 +++ vim74/src/testdir/test60.in 2014-0 6-01 00:43:19.904132292+000070003 +++ vim74/src/testdir/test60.in 2014-07-21 23:33:46.753448694 +0000 61676 70004 @@ -1,4 +1,4 @@ 61677 70005 -Tests for the exists() function. vim: set ft=vim : … … 61757 70085 diff -Naur vim74.orig/src/testdir/test60.ok vim74/src/testdir/test60.ok 61758 70086 --- vim74.orig/src/testdir/test60.ok 2010-05-15 11:04:10.000000000 +0000 61759 +++ vim74/src/testdir/test60.ok 2014-0 6-01 00:43:19.930798891+000070087 +++ vim74/src/testdir/test60.ok 2014-07-21 23:33:46.770115318 +0000 61760 70088 @@ -71,6 +71,10 @@ 61761 70089 OK … … 61792 70120 diff -Naur vim74.orig/src/testdir/test62.in vim74/src/testdir/test62.in 61793 70121 --- vim74.orig/src/testdir/test62.in 2013-07-14 11:37:12.000000000 +0000 61794 +++ vim74/src/testdir/test62.in 2014-0 6-01 00:43:19.970798789 +000070122 +++ vim74/src/testdir/test62.in 2014-07-21 23:33:46.800115239 +0000 61795 70123 @@ -2,6 +2,7 @@ 61796 70124 … … 61801 70129 :tabnew 61802 70130 :let nr = tabpagenr() 70131 diff -Naur vim74.orig/src/testdir/test63.in vim74/src/testdir/test63.in 70132 --- vim74.orig/src/testdir/test63.in 2010-05-15 11:04:10.000000000 +0000 70133 +++ vim74/src/testdir/test63.in 2014-07-21 23:33:46.833448486 +0000 70134 @@ -1,5 +1,5 @@ 70135 Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()", 70136 -"matchadd()", "matcharg()", "matchdelete()", and "setmatches()". 70137 +"matchadd()", "matchaddpos", "matcharg()", "matchdelete()", and "setmatches()". 70138 70139 STARTTEST 70140 :so small.vim 70141 @@ -147,9 +147,26 @@ 70142 :unlet rf1 70143 :unlet rf2 70144 :unlet rf3 70145 -:highlight clear MyGroup1 70146 -:highlight clear MyGroup2 70147 -:highlight clear MyGroup3 70148 +:" --- Check that "matchaddpos()" positions matches correctly 70149 +:let @r .= "*** Test 11:\n" 70150 +:set nolazyredraw 70151 +:call setline(1, 'abcdefghijklmnopq') 70152 +:call matchaddpos("MyGroup1", [[1, 5], [1, 8, 3]], 10, 3) 70153 +:1 70154 +:redraw! 70155 +:let v1 = screenattr(1, 1) 70156 +:let v5 = screenattr(1, 5) 70157 +:let v6 = screenattr(1, 6) 70158 +:let v8 = screenattr(1, 8) 70159 +:let v10 = screenattr(1, 10) 70160 +:let v11 = screenattr(1, 11) 70161 +:let @r .= string(getmatches())."\n" 70162 +:if v1 != v5 && v6 == v1 && v8 == v5 && v10 == v5 && v11 == v1 70163 +: let @r .= "OK\n" 70164 +:else 70165 +: let @r .= "FAILED\n" 70166 +:endif 70167 +:call clearmatches() 70168 G"rp 70169 :/^Results/,$wq! test.out 70170 ENDTEST 70171 diff -Naur vim74.orig/src/testdir/test63.ok vim74/src/testdir/test63.ok 70172 --- vim74.orig/src/testdir/test63.ok 2010-05-15 11:04:10.000000000 +0000 70173 +++ vim74/src/testdir/test63.ok 2014-07-21 23:33:46.850115109 +0000 70174 @@ -9,3 +9,6 @@ 70175 *** Test 8: OK 70176 *** Test 9: OK 70177 *** Test 10: OK 70178 +*** Test 11: 70179 +[{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}] 70180 +OK 61803 70181 diff -Naur vim74.orig/src/testdir/test64.in vim74/src/testdir/test64.in 61804 70182 --- vim74.orig/src/testdir/test64.in 2013-08-01 15:45:33.000000000 +0000 61805 +++ vim74/src/testdir/test64.in 2014-0 6-01 00:43:20.014132012+000070183 +++ vim74/src/testdir/test64.in 2014-07-21 23:33:46.900114978 +0000 61806 70184 @@ -238,7 +238,11 @@ 61807 70185 :call add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz']) … … 61937 70315 diff -Naur vim74.orig/src/testdir/test64.ok vim74/src/testdir/test64.ok 61938 70316 --- vim74.orig/src/testdir/test64.ok 2013-08-01 16:28:56.000000000 +0000 61939 +++ vim74/src/testdir/test64.ok 2014-0 6-01 00:43:20.020798662+000070317 +++ vim74/src/testdir/test64.ok 2014-07-21 23:33:46.923448251 +0000 61940 70318 @@ -533,6 +533,18 @@ 61941 70319 OK 0 - \v(a{-1,3})+ … … 62118 70496 diff -Naur vim74.orig/src/testdir/test68.in vim74/src/testdir/test68.in 62119 70497 --- vim74.orig/src/testdir/test68.in 2012-07-25 13:57:06.000000000 +0000 62120 +++ vim74/src/testdir/test68.in 2014-0 6-01 00:43:20.107465108+000070498 +++ vim74/src/testdir/test68.in 2014-07-21 23:33:47.003448042 +0000 62121 70499 @@ -62,6 +62,20 @@ 62122 70500 } … … 62142 70520 diff -Naur vim74.orig/src/testdir/test68.ok vim74/src/testdir/test68.ok 62143 70521 --- vim74.orig/src/testdir/test68.ok 2012-07-25 14:03:05.000000000 +0000 62144 +++ vim74/src/testdir/test68.ok 2014-0 6-01 00:43:20.117465083+000070522 +++ vim74/src/testdir/test68.ok 2014-07-21 23:33:47.013448016 +0000 62145 70523 @@ -43,6 +43,15 @@ 62146 70524 … … 62161 70539 diff -Naur vim74.orig/src/testdir/test69.in vim74/src/testdir/test69.in 62162 70540 --- vim74.orig/src/testdir/test69.in 2013-03-07 17:30:50.000000000 +0000 62163 +++ vim74/src/testdir/test69.in 2014-0 6-01 00:43:20.130798382+000070541 +++ vim74/src/testdir/test69.in 2014-07-21 23:33:47.016781341 +0000 62164 70542 @@ -1,6 +1,7 @@ 62165 70543 Test for multi-byte text formatting. … … 62170 70548 STARTTEST 62171 70549 :so mbyte.vim 62172 @@ -154,6 +155,3 1@@70550 @@ -154,6 +155,38 @@ 62173 70551 ïœïœb 62174 70552 … … 62199 70577 + 62200 70578 +STARTTEST 70579 +/^substitute 70580 +:let y = substitute('ïŒïŒïŒ', '\zs', 'a', 'g') | put =y 70581 +ENDTEST 70582 + 70583 +substitute 70584 + 70585 +STARTTEST 62201 70586 :g/^STARTTEST/.,/^ENDTEST/d 62202 70587 :1;/^Results/,$wq! test.out … … 62204 70589 diff -Naur vim74.orig/src/testdir/test69.ok vim74/src/testdir/test69.ok 62205 70590 --- vim74.orig/src/testdir/test69.ok 2013-03-07 17:31:32.000000000 +0000 62206 +++ vim74/src/testdir/test69.ok 2014-0 6-01 00:43:20.137465032+000062207 @@ -149,3 +149,1 4@@70591 +++ vim74/src/testdir/test69.ok 2014-07-21 23:33:47.033447964 +0000 70592 @@ -149,3 +149,18 @@ 62208 70593 aaaa 62209 70594 aaa … … 62220 70605 +[0, 1, 2, 4, 5, -1] 62221 70606 + 70607 + 70608 +substitute 70609 +aïŒaïŒaïŒa 70610 + 62222 70611 diff -Naur vim74.orig/src/testdir/test72.in vim74/src/testdir/test72.in 62223 70612 --- vim74.orig/src/testdir/test72.in 2012-01-04 18:04:17.000000000 +0000 62224 +++ vim74/src/testdir/test72.in 2014-0 6-01 00:43:20.217464828+000070613 +++ vim74/src/testdir/test72.in 2014-07-21 23:33:47.126781054 +0000 62225 70614 @@ -105,7 +105,11 @@ 62226 70615 u:.w >>test.out … … 62238 70627 diff -Naur vim74.orig/src/testdir/test75.in vim74/src/testdir/test75.in 62239 70628 --- vim74.orig/src/testdir/test75.in 2013-06-29 11:48:42.000000000 +0000 62240 +++ vim74/src/testdir/test75.in 2014-0 6-01 00:43:20.277464675+000070629 +++ vim74/src/testdir/test75.in 2014-07-21 23:33:47.193447546 +0000 62241 70630 @@ -1,8 +1,11 @@ 62242 70631 -" Tests for functions. … … 62275 70664 diff -Naur vim74.orig/src/testdir/test75.ok vim74/src/testdir/test75.ok 62276 70665 --- vim74.orig/src/testdir/test75.ok 2013-06-29 11:50:08.000000000 +0000 62277 +++ vim74/src/testdir/test75.ok 2014-0 6-01 00:43:20.294131299+000070666 +++ vim74/src/testdir/test75.ok 2014-07-21 23:33:47.200114196 +0000 62278 70667 @@ -4,3 +4,4 @@ 62279 70668 {'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ', 'nowait': 1, 'expr': 0, 'sid': 0, 'rhs': 'bar', 'buffer': 1} … … 62283 70672 diff -Naur vim74.orig/src/testdir/test77a.com vim74/src/testdir/test77a.com 62284 70673 --- vim74.orig/src/testdir/test77a.com 1970-01-01 00:00:00.000000000 +0000 62285 +++ vim74/src/testdir/test77a.com 2014-0 6-01 00:43:20.344131172+000070674 +++ vim74/src/testdir/test77a.com 2014-07-21 23:33:47.273447338 +0000 62286 70675 @@ -0,0 +1,8 @@ 62287 70676 +$! test77a - help file creating checksum on VMS … … 62295 70684 diff -Naur vim74.orig/src/testdir/test77a.in vim74/src/testdir/test77a.in 62296 70685 --- vim74.orig/src/testdir/test77a.in 1970-01-01 00:00:00.000000000 +0000 62297 +++ vim74/src/testdir/test77a.in 2014-0 6-01 00:43:20.347464497+000070686 +++ vim74/src/testdir/test77a.in 2014-07-21 23:33:47.276780662 +0000 62298 70687 @@ -0,0 +1,31 @@ 62299 70688 +Inserts 2 million lines with consecutive integers starting from 1 … … 62330 70719 diff -Naur vim74.orig/src/testdir/test77a.ok vim74/src/testdir/test77a.ok 62331 70720 --- vim74.orig/src/testdir/test77a.ok 1970-01-01 00:00:00.000000000 +0000 62332 +++ vim74/src/testdir/test77a.ok 2014-0 6-01 00:43:20.347464497+000070721 +++ vim74/src/testdir/test77a.ok 2014-07-21 23:33:47.276780662 +0000 62333 70722 @@ -0,0 +1 @@ 62334 70723 + CHECKSUM$CHECKSUM = "844110470" 62335 70724 diff -Naur vim74.orig/src/testdir/test79.in vim74/src/testdir/test79.in 62336 70725 --- vim74.orig/src/testdir/test79.in 2013-04-13 09:16:38.000000000 +0000 62337 +++ vim74/src/testdir/test79.in 2014-0 6-01 00:43:20.380797745+000070726 +++ vim74/src/testdir/test79.in 2014-07-21 23:33:47.310113909 +0000 62338 70727 @@ -1,6 +1,7 @@ 62339 70728 Test for *sub-replace-special* and *sub-replace-expression* on :substitute. … … 62404 70793 diff -Naur vim74.orig/src/testdir/test79.ok vim74/src/testdir/test79.ok 62405 70794 --- vim74.orig/src/testdir/test79.ok 2013-03-19 16:30:51.000000000 +0000 62406 +++ vim74/src/testdir/test79.ok 2014-0 6-01 00:43:20.387464395+000070795 +++ vim74/src/testdir/test79.ok 2014-07-21 23:33:47.316780558 +0000 62407 70796 @@ -105,6 +105,7 @@ 62408 70797 … … 62431 70820 diff -Naur vim74.orig/src/testdir/test80.in vim74/src/testdir/test80.in 62432 70821 --- vim74.orig/src/testdir/test80.in 2013-03-19 16:30:51.000000000 +0000 62433 +++ vim74/src/testdir/test80.in 2014-0 6-01 00:43:20.430797618 +000070822 +++ vim74/src/testdir/test80.in 2014-07-21 23:33:47.360113778 +0000 62434 70823 @@ -117,6 +117,7 @@ 62435 70824 :set cpo& … … 62477 70866 diff -Naur vim74.orig/src/testdir/test80.ok vim74/src/testdir/test80.ok 62478 70867 --- vim74.orig/src/testdir/test80.ok 2013-03-19 16:31:45.000000000 +0000 62479 +++ vim74/src/testdir/test80.ok 2014-0 6-01 00:43:20.450797567+000070868 +++ vim74/src/testdir/test80.ok 2014-07-21 23:33:47.380113726 +0000 62480 70869 @@ -90,6 +90,7 @@ 62481 70870 … … 62515 70904 diff -Naur vim74.orig/src/testdir/test86.in vim74/src/testdir/test86.in 62516 70905 --- vim74.orig/src/testdir/test86.in 2013-07-13 12:00:31.000000000 +0000 62517 +++ vim74/src/testdir/test86.in 2014-0 6-01 00:43:20.647463733+000070906 +++ vim74/src/testdir/test86.in 2014-07-21 23:33:47.566779906 +0000 62518 70907 @@ -39,6 +39,7 @@ 62519 70908 py << EOF … … 62852 71241 diff -Naur vim74.orig/src/testdir/test86.ok vim74/src/testdir/test86.ok 62853 71242 --- vim74.orig/src/testdir/test86.ok 2013-06-23 14:38:39.000000000 +0000 62854 +++ vim74/src/testdir/test86.ok 2014-0 6-01 00:43:20.687463631 +000071243 +++ vim74/src/testdir/test86.ok 2014-07-21 23:33:47.606779801 +0000 62855 71244 @@ -41,6 +41,9 @@ 62856 71245 [2, 3] … … 63080 71469 diff -Naur vim74.orig/src/testdir/test87.in vim74/src/testdir/test87.in 63081 71470 --- vim74.orig/src/testdir/test87.in 2013-07-06 11:41:30.000000000 +0000 63082 +++ vim74/src/testdir/test87.in 2014-0 6-01 00:43:20.717463555+000071471 +++ vim74/src/testdir/test87.in 2014-07-21 23:33:47.646779697 +0000 63083 71472 @@ -33,6 +33,7 @@ 63084 71473 py3 << EOF … … 63442 71831 diff -Naur vim74.orig/src/testdir/test87.ok vim74/src/testdir/test87.ok 63443 71832 --- vim74.orig/src/testdir/test87.ok 2013-06-23 14:38:39.000000000 +0000 63444 +++ vim74/src/testdir/test87.ok 2014-0 6-01 00:43:20.747463478+000071833 +++ vim74/src/testdir/test87.ok 2014-07-21 23:33:47.690112917 +0000 63445 71834 @@ -41,6 +41,9 @@ 63446 71835 [2, 3] … … 63681 72070 diff -Naur vim74.orig/src/testdir/test92.in vim74/src/testdir/test92.in 63682 72071 --- vim74.orig/src/testdir/test92.in 2013-04-18 21:33:45.000000000 +0000 63683 +++ vim74/src/testdir/test92.in 2014-0 6-01 00:43:20.880796472+000072072 +++ vim74/src/testdir/test92.in 2014-07-21 23:33:47.820112578 +0000 63684 72073 @@ -33,7 +33,7 @@ 63685 72074 :mksession! test.out … … 63693 72082 diff -Naur vim74.orig/src/testdir/test93.in vim74/src/testdir/test93.in 63694 72083 --- vim74.orig/src/testdir/test93.in 2013-02-26 16:13:01.000000000 +0000 63695 +++ vim74/src/testdir/test93.in 2014-0 6-01 00:43:20.904129746+000072084 +++ vim74/src/testdir/test93.in 2014-07-21 23:33:47.846779175 +0000 63696 72085 @@ -33,7 +33,7 @@ 63697 72086 :mksession! test.out … … 63705 72094 diff -Naur vim74.orig/src/testdir/test95.in vim74/src/testdir/test95.in 63706 72095 --- vim74.orig/src/testdir/test95.in 2013-07-21 14:53:52.000000000 +0000 63707 +++ vim74/src/testdir/test95.in 2014-0 6-01 00:43:20.937462994 +000072096 +++ vim74/src/testdir/test95.in 2014-07-21 23:33:47.903445694 +0000 63708 72097 @@ -50,6 +50,12 @@ 63709 72098 :call add(tl, [2, ".\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"]) … … 63750 72139 diff -Naur vim74.orig/src/testdir/test95.ok vim74/src/testdir/test95.ok 63751 72140 --- vim74.orig/src/testdir/test95.ok 2013-07-21 15:01:22.000000000 +0000 63752 +++ vim74/src/testdir/test95.ok 2014-0 6-01 00:43:20.940796319+000072141 +++ vim74/src/testdir/test95.ok 2014-07-21 23:33:47.920112317 +0000 63753 72142 @@ -67,6 +67,24 @@ 63754 72143 OK 0 - .Ö¹Ö» … … 63778 72167 diff -Naur vim74.orig/src/testdir/test97.in vim74/src/testdir/test97.in 63779 72168 --- vim74.orig/src/testdir/test97.in 2013-08-02 12:55:50.000000000 +0000 63780 +++ vim74/src/testdir/test97.in 2014-0 6-01 00:43:20.960796268 +000072169 +++ vim74/src/testdir/test97.in 2014-07-21 23:33:47.956778888 +0000 63781 72170 @@ -3,14 +3,20 @@ 63782 72171 … … 63806 72195 diff -Naur vim74.orig/src/testdir/test97.ok vim74/src/testdir/test97.ok 63807 72196 --- vim74.orig/src/testdir/test97.ok 2013-07-03 14:14:50.000000000 +0000 63808 +++ vim74/src/testdir/test97.ok 2014-0 6-01 00:43:20.964129593 +000072197 +++ vim74/src/testdir/test97.ok 2014-07-21 23:33:47.960112213 +0000 63809 72198 @@ -3,3 +3,6 @@ 63810 72199 … … 63816 72205 diff -Naur vim74.orig/src/testdir/test99.in vim74/src/testdir/test99.in 63817 72206 --- vim74.orig/src/testdir/test99.in 1970-01-01 00:00:00.000000000 +0000 63818 +++ vim74/src/testdir/test99.in 2014-0 6-01 00:43:21.017462791+000072207 +++ vim74/src/testdir/test99.in 2014-07-21 23:33:47.990112134 +0000 63819 72208 @@ -0,0 +1,68 @@ 63820 72209 +Tests for regexp with multi-byte encoding and various magic settings. … … 63894 72283 diff -Naur vim74.orig/src/testdir/test99.ok vim74/src/testdir/test99.ok 63895 72284 --- vim74.orig/src/testdir/test99.ok 1970-01-01 00:00:00.000000000 +0000 63896 +++ vim74/src/testdir/test99.ok 2014-0 6-01 00:43:21.020796116+000072285 +++ vim74/src/testdir/test99.ok 2014-07-21 23:33:47.993445459 +0000 63897 72286 @@ -0,0 +1,24 @@ 63898 72287 +1 a aa abb abbcc … … 63927 72316 diff -Naur vim74.orig/src/testdir/test_autoformat_join.in vim74/src/testdir/test_autoformat_join.in 63928 72317 --- vim74.orig/src/testdir/test_autoformat_join.in 1970-01-01 00:00:00.000000000 +0000 63929 +++ vim74/src/testdir/test_autoformat_join.in 2014-0 6-01 00:43:21.024129440+000072318 +++ vim74/src/testdir/test_autoformat_join.in 2014-07-21 23:33:47.996778784 +0000 63930 72319 @@ -0,0 +1,23 @@ 63931 72320 +Tests for setting the '[,'] marks when joining lines. … … 63954 72343 diff -Naur vim74.orig/src/testdir/test_autoformat_join.ok vim74/src/testdir/test_autoformat_join.ok 63955 72344 --- vim74.orig/src/testdir/test_autoformat_join.ok 1970-01-01 00:00:00.000000000 +0000 63956 +++ vim74/src/testdir/test_autoformat_join.ok 2014-0 6-01 00:43:21.024129440+000072345 +++ vim74/src/testdir/test_autoformat_join.ok 2014-07-21 23:33:48.000112108 +0000 63957 72346 @@ -0,0 +1,8 @@ 63958 72347 + O sodales, ludite, vos qui attamen consulite per voster honur. … … 63964 72353 +First test: Start/End '[0, 16, 1, 0]/[0, 17, 1, 0]' 63965 72354 +Second test: Start/End '[0, 19, 11, 0]/[0, 19, 67, 0]' 72355 diff -Naur vim74.orig/src/testdir/test_breakindent.in vim74/src/testdir/test_breakindent.in 72356 --- vim74.orig/src/testdir/test_breakindent.in 1970-01-01 00:00:00.000000000 +0000 72357 +++ vim74/src/testdir/test_breakindent.in 2014-07-21 23:33:48.010112082 +0000 72358 @@ -0,0 +1,79 @@ 72359 +Test for breakindent 72360 + 72361 +STARTTEST 72362 +:so small.vim 72363 +:if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif 72364 +:10new|:vsp|:vert resize 20 72365 +:put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\" 72366 +:set ts=4 sw=4 sts=4 breakindent 72367 +:fu! ScreenChar(width) 72368 +: let c='' 72369 +: for i in range(1,a:width) 72370 +: let c.=nr2char(screenchar(line('.'), i)) 72371 +: endfor 72372 +: let c.="\n" 72373 +: for i in range(1,a:width) 72374 +: let c.=nr2char(screenchar(line('.')+1, i)) 72375 +: endfor 72376 +: let c.="\n" 72377 +: for i in range(1,a:width) 72378 +: let c.=nr2char(screenchar(line('.')+2, i)) 72379 +: endfor 72380 +: return c 72381 +:endfu 72382 +:fu DoRecordScreen() 72383 +: wincmd l 72384 +: $put =printf(\"\n%s\", g:test) 72385 +: $put =g:line1 72386 +: wincmd p 72387 +:endfu 72388 +:let g:test="Test 1: Simple breakindent" 72389 +:let line1=ScreenChar(8) 72390 +:call DoRecordScreen() 72391 +:let g:test="Test 2: Simple breakindent + sbr=>>" 72392 +:set sbr=>> 72393 +:let line1=ScreenChar(8) 72394 +:call DoRecordScreen() 72395 +:let g:test ="Test 3: Simple breakindent + briopt:sbr" 72396 +:set briopt=sbr,min:0 sbr=++ 72397 +:let line1=ScreenChar(8) 72398 +:call DoRecordScreen() 72399 +:let g:test ="Test 4: Simple breakindent + min width: 18" 72400 +:set sbr= briopt=min:18 72401 +:let line1=ScreenChar(8) 72402 +:call DoRecordScreen() 72403 +:let g:test =" Test 5: Simple breakindent + shift by 2" 72404 +:set briopt=shift:2,min:0 72405 +:let line1=ScreenChar(8) 72406 +:call DoRecordScreen() 72407 +:let g:test=" Test 6: Simple breakindent + shift by -1" 72408 +:set briopt=shift:-1,min:0 72409 +:let line1=ScreenChar(8) 72410 +:call DoRecordScreen() 72411 +:let g:test=" Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr" 72412 +:set briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 72413 +:let line1=ScreenChar(10) 72414 +:call DoRecordScreen() 72415 +:let g:test=" Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr" 72416 +:set briopt=shift:1,sbr,min:0 nu sbr=# list 72417 +:let line1=ScreenChar(10) 72418 +:call DoRecordScreen() 72419 +:let g:test=" Test 9: breakindent + shift by +1 + 'nu' + sbr=# list" 72420 +:set briopt-=sbr 72421 +:let line1=ScreenChar(10) 72422 +:call DoRecordScreen() 72423 +:let g:test=" Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n" 72424 +:set cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0 72425 +:let line1=ScreenChar(10) 72426 +:call DoRecordScreen() 72427 +:wincmd p 72428 +:let g:test="\n Test 11: strdisplaywidth when breakindent is on" 72429 +:set cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 72430 +:let text=getline(2) "skip leading tab when calculating text width 72431 +:let width = strlen(text[1:])+indent(2)*4+strlen(&sbr)*3 " text wraps 3 times 72432 +:$put =g:test 72433 +:$put =printf(\"strdisplaywidth: %d == calculated: %d\", strdisplaywidth(text), width) 72434 +:%w! test.out 72435 +:qa! 72436 +ENDTEST 72437 +dummy text 72438 diff -Naur vim74.orig/src/testdir/test_breakindent.ok vim74/src/testdir/test_breakindent.ok 72439 --- vim74.orig/src/testdir/test_breakindent.ok 1970-01-01 00:00:00.000000000 +0000 72440 +++ vim74/src/testdir/test_breakindent.ok 2014-07-21 23:33:48.020112056 +0000 72441 @@ -0,0 +1,55 @@ 72442 + 72443 + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP 72444 + 72445 +Test 1: Simple breakindent 72446 + abcd 72447 + qrst 72448 + GHIJ 72449 + 72450 +Test 2: Simple breakindent + sbr=>> 72451 + abcd 72452 + >>qr 72453 + >>EF 72454 + 72455 +Test 3: Simple breakindent + briopt:sbr 72456 + abcd 72457 +++ qrst 72458 +++ GHIJ 72459 + 72460 +Test 4: Simple breakindent + min width: 18 72461 + abcd 72462 + qrstuv 72463 + IJKLMN 72464 + 72465 + Test 5: Simple breakindent + shift by 2 72466 + abcd 72467 + qr 72468 + EF 72469 + 72470 + Test 6: Simple breakindent + shift by -1 72471 + abcd 72472 + qrstu 72473 + HIJKL 72474 + 72475 + Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr 72476 + 2 ab 72477 +? m 72478 +? x 72479 + 72480 + Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr 72481 + 2 ^Iabcd 72482 +# opq 72483 +# BCD 72484 + 72485 + Test 9: breakindent + shift by +1 + 'nu' + sbr=# list 72486 + 2 ^Iabcd 72487 + #op 72488 + #AB 72489 + 72490 + Test 10: breakindent + shift by +1 + 'nu' + sbr=~ cpo+=n 72491 + 2 ab 72492 +~ mn 72493 +~ yz 72494 + 72495 + Test 11: strdisplaywidth when breakindent is on 72496 +strdisplaywidth: 46 == calculated: 64 63966 72497 diff -Naur vim74.orig/src/testdir/test_eval.in vim74/src/testdir/test_eval.in 63967 72498 --- vim74.orig/src/testdir/test_eval.in 1970-01-01 00:00:00.000000000 +0000 63968 +++ vim74/src/testdir/test_eval.in 2014-0 6-01 00:43:21.027462765+000072499 +++ vim74/src/testdir/test_eval.in 2014-07-21 23:33:48.023445381 +0000 63969 72500 @@ -0,0 +1,207 @@ 63970 72501 +Test for various eval features. vim: set ft=vim : … … 64177 72708 diff -Naur vim74.orig/src/testdir/test_eval.ok vim74/src/testdir/test_eval.ok 64178 72709 --- vim74.orig/src/testdir/test_eval.ok 1970-01-01 00:00:00.000000000 +0000 64179 +++ vim74/src/testdir/test_eval.ok 2014-0 6-01 00:43:21.030796090+000072710 +++ vim74/src/testdir/test_eval.ok 2014-07-21 23:33:48.026778705 +0000 64180 72711 @@ -0,0 +1,350 @@ 64181 72712 +{{{1 let tests … … 64535 73066 diff -Naur vim74.orig/src/testdir/test_eval_func.vim vim74/src/testdir/test_eval_func.vim 64536 73067 --- vim74.orig/src/testdir/test_eval_func.vim 1970-01-01 00:00:00.000000000 +0000 64537 +++ vim74/src/testdir/test_eval_func.vim 2014-0 6-01 00:43:21.034129415+000073068 +++ vim74/src/testdir/test_eval_func.vim 2014-07-21 23:33:48.030112030 +0000 64538 73069 @@ -0,0 +1,10 @@ 64539 73070 +" Vim script used in test_eval.in. Needed for script-local function. … … 64547 73078 +$put ='Bar exists: ' . exists('Bar') 64548 73079 +$put ='func Bar exists: ' . exists('*Bar') 73080 diff -Naur vim74.orig/src/testdir/test_listlbr.in vim74/src/testdir/test_listlbr.in 73081 --- vim74.orig/src/testdir/test_listlbr.in 1970-01-01 00:00:00.000000000 +0000 73082 +++ vim74/src/testdir/test_listlbr.in 2014-07-21 23:33:48.030112030 +0000 73083 @@ -0,0 +1,52 @@ 73084 +Test for linebreak and list option (non-utf8) 73085 + 73086 +STARTTEST 73087 +:so small.vim 73088 +:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif 73089 +:10new|:vsp|:vert resize 20 73090 +:put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \" 73091 +:norm! zt 73092 +:set ts=4 sw=4 sts=4 linebreak sbr=+ wrap 73093 +:fu! ScreenChar(width) 73094 +: let c='' 73095 +: for j in range(1,4) 73096 +: for i in range(1,a:width) 73097 +: let c.=nr2char(screenchar(j, i)) 73098 +: endfor 73099 +: let c.="\n" 73100 +: endfor 73101 +: return c 73102 +:endfu 73103 +:fu! DoRecordScreen() 73104 +: wincmd l 73105 +: $put =printf(\"\n%s\", g:test) 73106 +: $put =g:line 73107 +: wincmd p 73108 +:endfu 73109 +:let g:test="Test 1: set linebreak" 73110 +:redraw! 73111 +:let line=ScreenChar(winwidth(0)) 73112 +:call DoRecordScreen() 73113 +:let g:test="Test 2: set linebreak + set list" 73114 +:set linebreak list listchars= 73115 +:redraw! 73116 +:let line=ScreenChar(winwidth(0)) 73117 +:call DoRecordScreen() 73118 +:let g:test ="Test 3: set linebreak nolist" 73119 +:set nolist linebreak 73120 +:redraw! 73121 +:let line=ScreenChar(winwidth(0)) 73122 +:call DoRecordScreen() 73123 +:let g:test ="Test 4: set linebreak with tab and 1 line as long as screen: should break!" 73124 +:set nolist linebreak ts=8 73125 +:let line="1\t".repeat('a', winwidth(0)-2) 73126 +:$put =line 73127 +:$ 73128 +:norm! zt 73129 +:redraw! 73130 +:let line=ScreenChar(winwidth(0)) 73131 +:call DoRecordScreen() 73132 +:%w! test.out 73133 +:qa! 73134 +ENDTEST 73135 +dummy text 73136 diff -Naur vim74.orig/src/testdir/test_listlbr.ok vim74/src/testdir/test_listlbr.ok 73137 --- vim74.orig/src/testdir/test_listlbr.ok 1970-01-01 00:00:00.000000000 +0000 73138 +++ vim74/src/testdir/test_listlbr.ok 2014-07-21 23:33:48.036778679 +0000 73139 @@ -0,0 +1,27 @@ 73140 + 73141 + abcdef hijklmn pqrstuvwxyz_1060ABCDEFGHIJKLMNOP 73142 + 73143 +Test 1: set linebreak 73144 + abcdef 73145 ++hijklmn 73146 ++pqrstuvwxyz_1060ABC 73147 ++DEFGHIJKLMNOP 73148 + 73149 +Test 2: set linebreak + set list 73150 +^Iabcdef hijklmn^I 73151 ++pqrstuvwxyz_1060ABC 73152 ++DEFGHIJKLMNOP 73153 + 73154 + 73155 +Test 3: set linebreak nolist 73156 + abcdef 73157 ++hijklmn 73158 ++pqrstuvwxyz_1060ABC 73159 ++DEFGHIJKLMNOP 73160 +1 aaaaaaaaaaaaaaaaaa 73161 + 73162 +Test 4: set linebreak with tab and 1 line as long as screen: should break! 73163 +1 73164 ++aaaaaaaaaaaaaaaaaa 73165 +~ 73166 +~ 73167 diff -Naur vim74.orig/src/testdir/test_listlbr_utf8.in vim74/src/testdir/test_listlbr_utf8.in 73168 --- vim74.orig/src/testdir/test_listlbr_utf8.in 1970-01-01 00:00:00.000000000 +0000 73169 +++ vim74/src/testdir/test_listlbr_utf8.in 2014-07-21 23:33:48.040112004 +0000 73170 @@ -0,0 +1,41 @@ 73171 +Test for linebreak and list option in utf-8 mode 73172 + 73173 +STARTTEST 73174 +:so small.vim 73175 +:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif 73176 +:so mbyte.vim 73177 +:if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif 73178 +:10new|:vsp|:vert resize 20 73179 +:put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \" 73180 +:norm! zt 73181 +:set ts=4 sw=4 sts=4 linebreak sbr=+ wrap 73182 +:fu! ScreenChar(width) 73183 +: let c='' 73184 +: for j in range(1,4) 73185 +: for i in range(1,a:width) 73186 +: let c.=nr2char(screenchar(j, i)) 73187 +: endfor 73188 +: let c.="\n" 73189 +: endfor 73190 +: return c 73191 +:endfu 73192 +:fu! DoRecordScreen() 73193 +: wincmd l 73194 +: $put =printf(\"\n%s\", g:test) 73195 +: $put =g:line 73196 +: wincmd p 73197 +:endfu 73198 +:let g:test ="Test 1: set linebreak + set list + fancy listchars" 73199 +:exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6" 73200 +:redraw! 73201 +:let line=ScreenChar(winwidth(0)) 73202 +:call DoRecordScreen() 73203 +:let g:test ="Test 2: set nolinebreak list" 73204 +:set list nolinebreak 73205 +:redraw! 73206 +:let line=ScreenChar(winwidth(0)) 73207 +:call DoRecordScreen() 73208 +:%w! test.out 73209 +:qa! 73210 +ENDTEST 73211 +dummy text 73212 diff -Naur vim74.orig/src/testdir/test_listlbr_utf8.ok vim74/src/testdir/test_listlbr_utf8.ok 73213 --- vim74.orig/src/testdir/test_listlbr_utf8.ok 1970-01-01 00:00:00.000000000 +0000 73214 +++ vim74/src/testdir/test_listlbr_utf8.ok 2014-07-21 23:33:48.043445329 +0000 73215 @@ -0,0 +1,14 @@ 73216 + 73217 + abcdef hijklmn pqrstuvwxyz 1060ABCDEFGHIJKLMNOP 73218 + 73219 +Test 1: set linebreak + set list + fancy listchars 73220 +ââââabcdef 73221 ++hijklmnââââ 73222 ++pqrstuvwxyzâ£1060ABC 73223 ++DEFGHIJKLMNOP˶ 73224 + 73225 +Test 2: set nolinebreak list 73226 +ââââabcdef hijklmnââ 73227 ++pqrstuvwxyzâ£1060ABC 73228 ++DEFGHIJKLMNOP˶ 73229 +¶ 64549 73230 diff -Naur vim74.orig/src/testdir/test_options.in vim74/src/testdir/test_options.in 64550 73231 --- vim74.orig/src/testdir/test_options.in 1970-01-01 00:00:00.000000000 +0000 64551 +++ vim74/src/testdir/test_options.in 2014-0 6-01 00:43:21.050796039+000073232 +++ vim74/src/testdir/test_options.in 2014-07-21 23:33:48.046778653 +0000 64552 73233 @@ -0,0 +1,17 @@ 64553 73234 +Test for ":options". … … 64570 73251 diff -Naur vim74.orig/src/testdir/test_options.ok vim74/src/testdir/test_options.ok 64571 73252 --- vim74.orig/src/testdir/test_options.ok 1970-01-01 00:00:00.000000000 +0000 64572 +++ vim74/src/testdir/test_options.ok 2014-0 6-01 00:43:21.050796039+000073253 +++ vim74/src/testdir/test_options.ok 2014-07-21 23:33:48.080111900 +0000 64573 73254 @@ -0,0 +1,2 @@ 64574 73255 +result … … 64576 73257 diff -Naur vim74.orig/src/ui.c vim74/src/ui.c 64577 73258 --- vim74.orig/src/ui.c 2013-07-13 18:57:08.000000000 +0000 64578 +++ vim74/src/ui.c 2014-06-01 00:43:21.167462409 +0000 73259 +++ vim74/src/ui.c 2014-07-21 23:33:48.650110412 +0000 73260 @@ -2324,7 +2324,7 @@ 73261 if ( *target != XA_STRING 73262 #ifdef FEAT_MBYTE 73263 && *target != vimenc_atom 73264 - && *target != utf8_atom 73265 + && (*target != utf8_atom || !enc_utf8) 73266 #endif 73267 && *target != vim_atom 73268 && *target != text_atom 64579 73269 @@ -2610,13 +2610,11 @@ 64580 73270 if (on_sep_line) … … 64663 73353 curwin->w_curswant = col; 64664 73354 curwin->w_set_curswant = FALSE; /* May still have been TRUE */ 73355 @@ -3170,15 +3162,15 @@ 73356 /* try to advance to the specified column */ 73357 int count = 0; 73358 char_u *ptr; 73359 - char_u *start; 73360 + char_u *line; 73361 73362 - start = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); 73363 + line = ptr = ml_get_buf(wp->w_buffer, lnum, FALSE); 73364 while (count < vcol && *ptr != NUL) 73365 { 73366 - count += win_lbr_chartabsize(wp, ptr, count, NULL); 73367 + count += win_lbr_chartabsize(wp, line, ptr, count, NULL); 73368 mb_ptr_adv(ptr); 73369 } 73370 - return (int)(ptr - start); 73371 + return (int)(ptr - line); 73372 } 73373 #endif 73374 64665 73375 diff -Naur vim74.orig/src/undo.c vim74/src/undo.c 64666 73376 --- vim74.orig/src/undo.c 2013-06-10 18:13:37.000000000 +0000 64667 +++ vim74/src/undo.c 2014-0 6-01 00:43:21.194129007+000073377 +++ vim74/src/undo.c 2014-07-21 23:33:48.666777036 +0000 64668 73378 @@ -83,6 +83,7 @@ 64669 73379 … … 64897 73607 diff -Naur vim74.orig/src/version.c vim74/src/version.c 64898 73608 --- vim74.orig/src/version.c 2013-08-10 11:29:20.000000000 +0000 64899 +++ vim74/src/version.c 2014-0 6-01 00:43:21.227462256+000073609 +++ vim74/src/version.c 2014-07-21 23:33:48.780110073 +0000 64900 73610 @@ -60,6 +60,11 @@ 64901 73611 … … 64941 73651 NULL 64942 73652 }; 64943 @@ -728,6 +735, 638@@73653 @@ -728,6 +735,752 @@ 64944 73654 static int included_patches[] = 64945 73655 { /* Add new patch number below this line */ 64946 73656 /**/ 73657 + 373, 73658 +/**/ 73659 + 372, 73660 +/**/ 73661 + 371, 73662 +/**/ 73663 + 370, 73664 +/**/ 73665 + 369, 73666 +/**/ 73667 + 368, 73668 +/**/ 73669 + 367, 73670 +/**/ 73671 + 366, 73672 +/**/ 73673 + 365, 73674 +/**/ 73675 + 364, 73676 +/**/ 73677 + 363, 73678 +/**/ 73679 + 362, 73680 +/**/ 73681 + 361, 73682 +/**/ 73683 + 360, 73684 +/**/ 73685 + 359, 73686 +/**/ 73687 + 358, 73688 +/**/ 73689 + 357, 73690 +/**/ 73691 + 356, 73692 +/**/ 73693 + 355, 73694 +/**/ 73695 + 354, 73696 +/**/ 73697 + 353, 73698 +/**/ 73699 + 352, 73700 +/**/ 73701 + 351, 73702 +/**/ 73703 + 350, 73704 +/**/ 73705 + 349, 73706 +/**/ 73707 + 348, 73708 +/**/ 73709 + 347, 73710 +/**/ 73711 + 346, 73712 +/**/ 73713 + 345, 73714 +/**/ 73715 + 344, 73716 +/**/ 73717 + 343, 73718 +/**/ 73719 + 342, 73720 +/**/ 73721 + 341, 73722 +/**/ 73723 + 340, 73724 +/**/ 73725 + 339, 73726 +/**/ 73727 + 338, 73728 +/**/ 73729 + 337, 73730 +/**/ 73731 + 336, 73732 +/**/ 73733 + 335, 73734 +/**/ 73735 + 334, 73736 +/**/ 73737 + 333, 73738 +/**/ 73739 + 332, 73740 +/**/ 73741 + 331, 73742 +/**/ 73743 + 330, 73744 +/**/ 73745 + 329, 73746 +/**/ 73747 + 328, 73748 +/**/ 73749 + 327, 73750 +/**/ 73751 + 326, 73752 +/**/ 73753 + 325, 73754 +/**/ 73755 + 324, 73756 +/**/ 73757 + 323, 73758 +/**/ 73759 + 322, 73760 +/**/ 73761 + 321, 73762 +/**/ 73763 + 320, 73764 +/**/ 73765 + 319, 73766 +/**/ 73767 + 318, 73768 +/**/ 73769 + 317, 73770 +/**/ 64947 73771 + 316, 64948 73772 +/**/ … … 65582 74406 diff -Naur vim74.orig/src/vim.h vim74/src/vim.h 65583 74407 --- vim74.orig/src/vim.h 2013-08-02 14:02:27.000000000 +0000 65584 +++ vim74/src/vim.h 2014-0 6-01 00:43:21.297462078 +000074408 +++ vim74/src/vim.h 2014-07-21 23:33:48.826776618 +0000 65585 74409 @@ -43,7 +43,7 @@ 65586 74410 * it becomes zero. This is likely a problem of not being able to run the … … 65744 74568 diff -Naur vim74.orig/src/winclip.c vim74/src/winclip.c 65745 74569 --- vim74.orig/src/winclip.c 2013-07-01 19:05:53.000000000 +0000 65746 +++ vim74/src/winclip.c 2014-0 6-01 00:43:21.514128193+000074570 +++ vim74/src/winclip.c 2014-07-21 23:33:49.033442746 +0000 65747 74571 @@ -797,4 +797,29 @@ 65748 74572 vim_free(widestr); … … 65777 74601 diff -Naur vim74.orig/src/window.c vim74/src/window.c 65778 74602 --- vim74.orig/src/window.c 2013-07-24 15:38:29.000000000 +0000 65779 +++ vim74/src/window.c 2014-0 6-01 00:43:21.530794817 +000074603 +++ vim74/src/window.c 2014-07-21 23:33:49.070109317 +0000 65780 74604 @@ -130,9 +130,7 @@ 65781 74605 case Ctrl_S: … … 65896 74720 postponed_split = Prenum; 65897 74721 else 65898 @@ -1216,8 +1192,8 @@ 74722 @@ -710,6 +686,8 @@ 74723 int layout; 74724 frame_T *frp, *curfrp; 74725 int before; 74726 + int minheight; 74727 + int wmh1; 74728 74729 if (flags & WSP_TOP) 74730 oldwin = firstwin; 74731 @@ -738,22 +716,32 @@ 74732 #ifdef FEAT_VERTSPLIT 74733 if (flags & WSP_VERT) 74734 { 74735 + int wmw1; 74736 + int minwidth; 74737 + 74738 layout = FR_ROW; 74739 74740 /* 74741 * Check if we are able to split the current window and compute its 74742 * width. 74743 */ 74744 - needed = p_wmw + 1; 74745 + /* Current window requires at least 1 space. */ 74746 + wmw1 = (p_wmw == 0 ? 1 : p_wmw); 74747 + needed = wmw1 + 1; 74748 if (flags & WSP_ROOM) 74749 - needed += p_wiw - p_wmw; 74750 + needed += p_wiw - wmw1; 74751 if (p_ea || (flags & (WSP_BOT | WSP_TOP))) 74752 { 74753 + minwidth = frame_minwidth(topframe, NOWIN); 74754 available = topframe->fr_width; 74755 - needed += frame_minwidth(topframe, NULL); 74756 + needed += minwidth; 74757 } 74758 else 74759 - available = oldwin->w_width; 74760 + { 74761 + minwidth = frame_minwidth(oldwin->w_frame, NOWIN); 74762 + available = oldwin->w_frame->fr_width; 74763 + needed += minwidth; 74764 + } 74765 if (available < needed && new_wp == NULL) 74766 { 74767 EMSG(_(e_noroom)); 74768 @@ -761,10 +749,10 @@ 74769 } 74770 if (new_size == 0) 74771 new_size = oldwin->w_width / 2; 74772 - if (new_size > oldwin->w_width - p_wmw - 1) 74773 - new_size = oldwin->w_width - p_wmw - 1; 74774 - if (new_size < p_wmw) 74775 - new_size = p_wmw; 74776 + if (new_size > available - minwidth - 1) 74777 + new_size = available - minwidth - 1; 74778 + if (new_size < wmw1) 74779 + new_size = wmw1; 74780 74781 /* if it doesn't fit in the current window, need win_equal() */ 74782 if (oldwin->w_width - new_size - 1 < p_wmw) 74783 @@ -805,18 +793,22 @@ 74784 * Check if we are able to split the current window and compute its 74785 * height. 74786 */ 74787 - needed = p_wmh + STATUS_HEIGHT + need_status; 74788 + /* Current window requires at least 1 space. */ 74789 + wmh1 = (p_wmh == 0 ? 1 : p_wmh); 74790 + needed = wmh1 + STATUS_HEIGHT; 74791 if (flags & WSP_ROOM) 74792 - needed += p_wh - p_wmh; 74793 + needed += p_wh - wmh1; 74794 if (p_ea || (flags & (WSP_BOT | WSP_TOP))) 74795 { 74796 + minheight = frame_minheight(topframe, NOWIN) + need_status; 74797 available = topframe->fr_height; 74798 - needed += frame_minheight(topframe, NULL); 74799 + needed += minheight; 74800 } 74801 else 74802 { 74803 - available = oldwin->w_height; 74804 - needed += p_wmh; 74805 + minheight = frame_minheight(oldwin->w_frame, NOWIN) + need_status; 74806 + available = oldwin->w_frame->fr_height; 74807 + needed += minheight; 74808 } 74809 if (available < needed && new_wp == NULL) 74810 { 74811 @@ -831,11 +823,10 @@ 74812 } 74813 if (new_size == 0) 74814 new_size = oldwin_height / 2; 74815 - 74816 - if (new_size > oldwin_height - p_wmh - STATUS_HEIGHT) 74817 - new_size = oldwin_height - p_wmh - STATUS_HEIGHT; 74818 - if (new_size < p_wmh) 74819 - new_size = p_wmh; 74820 + if (new_size > available - minheight - STATUS_HEIGHT) 74821 + new_size = available - minheight - STATUS_HEIGHT; 74822 + if (new_size < wmh1) 74823 + new_size = wmh1; 74824 74825 /* if it doesn't fit in the current window, need win_equal() */ 74826 if (oldwin_height - new_size - STATUS_HEIGHT < p_wmh) 74827 @@ -1216,8 +1207,8 @@ 65899 74828 else 65900 74829 copy_loclist(oldp, newp); … … 65907 74836 /* copy tagstack and folds */ 65908 74837 for (i = 0; i < oldp->w_tagstacklen; i++) 65909 @@ -2172,8 +21 48,9 @@74838 @@ -2172,8 +2163,9 @@ 65910 74839 * If "free_buf" is TRUE related buffer may be unloaded. 65911 74840 * … … 65918 74847 win_T *win; 65919 74848 int free_buf; 65920 @@ -2190,21 +21 67,21 @@74849 @@ -2190,21 +2182,21 @@ 65921 74850 if (last_window()) 65922 74851 { … … 65944 74873 #endif 65945 74874 65946 @@ -2212,7 +2 189,7 @@74875 @@ -2212,7 +2204,7 @@ 65947 74876 * and then close the window and the tab page to avoid that curwin and 65948 74877 * curtab are invalid while we are freeing memory. */ … … 65953 74882 /* When closing the help window, try restoring a snapshot after closing 65954 74883 * the window. Otherwise clear the snapshot, it's now invalid. */ 65955 @@ -2240,22 +22 17,22 @@74884 @@ -2240,22 +2232,22 @@ 65956 74885 win->w_closing = TRUE; 65957 74886 apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf); … … 65981 74910 } 65982 74911 #endif 65983 @@ -2303,7 +22 80,7 @@74912 @@ -2303,7 +2295,7 @@ 65984 74913 * other window or moved to another tab page. */ 65985 74914 else if (!win_valid(win) || last_window() || curtab != prev_curtab … … 65990 74919 /* Free the memory used for the window and get the window that received 65991 74920 * the screen space. */ 65992 @@ -2383,6 +23 60,7 @@74921 @@ -2383,6 +2375,7 @@ 65993 74922 #endif 65994 74923 … … 65998 74927 65999 74928 /* 66000 @@ -3724,9 +3702,7 @@ 74929 @@ -2499,6 +2492,10 @@ 74930 74931 while (firstwin != NULL) 74932 (void)win_free_mem(firstwin, &dummy, NULL); 74933 + 74934 + /* No window should be used after this. Set curwin to NULL to crash 74935 + * instead of using freed memory. */ 74936 + curwin = NULL; 74937 } 74938 #endif 74939 74940 @@ -3724,9 +3721,7 @@ 66001 74941 { 66002 74942 tabpage_T *tp = curtab; … … 66008 74948 if (trigger_leave_autocmds) 66009 74949 { 66010 @@ -4027,12 +40 03,10 @@74950 @@ -4027,12 +4022,10 @@ 66011 74951 return; 66012 74952 #endif … … 66021 74961 #ifdef FEAT_GUI 66022 74962 need_mouse_correct = TRUE; 66023 @@ -5649,7 +5623,7 @@ 74963 @@ -4276,6 +4269,11 @@ 74964 /* sync undo before leaving the current buffer */ 74965 if (undo_sync && curbuf != wp->w_buffer) 74966 u_sync(FALSE); 74967 + 74968 + /* Might need to scroll the old window before switching, e.g., when the 74969 + * cursor was moved. */ 74970 + update_topline(); 74971 + 74972 /* may have to copy the buffer options when 'cpo' contains 'S' */ 74973 if (wp->w_buffer != curbuf) 74974 buf_copy_options(wp->w_buffer, BCO_ENTER | BCO_NOHELP); 74975 @@ -4623,7 +4621,15 @@ 74976 if (wp != aucmd_win) 74977 #endif 74978 win_remove(wp, tp); 74979 - vim_free(wp); 74980 +#ifdef FEAT_AUTOCMD 74981 + if (autocmd_busy) 74982 + { 74983 + wp->w_next = au_pending_free_win; 74984 + au_pending_free_win = wp; 74985 + } 74986 + else 74987 +#endif 74988 + vim_free(wp); 74989 74990 #ifdef FEAT_AUTOCMD 74991 unblock_autocmds(); 74992 @@ -4747,8 +4753,12 @@ 74993 win_free_lsize(wp) 74994 win_T *wp; 74995 { 74996 - vim_free(wp->w_lines); 74997 - wp->w_lines = NULL; 74998 + /* TODO: why would wp be NULL here? */ 74999 + if (wp != NULL) 75000 + { 75001 + vim_free(wp->w_lines); 75002 + wp->w_lines = NULL; 75003 + } 75004 } 75005 75006 /* 75007 @@ -4845,15 +4855,20 @@ 75008 garray_T *gap; 75009 { 75010 win_T *wp; 75011 - int i; 75012 + int i, j; 75013 75014 if (win_count() * 2 == gap->ga_len) 75015 { 75016 - i = 0; 75017 - for (wp = firstwin; wp != NULL; wp = wp->w_next) 75018 + /* The order matters, because frames contain other frames, but it's 75019 + * difficult to get right. The easy way out is to do it twice. */ 75020 + for (j = 0; j < 2; ++j) 75021 { 75022 - frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]); 75023 - win_setheight_win(((int *)gap->ga_data)[i++], wp); 75024 + i = 0; 75025 + for (wp = firstwin; wp != NULL; wp = wp->w_next) 75026 + { 75027 + frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]); 75028 + win_setheight_win(((int *)gap->ga_data)[i++], wp); 75029 + } 75030 } 75031 /* recompute the window positions */ 75032 (void)win_comp_pos(); 75033 @@ -5649,7 +5664,7 @@ 66024 75034 win_T *wp; 66025 75035 { … … 66030 75040 66031 75041 /* 66032 @@ -5664,6 +56 38,7 @@75042 @@ -5664,6 +5679,7 @@ 66033 75043 { 66034 75044 linenr_T lnum; … … 66038 75048 /* Don't want a negative height. Happens when splitting a tiny window. 66039 75049 * Will equalize heights soon to fix it. */ 66040 @@ -5672,8 +56 47,13@@75050 @@ -5672,8 +5688,18 @@ 66041 75051 if (wp->w_height == height) 66042 75052 return; /* nothing to do */ … … 66047 75057 + { 66048 75058 + if (wp == curwin) 66049 + validate_cursor(); /* w_wrow needs to be valid */ 75059 + /* w_wrow needs to be valid. When setting 'laststatus' this may 75060 + * call win_new_height() recursively. */ 75061 + validate_cursor(); 75062 + if (wp->w_height != prev_height) 75063 + return; /* Recursive call already changed the size, bail out here 75064 + to avoid the following to mess things up. */ 66050 75065 + if (wp->w_wrow != wp->w_prev_fraction_row) 66051 75066 + set_fraction(wp); … … 66054 75069 wp->w_height = height; 66055 75070 wp->w_skipcol = 0; 66056 @@ -5693,7 +5 673,8 @@75071 @@ -5693,7 +5719,8 @@ 66057 75072 lnum = wp->w_cursor.lnum; 66058 75073 if (lnum < 1) /* can happen when starting up */ … … 66064 75079 sline = wp->w_wrow - line_size; 66065 75080 66066 @@ -5729,8 +57 10,9 @@75081 @@ -5729,8 +5756,9 @@ 66067 75082 --wp->w_wrow; 66068 75083 } 66069 75084 } 66070 + 75085 + set_topline(wp, lnum); 66071 75086 } 66072 75087 - else … … 66075 75090 while (sline > 0 && lnum > 1) 66076 75091 { 66077 @@ -5773,8 +5 755,9 @@75092 @@ -5773,8 +5801,9 @@ 66078 75093 lnum = 1; 66079 75094 wp->w_wrow -= sline; 66080 75095 } 66081 75096 + 66082 + 75097 + set_topline(wp, lnum); 66083 75098 } 66084 75099 - set_topline(wp, lnum); … … 66086 75101 66087 75102 if (wp == curwin) 66088 @@ -5783,7 +5 766,8 @@75103 @@ -5783,7 +5812,8 @@ 66089 75104 update_topline(); 66090 75105 curs_columns(FALSE); /* validate w_wrow */ … … 66096 75111 win_comp_scroll(wp); 66097 75112 redraw_win_later(wp, SOME_VALID); 66098 @@ -6035,7 +60 19,6 @@75113 @@ -6035,7 +6065,6 @@ 66099 75114 long count; 66100 75115 linenr_T *file_lnum; … … 66104 75119 { 66105 75120 int len; 66106 @@ -6046,7 +60 29,6 @@75121 @@ -6046,7 +6075,6 @@ 66107 75122 return find_file_name_in_path(ptr, len, 66108 75123 FNAME_MESS|FNAME_EXP|FNAME_REL, count, curbuf->b_ffname); … … 66112 75127 file_lnum); 66113 75128 75129 @@ -6747,20 +6775,22 @@ 75130 * Return ID of added match, -1 on failure. 75131 */ 75132 int 75133 -match_add(wp, grp, pat, prio, id) 75134 +match_add(wp, grp, pat, prio, id, pos_list) 75135 win_T *wp; 75136 char_u *grp; 75137 char_u *pat; 75138 int prio; 75139 int id; 75140 + list_T *pos_list; 75141 { 75142 - matchitem_T *cur; 75143 - matchitem_T *prev; 75144 - matchitem_T *m; 75145 + matchitem_T *cur; 75146 + matchitem_T *prev; 75147 + matchitem_T *m; 75148 int hlg_id; 75149 - regprog_T *regprog; 75150 + regprog_T *regprog = NULL; 75151 + int rtype = SOME_VALID; 75152 75153 - if (*grp == NUL || *pat == NUL) 75154 + if (*grp == NUL || (pat != NULL && *pat == NUL)) 75155 return -1; 75156 if (id < -1 || id == 0) 75157 { 75158 @@ -6785,7 +6815,7 @@ 75159 EMSG2(_(e_nogroup), grp); 75160 return -1; 75161 } 75162 - if ((regprog = vim_regcomp(pat, RE_MAGIC)) == NULL) 75163 + if (pat != NULL && (regprog = vim_regcomp(pat, RE_MAGIC)) == NULL) 75164 { 75165 EMSG2(_(e_invarg2), pat); 75166 return -1; 75167 @@ -6803,15 +6833,112 @@ 75168 } 75169 75170 /* Build new match. */ 75171 - m = (matchitem_T *)alloc(sizeof(matchitem_T)); 75172 + m = (matchitem_T *)alloc_clear(sizeof(matchitem_T)); 75173 m->id = id; 75174 m->priority = prio; 75175 - m->pattern = vim_strsave(pat); 75176 + m->pattern = pat == NULL ? NULL : vim_strsave(pat); 75177 m->hlg_id = hlg_id; 75178 m->match.regprog = regprog; 75179 m->match.rmm_ic = FALSE; 75180 m->match.rmm_maxcol = 0; 75181 75182 + /* Set up position matches */ 75183 + if (pos_list != NULL) 75184 + { 75185 + linenr_T toplnum = 0; 75186 + linenr_T botlnum = 0; 75187 + listitem_T *li; 75188 + int i; 75189 + 75190 + for (i = 0, li = pos_list->lv_first; li != NULL && i < MAXPOSMATCH; 75191 + i++, li = li->li_next) 75192 + { 75193 + linenr_T lnum = 0; 75194 + colnr_T col = 0; 75195 + int len = 1; 75196 + list_T *subl; 75197 + listitem_T *subli; 75198 + int error = FALSE; 75199 + 75200 + if (li->li_tv.v_type == VAR_LIST) 75201 + { 75202 + subl = li->li_tv.vval.v_list; 75203 + if (subl == NULL) 75204 + goto fail; 75205 + subli = subl->lv_first; 75206 + if (subli == NULL) 75207 + goto fail; 75208 + lnum = get_tv_number_chk(&subli->li_tv, &error); 75209 + if (error == TRUE) 75210 + goto fail; 75211 + if (lnum == 0) 75212 + { 75213 + --i; 75214 + continue; 75215 + } 75216 + m->pos.pos[i].lnum = lnum; 75217 + subli = subli->li_next; 75218 + if (subli != NULL) 75219 + { 75220 + col = get_tv_number_chk(&subli->li_tv, &error); 75221 + if (error == TRUE) 75222 + goto fail; 75223 + subli = subli->li_next; 75224 + if (subli != NULL) 75225 + { 75226 + len = get_tv_number_chk(&subli->li_tv, &error); 75227 + if (error == TRUE) 75228 + goto fail; 75229 + } 75230 + } 75231 + m->pos.pos[i].col = col; 75232 + m->pos.pos[i].len = len; 75233 + } 75234 + else if (li->li_tv.v_type == VAR_NUMBER) 75235 + { 75236 + if (li->li_tv.vval.v_number == 0) 75237 + { 75238 + --i; 75239 + continue; 75240 + } 75241 + m->pos.pos[i].lnum = li->li_tv.vval.v_number; 75242 + m->pos.pos[i].col = 0; 75243 + m->pos.pos[i].len = 0; 75244 + } 75245 + else 75246 + { 75247 + EMSG(_("List or number required")); 75248 + goto fail; 75249 + } 75250 + if (toplnum == 0 || lnum < toplnum) 75251 + toplnum = lnum; 75252 + if (botlnum == 0 || lnum >= botlnum) 75253 + botlnum = lnum + 1; 75254 + } 75255 + 75256 + /* Calculate top and bottom lines for redrawing area */ 75257 + if (toplnum != 0) 75258 + { 75259 + if (wp->w_buffer->b_mod_set) 75260 + { 75261 + if (wp->w_buffer->b_mod_top > toplnum) 75262 + wp->w_buffer->b_mod_top = toplnum; 75263 + if (wp->w_buffer->b_mod_bot < botlnum) 75264 + wp->w_buffer->b_mod_bot = botlnum; 75265 + } 75266 + else 75267 + { 75268 + wp->w_buffer->b_mod_set = TRUE; 75269 + wp->w_buffer->b_mod_top = toplnum; 75270 + wp->w_buffer->b_mod_bot = botlnum; 75271 + wp->w_buffer->b_mod_xlines = 0; 75272 + } 75273 + m->pos.toplnum = toplnum; 75274 + m->pos.botlnum = botlnum; 75275 + rtype = VALID; 75276 + } 75277 + } 75278 + 75279 /* Insert new match. The match list is in ascending order with regard to 75280 * the match priorities. */ 75281 cur = wp->w_match_head; 75282 @@ -6827,8 +6954,12 @@ 75283 prev->next = m; 75284 m->next = cur; 75285 75286 - redraw_later(SOME_VALID); 75287 + redraw_later(rtype); 75288 return id; 75289 + 75290 +fail: 75291 + vim_free(m); 75292 + return -1; 75293 } 75294 75295 /* 75296 @@ -6841,8 +6972,9 @@ 75297 int id; 75298 int perr; 75299 { 75300 - matchitem_T *cur = wp->w_match_head; 75301 - matchitem_T *prev = cur; 75302 + matchitem_T *cur = wp->w_match_head; 75303 + matchitem_T *prev = cur; 75304 + int rtype = SOME_VALID; 75305 75306 if (id < 1) 75307 { 75308 @@ -6868,8 +7000,26 @@ 75309 prev->next = cur->next; 75310 vim_regfree(cur->match.regprog); 75311 vim_free(cur->pattern); 75312 + if (cur->pos.toplnum != 0) 75313 + { 75314 + if (wp->w_buffer->b_mod_set) 75315 + { 75316 + if (wp->w_buffer->b_mod_top > cur->pos.toplnum) 75317 + wp->w_buffer->b_mod_top = cur->pos.toplnum; 75318 + if (wp->w_buffer->b_mod_bot < cur->pos.botlnum) 75319 + wp->w_buffer->b_mod_bot = cur->pos.botlnum; 75320 + } 75321 + else 75322 + { 75323 + wp->w_buffer->b_mod_set = TRUE; 75324 + wp->w_buffer->b_mod_top = cur->pos.toplnum; 75325 + wp->w_buffer->b_mod_bot = cur->pos.botlnum; 75326 + wp->w_buffer->b_mod_xlines = 0; 75327 + } 75328 + rtype = VALID; 75329 + } 75330 vim_free(cur); 75331 - redraw_later(SOME_VALID); 75332 + redraw_later(rtype); 75333 return 0; 75334 } 75335 66114 75336 diff -Naur vim74.orig/src/xxd/Make_cyg.mak vim74/src/xxd/Make_cyg.mak 66115 75337 --- vim74.orig/src/xxd/Make_cyg.mak 2010-05-15 11:04:06.000000000 +0000 66116 +++ vim74/src/xxd/Make_cyg.mak 2014-0 6-01 00:43:21.840794027+000075338 +++ vim74/src/xxd/Make_cyg.mak 2014-07-21 23:33:49.350108586 +0000 66117 75339 @@ -8,7 +8,7 @@ 66118 75340 DEFINES =
Note:
See TracChangeset
for help on using the changeset viewer.